28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 5 ■ An Introduction to Game Design: Concepts, Multimedia, and Using Scene Builder<br />

debugged. A significant opportunity also exists for developing new types of game genres that use a hybrid<br />

combination of static and dynamic game play in creative new ways that have never before been seen. I am working<br />

on a few of these myself!<br />

Because this is a <strong>Java</strong> 8 programming title, I am going to approach everything from this standpoint, which<br />

happens to be a great way to divide games into discrete categories (static, dynamic, hybrid), so let’s cover the static<br />

(fixed graphics), turn-based games first. These include board games, puzzle games, knowledge games, memory<br />

games, and strategy games, all of which should not be underestimated in their popularity and marketability.<br />

The thing that is cool about static games is that they can be just as fun to play as dynamic games and have<br />

significantly less processing overhead, as they do not have to achieve the 60FPS real-time processing target to achieve<br />

smooth, professional game play. This is because the nature of the game is not predicated on motion at all, but rather<br />

on making the right strategic move, but only when it is your turn to do so.<br />

There can be some forms of collision detection involved in static games regarding which game piece has been<br />

moved to a given location on the gameboard or playing surface; however, there is no danger of overloading the<br />

processor with collision detection, because the rest of the game board is static, with the exception of the one piece<br />

that is being strategically moved during that particular player’s turn.<br />

The processing logic for strategy games is more strategy logic–based programming, geared toward allowing the<br />

players to achieve an end win, given the right sequence of moves, whereas the dynamic game programming logic<br />

looks more at what collisions are taking place between game sprites. Dynamic games are focused on point score,<br />

dodging projectiles, finding treasures, completing level objectives, and killing enemies.<br />

Complicated strategy games with lots of interrelated rules, such as chess, are likely to have far more programming<br />

logic routines than dynamic games. Yet, because the execution of the code is not as time sensitive, the resulting game<br />

play will be smooth, no matter how powerful the platform and CPU are. Of course, the game rule set logic must be<br />

flawless for this type of game to truly be professional, so, in the end, both static and dynamic games are difficult to<br />

code, albeit for different reasons.<br />

Dynamic games could be termed action games or arcade games and include a lot of movement on the display<br />

screen. These highly dynamic games almost always involve shooting things, such as in the first-person shooter<br />

(e.g., Doom, Half-Life) as well as in the third-person shooter (Resident Evil, Grand Theft Auto) genres, or stealing<br />

things, or evading things. There is also the obstacle course navigation paradigm, commonly seen in platform games,<br />

such as Donkey Kong and Super Mario.<br />

It is important to note that any genre of game can be produced using 2D or 3D graphics and assets or even a<br />

combination of 2D and 3D assets, which, as I pointed out in Chapter 4, is allowed by <strong>Java</strong>FX.<br />

There are so many popular game types that there is always the opportunity to create an entirely new genre of<br />

game by using a hybrid approach of a static (strategic) game type and a dynamic (action) game type.<br />

Game Design Assets: New Media Content Concepts<br />

One of the most powerful tools you have to make your game highly professional and desirable to buyers is the<br />

multimedia production software that you downloaded and installed back in Chapter 1. Before I go any further, I need<br />

to spend some time providing you with foundational knowledge regarding four primary types of new media assets<br />

that are supported in <strong>Java</strong> 8, using the <strong>Java</strong>FX 8 multimedia engine: digital images, used for sprites, background<br />

imagery, and 2D animation; vector shapes, used in 2D illustration, collision detection, 3D objects, paths, and curves;<br />

digital audio, used for sound effects, narration, and background music; and digital video, used in games<br />

for animated background loops (birds flying through the sky, drifting clouds, and so on) once highly optimized.<br />

As illustrated in Figure 5-1, these four major genres, or areas, are all installed via the <strong>Java</strong>FX Scene Graph, using<br />

packages that I described in Chapter 4. Some of the primary classes that will be used are ImageView, AudioClip,<br />

Media, MediaView, MediaPlayer, Line, Arc, Path, Circle, Rectangle, Box, Sphere, Cylinder, Shape3D, Mesh,<br />

and MeshView.<br />

www.it-ebooks.info<br />

105

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

Saved successfully!

Ooh no, something went wrong!