1
Programming / Re: Order of Execution In Turn Based Roguelikes
« on: August 07, 2020, 04:20:04 PM »
I'm assuming the context of this is mainly scenarios where an AI is deciding between moving/attacking/whatevering two or more different tiles which are equally 'attractive' so far as the AI is concerned?
In situations like that I usually add a randomised modifier to the scoring for each tile which depending on the magnitude can be used to tie-break or (if big enough) to make the AI occasionally make 'mistakes' and not always take the optimal path. So, technically I go clockwise but in effect it's randomised. I can see how that wouldn't work in a more puzzle-orientated game where enemy behaviour needs to be 100% predictable, however.
In situations like that I usually add a randomised modifier to the scoring for each tile which depending on the magnitude can be used to tie-break or (if big enough) to make the AI occasionally make 'mistakes' and not always take the optimal path. So, technically I go clockwise but in effect it's randomised. I can see how that wouldn't work in a more puzzle-orientated game where enemy behaviour needs to be 100% predictable, however.