Rogue Tank | Holistic 3D - Math Course
HOW TO PLAY
MOVE - WASD keys
RADAR - Left Shift key.
RELOAD - Right Mouse Button.
SHOOT - Left Mouse Button.
All actions consume your turn.
This game was created as an exercise using almost everything I learned from the Holistic3D course "Mathematics for Computer Games Development using Unity".
The entire state of the board is being handled by a single long variable and bitwise operations. Each time a tank moves, it updates the long to let it now a tile has being occupied and that the previously occupied tiles is now free for other tanks to move into it. The same happens each time an enemy or box is destroyed, the long updates to make the tile available to ocupy.
Each level is created procedurally. When a match initializes, it sets the floor and buildings around, it also creates colliders that prevent bullets from moving indefinitely, this is all calculated using a preset game board size. Then, the player is placed, then boxes, each of these actions update the state of the board using the same long previously mentioned. Finally, the enemies are placed into the board, this time, using a condition that keeps them away from the player initial spot.
Handling the entire state of a game board using a single long was quite a fun experiment
This is the first game in a series of "Course Games".
Leave a comment
Log in with itch.io to leave a comment.