Tanks! is a game implemented with pygame in which the player must use a tank to destroy other tanks and assorted other dangerous foes.
Requires pygame to be installed. Developed on python 3 and Windows 7, other versions or OSes are supported, but I may not know if they work or not. Please let me know if they don't and I'll try to fix.
First, install pygame:
pip3 install pygame
Run the game by typing
python3 main.py
at the command line while in the top level directory.
The tank's driving is controlled by either the arrow keys or WASD:
- Up/W: Forward (or brake if in reverse)
- Down/S: Backward (or brake if going forwards)
- Left/A: Turn tank to the left
- Right/D: Turn tank to the right
The tank's turret is controlled by the position of the mouse. The turret will turn towards the mouse.
To fire a bullet, hit the left mouse button. It will fire in the direction that the turret is currently facing (which may not be in the direction of the mouse since the turret does not turn instantly).
Other controls:
- P: pauses/unpauses the game
- R: restarts the current level
- ESC: go to the menu
[Accessed from the "settings" option of the main menu]
- Music: toggles playing the game music
- Sound: toggles playing game sounds, such as explosions
- Debug: toggles some debug features (see below)
[Active when the debug option is enabled from the settings menu]
- Prints the milliseconds taken to render long frames
All code, art and sound effects were produced by Jeremy Sharpe, with the exception of the following acknowledgements:
- Thanks to JewelBeat.com for the music, "Move, Move, Move"
- The menu font, "Army", the original source of which is unknown