Skip to content

dipeshmanandhar/Tanks

Repository files navigation

Tanks

Spin-off of classic Wii Play Tanks! game

Description

This game is based on Nintendo's Wii Play Tanks! game. The player controls a blue tank and must traverse a small maze from the start to the end, while avoiding or defeating a number of enemy tanks along the way. The player can control their tank by using the WASD keys and control their barrel and shoot bullets with the mouse. Each tank (player and enemy tanks) has a certain number of "lives" above their tank, as shown below:

alt text

If a tank loses all their lives (by getting hit by a bullet), they die and are removed from the game (for the player, this results in a game over). The game starts at the main menu, which includes a "mini game" of the full game, where the player is not restricted to a maze, as shown below:

alt text

After clicking "Play", the game starts and the player is thrown into a maze, as shown below:

alt text

Maze Generation Algorithm

The maze was created using a randomized version of Prim's Algorithm, the same one as used in my Empty Life Project (https://github.com/dipeshmanandhar/Empty_Life).

Pathfinding AI

The pathfinding algorithm used by the enemy AI's was the A* (A-star) Algorithm, which is a modification of Dijkstra's Shortest-Path Algorithm using a greedy heuristic to guide the search for a shortest path from a start node to a destination node. This algorithm was chosen over Dijkstra's because the worst-case runtime of A* is Θ (|E|), which is better than that of Dijkstra's, Θ (|E| log |V|). For more information on the A* Algorithm, see the Wikipedia page.

MIDI Music Player

All sound effects and background music was created using a MIDI sound player. The background music plays a certain scale of piano notes at a speed based on the proximity of the player to the nearest enemy. That is, the closer the player is to an enemy, the faster the tempo of the music gets, to create a feeling of anxiety in the player.

This project was completed by May of 2017.

About

Spin-off of classic Wii Play Tanks! game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages