Temple of The Roguelike Forums
Development => Programming => Topic started by: st33d on August 07, 2020, 12:09:24 PM
-
This discussion came up on a Discord I am on and the responses I received made it clear that many people don't consider this important - when in fact it is the difference between life and death in a turn based game.
Consider the Compass option. If a monster always looks at north first and east last when pathfinding then the player has an advantage when approaching from the east. Depending on the type of roguelike you are making, the order in which you look at adjacent tiles determines the outcome of all situations where a player's life hangs in the balance.
In a current project I'm using Clock - this mitigates some of the problems with Compass, whilst encouraging kiting from enemies. Though it's a little less predictable and less puzzle-like.
I'm posting this poll in the hopes to find out how people generally approach this problem and to raise awareness of what I think is a core piece of roguelike design. It affects the A.I. of all your enemies and the nature of all your effects.
-
I hadn't considered how impactful this could be, but it makes total sense. I believe the RANDOM solution would work best for most kinds of roguelikes.
-
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.
-
For a classic roguelike I'm getting feedback that random is preferable to avoid any bias and I happen to agree. When the level is random and most effects are random then the fairest method is to look randomly.
The execution order doesn't just apply to A.I. - imagine that you have an explosion - and that explosion hits more fuel for another explosion. The order in which these events occur can have different effects on the level, perhaps vaporising elements before they can react if the execution steps one way instead of another.
In my own project I have unlimited Undo - so there needs to be repeatable logic. Or perhaps you want enemies with a specific bias because of map structure.
-
Wow, I never thought this order would be important at all! Currently in my WIP I didn't even think about this, and it's just an ad hoc mishmash of different orders, depending on the code at hand. Mostly it's just some arbitrary order determined by the underlying hash tables I use to store position-related information. But I imagine at some point I ought to put more thought into what order things should be done in.
-
One game that really drove home this idea was DROD. There were levels you literally couldn't win unless you utilized the order that the enemy did things in. It was more of a puzzle game and discrete in its outcomes but I thought it was an interesting reminder of this and how to make enemies distinctly different without resorting to stats. I wish more roguelikes took notes from it, although some do.
-
This is really interesting to think about. I'm not sure I prefer any one method. On the one hand, looking in random directions might be considered more fair in a game full of other randomness. But on the other hand, something that appears random at first due to the overall complexity or amount of interactions, but upon closer inspection is systematic and understandable has a sort of "seeing the matrix" aesthetic to it, which I also appreciate.
-
I've been toying with the idea of "moods" (aggressive, calm, searching) for dictating movement order for mobs. The hope is that allowing players to observe different mobs movement once in FOV will help decide how (not) to interact with them.
Outside of FOV I tend to make it random.