Summary
That was a big chapter, but much was achieved. We were introduced to the Java HashMap class and the Singleton pattern which together enabled us to code the BitmapStore class to save memory by avoiding duplicate copies of Bitmap instances. We coded the component classes for all the platforms that Bob will walk on as well as the decorative component classes that will handle things like trees and stalagmites.
We coded a new GameObjectFactory that was like the previous project except it handles multiple different types of Transform. We saw and added the code for the level designs. They are represented by extending a parent Level class.
We also coded the slightly familiar GameObject, GameState, SoundEngine, PhysicsEngine and Renderer classes.
We learned about and coded the all-new Camera class which tracks the player's position, keeping him in the centre of all the action and translating floating point world coordinates to integer pixel coordinates.
Next, we coded the HUD and the UIController...