DaFool wrote:
I'm considering adding diagonal modes (diagonal = True) since I already have the set of sprites... the question is if this will increase the calculation times without really adding much to the tactical aspect? It's only purpose is for a more natural path rather than the zig-zagging that is currently occuring.
Right now, it'll probably increase calculation times. In the long run, once I've finished optimising the path/range-finding algorithm, it shouldn't so much.
Basically, the first implementation of the path/range-finding algorithm is a ridiculous depth-first search which makes no sense and I honestly can't even remember why I wrote it like that. So currently there's every chance it'll explore a path which goes [L, L, L, U, R, R, R] before it explores a path which goes [U]... I think you can see where that's going. A breadth-first search makes a lot more sense for this kind of thing - the first paths it explores will be [U], [D], [L] and [R], then [U, L], [U, U], [U, R], [L U], [L, L]... and so on. Hopefully I'll have a bit of time to get to this over the weekend - work's been busy lately, so I've not had so much of my usual lunchtime coding time.
(Of course, if you want natural-looking paths, you should really use hexes! :3)
As to rotate - I'd certainly agree it makes sense, but you'll probably need to modify the AI a bit to get it to use it intelligently, if you want that to happen (not that there haven't been successful and fun games where the AI doesn't make intelligent use of facing at all, mind).