Day 16 – Walking UI
Working on implementing the actual walk and run actions and setting up the UI for the player to execute them.
I’m taking the classic approach for this type of game.
Each turn a character gets a number of action points that can be used to execute actions. An action is something like walking to a location, shooting at another character, healing, etc. Some actions will cost a single action point, others might be two or more.
Moving around the level
Right now I’m working on the very basic actions: moving around on the playing field. The playing field is defined by a grid, made up of a number of square tiles, and with a single move action the character can move a specific number of tiles.
Movement is always from tile to tile and only in 8 possible directions defined by the edges and the diagonals. When wanting to move to a destination a path will be calculated matching the movement restrictions. When the action is executed, that path will be followed.
Depending on if you’re walking or running, more tiles can be crossed. For example walking costs 1 action point and allows the character to cross 6 tiles, whereas running costs 2 but allows movement across 14 tiles.
All of this is pretty standard for turn-based, grid-based games.
Today I’ve been working on the UI visualization for the movement action: showing the movement range of the selected character and the path to the destination. Should be finished tomorrow.
Leave a Reply