Moving Entites in a Turn-Based Game
Most traditional roguelike games (e.g. Nethack, Rogue, and Cogmind) are turn-based. You move, and then the enemies move. Even Diablo started as a turn-based game—the real-time movement aspect was added after play testing. Turn-based play provides for very tactical game play—you win games based on careful positioning and movement, and not with your reflexes. It’s also required by the game design document you wrote in Chapter 4, Design a Dungeon Crawler.
For a “you move, they move” cycle, you need three states: player moving, monsters moving, and waiting for input. You don’t need to do much while you wait for input other than poll the keyboard and mouse, so save someone’s laptop battery and do less. Separating ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access