EDIT: I'm hoping to release the second one by the time this one hits 500 downloads.
Again, thanks for you replies. They do help.
@dadio, that graphic is great! I hadn't thought of that, because I really haven't played any games like this except Fire Emblem, so that thought hadn't even occurred to me. Thanks.
I would suggest, if possible, that the attack ranges be made easily customisable rather than tied to a specific routine.
Definitely so. I don't really like the code, but I think I'm going with a system where the attack range is created in an array, by hand, and then at execution, the game checks each of the designated squares.
One thing that I am going to try to make clear, is that as much of the attack code as possible should be in the weapon objects, and not the player objects. Generally, the attack range of a player is defined primarily by the weapon that they are using, so this would allow different weapons to be made quite easily.
EDIT: Changed my mind about this, and I am no longer going with weapon objects... I think.
@drt_t1gg3r and nononick, thanks for your input. I'm going with the line-of-sight method. If the player can see from the center of one cell to the center of the other, it's good.
@x-death and jpcproductions, part 2 will have:
- Attack Range
@blaketheawesomedude, it would be possible, but that would require me to reproduce all of the data structures in pure GML, which I definitely don't want to do. Sorry.
Edited by Fractal, 08 June 2008 - 03:56 AM.