You are viewing a single comment's thread from:

RE: Gamdev blog 7: Pointlessness

in #gamedev7 years ago

The game is completely turn based and no simultaneous. The "we miss each other" event can only happen if I decide that enemies decide their next move immediately after completing their previous one, thus deciding what to do based on an outdated board state.

The way the system works is every actor replenishes 1 energy every time the game loops over all the actors. When an actor has sufficient energy to make an action they want to do, they act, and lose the energy.

Currently, the cost of a move or an action (attack) is both 1, so every loop through all actors, every actor gets 1 energy and acts. I can change it, so the cost of different actions varies, both for enemies and for the player. In case of the player, they can choose whether to rest for more energy (up to a cap) or perform an action. In case of enemies, it's a bit trickier since the AI needs to accommodate the variance. Currently the AI is: If player is in the same room, attack, otherwise, get closer to the player.

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 58194.53
ETH 2364.50
USDT 1.00
SBD 2.37