Game Development Reference
In-Depth Information
Figure 7-17 . Use a Profile
Profile Project menu sequence to start the Profiler, and look at GamePlayLoop
memory use
As you can see, it only takes a fraction of a millisecond to initialize each of the
event queues, including the pulse event, and all four ActionEvent EventHandler event
processing queues. This is in keeping with our maximum game optimization approach,
using static Scene Graph nodes and not doing anything inside the GamePlayLoop that
will use up any more system resources (memory and processing cycles) than are abso-
lutely necessary to accomplish the various tasks that you will be building up as you
create your action-filled arcade game.
Now that you have created and started your GamePlayLoop object, let's take a look
at the Threads Profiler!
Again, scroll down in the Profiler tab, shown at the top left of Figure 7-17 , and find
the Threads icon, which is displayed at the top- left of Figure 7-18 . NetBeans will ask
you if you want to start the threads analysis tool; once you agree, it will open the
Threads tab. As Figure 7-18 illlustrates, the pulse engine is running, and several pulse
events are shown for Thread-6. Interestingly, once JavaFX ascertains that the .handle()
method is empty, the pulse event system does not continue to process this empty
.handle() method and use unnecessary pulse events, indicating that the JavaFX pulse
event system has some modicum of intelligence.
Figure 7-18 . Click the Threads icon, seen at the left side of the screen, and open a Threads tab; AnimationTimer
pulses can be observed on Thread-6
 
 
Search WWH ::




Custom Search