Meet our main characters, Tatam (left) and Asku (right).
Before this week, the act of selecting a location for the selected unit to move to was done purely through coordinates. This, we found, would not work for a maps of various sizes and was not scalable, thus we had to fix our entire movement script. This involved finding a way to find movement based on the tile game objects populating a manually made map in the Unity Editor, and find a path to the location the player chooses as long as the selected location is within the selected unit’s moveable range.
Thus, a solution was found.
Basic enemy movement was implemented soon after. The red character is the enemy as is programmed to locate the closest player unit and move towards that unit. Turn management (the act of determining if all player units had made an action thus allowing the enemy to move) had already been previously implemented, thus was easily tweaked to accommodate the new tile based movement.
Stamina Within Movement
Stamina will play one of the biggest roles in DinosWars as it will be the economy that the player will have to manage the most between characters. However, as an economy requires extensive number testing, the numbers chosen for the basic implementation may not be permanent.
When pertaining to movement, stamina will be used at a constant rate if the unit moves within their normal range (depicted in green). For example, if the unit has a normal movement range of 3 and wishes to move 2 spaces away, then 20 stamina will be consumed, 10 stamina for each tile moved.
Now, suppose the unit wishes to move 4 spaces away. This is 1 more than the unit’s normal movement range. The unit will be able to move 4 spaces away, but will consume more stamina than normal. It will consume the 30 stamina to move the normal movement range of 3 plus an extra 20 stamina to move that extra 1 space (depicted in yellow) for a total stamina usage of 50 stamina. The stamina consumed will grow over distance, consuming a total of 80 stamina if the player wanted to move 5 spaces. The unit, however, will not be able to move to spaces that will result in the unit having negative stamina.
Stamina will be fully replenished by the player’s next turn.
Basic Combat was added. Now the player can click a unit they control and then it will show a list of options that their unit can take. The options are move, attack, and pass. Pass is just an action the player can take should they not want to not use the units remaining actions.
Currently units can only take one action per turn with this implementation and it has not been integrated with the stamina system. Also the AI unit will currently not attack. In the gif above the enemy unit has 10 HP and then friendly units are dealing 1 damage each time they attack. The infinite attack appears like this because the AI unit doesn’t do anything when it is next to a friendly unit already at the current time.