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. ...
Get Learning Java by Building Android Games - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.