Tuesday, 18 October 2016

Shooting and Dying

I have now finished the first basic version of the shooting and dying mechanics. The logic is very simple to begin with and works something like this:

For each soldier in the shooting unit:
1)  Wait for a shoot order from the player
2)  React to the order for a random number of 10ths of a second.
3)  Run the shooting animation
4)  Roll to hit

Then for each soldier in the target unit:
1) Check if I am hit
2) Roll to see if I am lucky enough to avoid the hit (defence roll / save roll)
3) Do the dying animation, falling to the ground.
4) Remove casualties from the game table

In order to make the shooting "realistic" I have added some random order reaction time to each soldier shooting. The reason is to avoid shooting in exact synchronization which just looks silly. Not to mention dying synchronously.

No comments:

Post a Comment