nsmryan / RustRoguelike

This Rust Roguelike is a Roguelike written in Rust.
17 stars 3 forks source link

Soft-Lock #320

Open MicroChasm opened 3 years ago

MicroChasm commented 3 years ago

I found a situation where you can get yourself softlocked. We will have to make some change to make sure that this doesn't happen.

image

nsmryan commented 3 years ago

Understood. What could we do about this? I could potentially see golems moving away from the player here, or perhaps to the closest position that would hit the player if they left the hallway. What do other roguelikes do to prevent this?

MicroChasm commented 3 years ago

I think that this is only an issue because we have golems that attack adjacent tiles-- even golems that attack vertically and diagonally could remain a tile away or so, letting you maneuver enough to escape over the wall, though you might have to take some hits.

The thing is, I don't think other roguelikes have this issue. the only roguelike that I can think of where you don't just fight monsters is Hyper Rogue, and this position would be considered a "checkmate" and you would lose.

One option is to add another action to the player's default moveset; and action that I would thinking would only be part of the special athletic character's set. This would be doing a wall-kick-thing (on inter-tile or full-tile walls), that launches you backward a few tiles, and allows you to go over any intervening golems.

MicroChasm commented 3 years ago

As an added note, this wall-kick ability would have to work even if the player is adjacent to the wall and standing still if it is supposed to remove soft-locks. Maybe if you go into the wall-kick with momentum you get an extra tile out of it. Perhaps you only get two tiles of movement when you go into the kick from a standing positon, meaning that in many cases you will have to take a hit from the blocking golem, but you get three tiles if you go into the kick from running.