Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 2 ■ an IntroduCtIon to Content CreatIon: 2d new MedIa asset FundaMentals

If you have not done this yet and don’t feel like doing it now, I will show you how to do that in the
chapter where we learn how to use the AudioClip, Media, and MediaPlayer classes to add digital audio
elements to your Java 9 game environment. It’s really quite simple; all that you have to do is to download
these plug-ins and place them in the correct plug-ins folder underneath the primary Audacity software
installation folder so it’s not difficult to add effects.


Summary


In this second chapter, we took a closer look at some of the more important 2D new media concepts that we
will be using in our pro Java game and IoT development work process so that you have a solid foundational
knowledge for these 2D multimedia assets that JavaFX 8 support has taken care of adding to your Java 9
environment. Note that Java and JavaFX releases are not synchronized, so for instance Java 6 used JavaFX 1.x
and Java 7 used JavaFX 2.x. They are getting closer to synchronizing the releases, as Java 8 used JavaFX 8, but
the focus in Java 9 is modularizing the language, and not on JavaFX 9, so for now, the Java 9 platform may
start out using JavaFX 8 technology.
I started out covering the most important and foundational 2D new media concepts as they relate to
Java FX 8, which is the new media engine for Java 8 and Java 9, as well as to Android, iOS, Windows, Linux
OS, and HTML5 development, for that matter. New media concepts are as important to understand for
games developers as Java 9 and JavaFX coding practices, as new media makes your game more immersive,
compelling, and visually exciting. I have a series of new media “fundamentals” books at http://www.apress.com
if you want to dive deeper into these new media topics. Each of the books focuses specifically on one new
media vertical (audio, video, VFX, illustration, painting, etc.).
Since 3D is considerably more complex, I saved that foundational information for Chapter 3 ; I wanted
to keep the chapters in this book at reasonable lengths to optimally digest all of this technical information.
3D and i3D new media assets are distinctly different from 2D and i2D new media assets, as these add an
entirely new dimension, depth data, and the z-axis to the already complex undertaking of scratch new media
content creation. This serves to turn basic 2D (area) math into vector or matrix algebra (BA level to MS or
PhD level); thus, 3D is an order of magnitude more complex than 2D.
We also took a look at some fairly advanced digital imaging concepts, JavaFX-supported formats,
techniques, and data footprint optimization. This information will allow you to extract the maximum utility
and performance from every pixel you utilize inside of your pro Java games or IoT applications.
You learned all about pixels, resolutions, and how aspect ratios define the shape of an image,
animation, or video, as well as about color depth, layers, channels, and how alpha channel transparency
allows you to implement image compositing pipelines. You learned how to define colors, as well as alpha
channel transparency values, by using hexadecimal notation. We looked at advanced digital imaging
concepts such as masking, dithering, anti-aliasing, and blending and transfer modes.
Next, we looked at the fourth dimension of time and learned about how frames, frame rates, and bit
rates are used in conjunction with the concepts that we learned about in the digital imaging section to add
motion to our new media assets, creating 2D animation or digital video. We looked at different formats and
the codecs that encode them and looked at some of the software packages that will edit and encode digital
video, such as DaVinci Resolve, Lightworks, and Sorenson Squeeze.
Finally, we looked at digital audio, and we learned about sampling frequency and sampling resolution,
as well as the MP3 and PCM audio formats supported by JavaFX, and how to use these codecs to optimize
digital audio to use the least amount of system memory. We looked at how to get the smallest data footprint
for our pro Java 9 games and IoT applications, while still putting a high-quality product into the game and
app stores.
In the next chapter, we’re going to take a look at the 3D and i3D concepts, principles, formats,
optimization, and work processes that we will be using for your pro Java 9 games and IoT applications. You
will get a feel for how complex 3D is relative to 2D new media assets, as we look at things such as 3D character
modeling, bones, rigging and animation, particle systems, physical systems (physics forces), fluid dynamics,
visual effects (VFX) and special effects (SFX), texture mapping, shaders, and UVW mapping coordinates.

Free download pdf