Game Development Reference
In-Depth Information
Figure 7-22 . Run the Threads Profiler
Given the empty .handle() method processing from the GamePlayLoop object in
Thread-6 (see Figure 7-18 ), you can assume that the pulse events in Thread-6 are from
the GamePlayLoop AnimationTimer subclass. This means that the pulse events show-
ing in the JavaFX Application Thread are showing where the .handle() method is ac-
cessing a buttonContainer HBox object contained in a stackPane Scene Graph root in
the InvinciBagel class.
Now, you have a low-overhead, extremely fast game processing loop in place, and
you can start to create your other (sprite, collision, physics, scoring, logic, and so on)
game engines! One down, and a whole bunch to go!
Summary
In this seventh chapter, you wrote the first of the many game engines that you will be
designing and coding over the course of this topic, the GamePlayLoop game play tim-
ing class and object, which allow you to tap into the powerful JavaFX pulse event pro-
cessing system.
First, you examined the different classes in the javafx.animation package and the
different ways to use the Animation , Transition , Timeline , and AnimationTimer
classes to harness the JavaFX pulse event processing system.
 
Search WWH ::




Custom Search