Click below to download my sample Tank game for yourself!

tank_coding_build.zip | |
File Size: | 15245 kb |
File Type: | zip |
Part 1: Movement
What is not mentioned in the above example is that while the move button is clicked and arrows are generated, other characters cannot be selected until you confirm your placement or cancel it, to prevent players from generating several sets of arrows and making a mess. Go ahead and try to click on another character while you have arrows generated, it won't work! Hitting Cancel will allow you to return to where you were at when you started moving along with a refund on any AP you spent moving.
Part 2: Targeting
The yellow arrows help keep track of which enemy a button refers to so that confusion over which target is which when multiples of the same enemy class are present does not occur. Similarly to moving, while you have your list of targets, you are incapable of selecting another tank until you decide to make a shot or cancel targeting.
Part 3: Attacking
The current formula for shot chance keeps it at around 50% despite other factors so that testing of misses and hits wouldn't be reliant on getting lucky. To understand shot difficulty better, imagine a bag containing 10 balls labeled one through ten. if I say that any ball above the one marked 2 makes you a winner, then the number of balls in the bag that make you a winner is 3-10, or 8 of the balls. This means you have an 8/10 chance to pick a winning ball, or 80%.