Game Development Reference
In-Depth Information
to call it an engine ). This is due to the power that it brings to implementing user inter-
face (UI) and user experience (UX) “wins” in your Java 8 applications (in this case,
games). So, bear with me in these foundational chapters detailing how to master your
IDE (NetBeans 8.0), your programming language (Java 8), and this new media engine
(JavaFX 8) that is now a part of the Java 8 programming platform that is rapidly grow-
ing in power and popularity internationally.
Once you have examined how JavaFX 8.0 comes together at the highest level (just
like you did in Chapter 3 ), you will consider some of those key classes that you might
be using to construct Java 8 games, such as the Node class as well as the Stage, Scene,
Group, StackPane, Animation, Layout, Shape, Geometry, Control, Media, Image,
Camera, Effect, Canvas, and Paint classes . You have already studied the JavaFX
Application class (see Chapters 2 and 3 ), so now you will focus on the classes that can
be used to build complex multimedia projects, such as Java 8 games.
Finally, you will take an in-depth look at the bootstrap JavaFX application that you
generated in Chapter 2 , and at how the Java .main() method and the JavaFX .start()
method create the primaryStage Stage object, using the Stage() constructor method,
and, inside of that, create your Scene object named scene , using the Scene() construct-
or method. You will explore how to use methods from the Stage class to set the scene
and title and show the Stage as well as how to create and use the StackPane and But-
ton class (objects), and add an EventHandler to a Button .
Overview of JavaFX: From Scene Graph
Down to OS
As in the previous chapter, on Java 8, I am starting this overview of JavaFX at the
highest level, with the Scene Graph API and with visual editing tools, which are con-
tained in a JavaFX application called Scene Builder , which we will not be using
(Scene Builder is for application UI design not game design); we will use GIMP in-
stead. As you observed in Chapter 1 (see Figure 1-5 ) , Scene Builder is integrated into
NetBeans 8.0 (JavaFX is listed as being supported specifically for use in NetBeans,
primarily because Scene Builder has been made an integral part of NetBeans GUI).
As Figure 4-1 demonstrates, these JavaFX application-building tools exist “ on top
of ” the JavaFX 8 API (a collection of javafx packages, such as javafx.scene and
javafx.application ), which is what ultimately allows you to build (using Scene Graph)
and UI design (using Scene Builder) your JavaFX new media creations (in this case, a
Java 8 game). Note that the JavaFX 8.0 API is connected (here, using steel bearings, to
 
Search WWH ::




Custom Search