• Home
  • About
    • Biography
    • Contact Info
  • Projects
    • 2D Map Editor
    • Dodge and Destroy
    • Intruder's Run
    • Procedural Terrain
    • Jim Bob's Jam
Nickpdevelop.net

Dodge and Destroy

Project Information

Written in C++, using the OpenGL API

My first real C++ game project I decided to work on in my free time; Dodge and Destroy is a game inspired by Geometry Wars in which you must fly around dodging enemies while trying to take them out in order to progress and gain higher scores.

Three AI types currently exist:

  • Type 1: moves towards the player until they collide
  • Type 2: moves at a random angle and changes direction when a wall is hit
  • Type 3: rotates until it is locked onto the player then speeds towards the player quickly

Implementation Information

The enemies are spawned through a controller class which will adjust probabilities according to the player’s play style and spawn enemies according to counter the player’s play style. If the player is really mobile, then the controller adjusts by spawning more enemies of Type 2, however if the player is immobile it will spawn more enemies of Type 3 to force the player to not sit around. The amount of enemies spawned is determined by the level. It contains various spawn locations for each enemy type and randomly decides where to place each enemy.

Collisions are done using the separating axis theorem, along with putting objects into regional bins to reduce the number of collision calculations. To reduce memory usage each object contains a pointer to one instance of each texture so textures do not have to be constantly loaded over and over.

UI and menus are handled by a screen manager class which functions much like a stack. The screen on top of the stack is the only screen that will contain updates//draw calls. It makes adding new UI options or screens fairly simple.

Source
Download Source