Saturday, September 10, 2011

Monsters ( progress )

Hey

Now my monsters move! I managed to get the monsters to state where they register their heartbeat into TimeEngine which takes care of time ( obv. ) but also action point generation. Every living creature has actionpoints. Amount of maximum actionpoints depends on race and attributes and so does the recovery rate.

So the way RoAs heartbeat works is that player movement( or equilevant action which uses the same amount of action points ) is a heartbeat ( one turn ). When players turn is done its monsters turn to do an action, for example move. On every heartbeat monster( and player ) regenerates certain amount of actionpoints ( but not pass a maximum value, so you can't grind those points ) and those points are used when creature makes an action. If there is not enough actionpoints to spend monster loses its AI-function call. But if there are enough actionpoints for example two actions, the creature is allowed to do those in the same turn. The amount of action points needed per action is different.

Lets go for example:
Player uses 100 points to move and regenerated 100 points per heartbeat. So player can move once a turn, no more, no less.

Monster uses also 100 points to move but regenerated only 50 points per heartbeat. This means the monster is able to move every other turn, making it very slow creature

Then there is Monster2 which uses 99 points per turn and regenerates 100 per heartbeat. So if the maximum allowed actionpoints for that creature is 200, eventually after 99 turns, it will catch up with the player.


No comments:

Post a Comment