Game Development Reference
In-Depth Information
NetBeans 8.0 Is a Speed Freak: Optimize the Code
with a Profiler
NetBeans also has something called a Profiler , which looks at your Java 8 code while
it is running and then tells you how efficiently it uses memory and CPU cycles. This
allows you to refine your code and make it more efficient in its use of key system re-
sources, which is quite important for Java 8 game development, as this will affect the
smoothness of game play on systems that are not as powerful (e.g., on single- and dual-
core CPUs).
This Profiler is a dynamic software analysis tool, as it looks at your Java code
while it is running , whereas the FindBugs code analysis tool is a static software ana-
lysis tool, as it simply looks at your code in the editor , when it is not compiled and
running in system memory. The NetBeans Debugger will allow you to step through
your code while it is running, so that tool can be viewed as a hybrid that ranges from a
static (editing) to a dynamic (executing) code analysis mode.
After you create the foundation for your Java 8 (JavaFX) game engine (in the fol-
lowing sections), you will run the Profiler to see how it works inside NetBeans IDE
8.0. I am going to present as many key features of NetBeans as possible up front so that
you get comfortable with this software.
Creating Your Java 8 Game Project: The
InvinciBagel
Let's get down to business and create the foundation for your game. I am going to
demonstrate how to create an original game so that you can see the process involved in
developing a game that does not yet exist, as opposed to most game programming
topics, which replicate games that are already on the market. I got permission from my
client Ira Harrison-Rubin, cartoonist/author/humorist for the BagelToons franchise,
to let readers to see the process of creating his InvinciBagel cartoon game during the
course of this topic.
Click the Quick Launch icon on your taskbar (or double-click the icon on your
desktop) to launch NetBeans 8.0, and you will see the NetBeans start-up screen, illus-
trated in Figure 2-2 . This screen contains a progress bar (in red) and will tell you what
is being done to configure the NetBeans IDE for use. This involves loading the various
 
Search WWH ::




Custom Search