28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5<br />

An Introduction to Game Design:<br />

Concepts, Multimedia, and Using<br />

Scene Builder<br />

In this chapter, you will build on your knowledge of the <strong>Java</strong>FX multimedia engine by learning about the optimal way<br />

to use the scene graph paradigm in <strong>Java</strong>FX and take a look at <strong>Java</strong>FX Scene Builder tool and FXML, and why<br />

(or why not) to use these in certain types of <strong>Java</strong> game development scenarios. You will also examine basic game<br />

design optimization concepts, and the types of games, as well as game engines, that are available for the <strong>Java</strong> platform,<br />

including physics engines, such as JBox2D and Dyn4J, and 3D game engines, such as LWJGL and JMonkey. Finally,<br />

you will consider the new media concepts that you will need to understand to integrate digital imaging, digital audio,<br />

digital video, and animation into your game production pipeline. We will also look at some of the free open-source<br />

multimedia production tools that you installed back in Chapter 1, and can now use to create <strong>Java</strong> 8 games.<br />

First, you will revisit the underlying concept of static (fixed) versus dynamic (real time), which was covered in<br />

Chapter 3 (constant versus variable) and Chapter 4 (pulse) and which is one of the foundational principles of game<br />

optimization. This is important, because you will want your game to run smoothly across all the different platforms<br />

and devices that are used to play it, even if the device only uses a single processor (which is actually rare these days,<br />

with most devices featuring dual core (two processor) or quad core (four processor) CPUs).<br />

Next, you will study the concepts, techniques, and lingo of game design, including sprites, collision detection,<br />

physics simulation, background plates, animation, layers, levels, logic, and AI. You will also examine the different<br />

types of games that can be designed, and how they differ from each other.<br />

Then, you will explore the role that multimedia assets play in today’s visually (and aurally) impressive games. You<br />

will learn about the principles of digital imaging, digital video, and animation as well as digital audio, as you will be<br />

using many of these new media asset types over the course of the book, and will need this foundational knowledge to<br />

be able to work with them.<br />

Finally, you will take an in-depth look at the bootstrap <strong>Java</strong>FX application code that you generated in Chapter 2<br />

and at how the <strong>Java</strong> .main() method and the <strong>Java</strong>FX .start() method create the primaryStage Stage object, using the<br />

Stage() constructor method, and, inside that, create a Scene object named scene, using the Scene() constructor<br />

method. You will look at how to use methods from the Stage class to set the scene, title the stage, and show the stage<br />

as well as how to create and use StackPane and Button class (objects) and how to add an EventHandler to a button.<br />

www.it-ebooks.info<br />

101

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!