Description
Top down vehicle combat game using a tank letting the player fight various types of enemies while progressing to a goal tile on the map.
Description
Top down vehicle combat game using a tank letting the player fight various types of enemies while progressing to a goal tile on the map.
Feature List
Random map generation using pre-defined tile types and map sets. Allows for hard coded maps which are completely preauthored and generated maps which will only be acceptable if the map is completable.
Tile Heat Maps which are used for enemy AI pathfinding and checking if the player start position can reach the goal tile.
Polymorphic Entity management which uses an abstract base class and subclasses to define all of the unique entities in the game. Allows for quick iteration, modification and addition of more enemy and projectile types.
Textured rendering using a spritesheet for tile and entity textures.
Map 1 Regular View
Map 1 TileHeatMap Debug View
Tile Heat Maps
Uses Tile Heat Maps to map out traversable tiles and routing for AI behavior
Algorithm:
Target tiles are given a value of 0.
On a given Nth loop, tiles that are adjacent to a tile with a value (V) where V < N are given a value V + 1.
The algorithm finishes when no map values change over an iteration
Allows for efficient pathfinding as the AI simply follows the path of decreasing tile values to the target tile with value 0.
Entity Management
Uses a base class Entity and several subclasses for management
Common virtual functions like Update and Render can be called on Entity* with the runtime polymorphism of the pointer handling which subclass' function to actually run
Allows for easy additions of extra enemy, bullet and player types as long as it falls under the Entity class