Hoplite Posts
-
Separating the Engine and UI
When I started to create my game, I knew I wanted a few basic things. I wanted the game engine to be completely separate from whatever UI I wrapped around it. I wanted to be able to switch the game between a graphical or text based UI. I also decided that I wanted the UI to drive the engine, passing in Actions for actors who required input.
-
Implementing Reactions in Hoplite
In most turn based games, each actor gets to take a single action on their turn. So the game loop is pretty simple.
-
Control your UI with State Machines
Managing the various screens and menus of your UI can be greatly simplified by using a Finite State Machine(FSM) to control the flow of the UI. FSMs are easy to model and work very well for modeling the flow of a user’s action throughout a game. Furthermore, they compartmentalize code specific to each screen, making it simpler to reason about changes to any specific screen.
Hoplite is an excellent turn based game available on Android and IOS. It was published by Douglas Cowley from Magma Fortress. With his permission, I'm reimplementing it in python as a learning experience.