Game Development Reference
In-Depth Information
Invocations column, on the far right, to see how many times I tested the button click
functions). I highlighted the threads view, where I clicked High Scores, and then the
Legal and Credits button UI elements (see Figure 6-14 ). As you can see in this view as
well, the current design is using minimal resources.
Figure 6-14 . Profiling the Scene Graph UI design thus far to make sure that it does not use any perceptible thread
overhead
Java 8 and its JavaFX engine spawned nearly a dozen threads, so your game applic-
ation is already highly multithreaded, and it does not even need to be at this point in
time! The teams at Oracle are working diligently at making JavaFX the premier game
engine, so the performance just keeps getting better and better, which is great news for
Java 8 game developers!
Summary
In this sixth chapter, you got your hands dirty doing the actual top-level UI design for
your game as well as outlining the underlying game engine component design and
figuring out the most efficient Scene Graph node design . Then, you got back into
Java 8 game programming and redesigned your existing bootstrap Java 8 code, origin-
ally created by NetBeans 8.0.
Because this NetBeans-generated Java code design was not optimal for your pur-
poses, you rewrote it completely to make it more organized. You did this by creating
two custom Java methods, .createSplashScreenNodes() and .addNodesToStack-
Pane() , to modularize the Scene Graph node creation process as well as the adding of
 
 
Search WWH ::




Custom Search