Chapter 23. The Singleton Pattern, Java HashMap, Storing Bitmaps Efficiently and Designing Levels
This is going to be a very busy and varied chapter. We will learn the theory of the Singleton design pattern.
We will be introduced to another of the classes of the Java Collections, HashMap
in which we will see how we can more efficiently store and make available the wide variety of bitmaps that are required for this project. We will also get started on our new and improved Transform
class, code the first of the component-based classes, code the all-new Camera
class and make a significant start on some of the more familiar classes, GameState
, PhysicsEngine
, Renderer
, GameEngine
and more besides.
Here is a list of what to expect and the order to expect it.
- The Singleton pattern
- The Java HashMap class
- The memory problem and the
BitmapStore
- Coding a basic
Transform
- Coding the block-based component classes
- Creating the game levels
- Coding a stripped-down
GameObjectFactory
- Coding the
GameState
- Coding...