A Steroid 0.4s This is the documentation of the fourth version of A Steroid modified according the proposed exercises.
Solution to the exercises:
- Starred Background. Added some blinking stars to the background, it involved the creation of a new class Stars.
- Explosions with fragments Added some little flying fragments on exploding asteroids. It involved the creation of a Fragment class and many other changes. We want that the explosion of an asteroids depends on the asteroid type therefore we have added a Explode member function to the Ast class. This has caused that also the sub asteroids are managed directly by the asteroid class instead of the GameSession classes. Therefore we have added a vector to the Ast class that store the precomputed sub-asteroids.
- Better Intro Completed the title screen adding some flying asteroids. Note the view frustum clip function in the GameIntro.
New Features:
- Triangle Counting. Now each GameObj::Draw must return the number of drawn triangles (or other primitives) so we can count the overall number or triangle per frame. ALL the Draw function of the GameObj derived classes have been modified.
- New GameObjTimed class for object that has limited life span. Now Bullet, Exp and Fragment are subclassed from it.
- Moved all the meshes into a common dir data.
- Asteroids and bullets has a strenght.It will be used in next version to implement stronger bullets and harder asteroids.
Known bugs and problems:
- Memory management is a mess. We do not delete allocated asteroids and subasteroids
- Game can start with ship onto existing asteroids
Alphabetic index Hierarchy of classes