Game Development Reference
In-Depth Information
InvinciBagel Diagram: Package, Classes,
and Objects
Next, let's take a look at your current package, class, and object hierarchy, in the form
of a diagram (see Figure 7-19 ) , to see where you are in terms of creating your game en-
gine. At the right of the diagram is the InvinciBagel class, which holds the Scene
Graph, and Stage, Scene, and StackPane objects, which hold and display your splash
screen UI design. At the left of the diagram is the GamePlayLoop class, which will
contain the game processing logic calls and which gets declared and instantiated as a
gamePlayLoop object in the InvinciBagel class but is not part of the Scene Graph hier-
archy. Soon, you will start building the other functional areas displayed in the diagram
so that you can control your sprites, detect collisions between the sprites, and simulate
real-world forces of physics to make the game more realistic. You will see additions to
this diagram as you progress through the topic and create your Java 8 game.
Figure 7-19 . Current invincibagel package, class, and object hierarchy, after addition of the GamePlayLoop
Next, , before moving on to the GamePlayLoop AnimationTimer class and object,
you are going to place some relatively simple Java code inside the currently empty
.handle() method. You will do this to make sure that the pulse engine is processing and
to see just how fast 60FPS is! (I have to admit, my curiosity is getting the best of me!).
 
 
Search WWH ::




Custom Search