Game Development Reference
In-Depth Information
Chapter 7
3D Shooters for Quake II
This chapter builds upon the previous one to deliver the next great and popular PC engine:
Quake II. Quake II is the first-person shooter video game developed by id Software and
distributed by Activision. What makes this chapter unique is that, thanks to the wonderful
reusability of Java and the power of the C language, you can do the following:
Reuse the thin Java wrappers to the Quake engine from Chapter 6 with
no changes whatsoever.
Keep 99% of the native engine intact with the help of NanoGL.
Make tiny changes to the C code in the remaining 1% of the native
engine in order to make it Android-friendly.
You'll start by learning how to set nimble Java wrappers to get the engine running quickly
in Android, including game startup, video rendering, and key and audio events. Next, you'll
look at an efficient way of dealing with system errors (the ones that can crash your app).
Then, you'll learn about the video handler changes required for the native engine. And finally,
you'll tackle building the native code and running it in the emulator, plus learning how to run
performance tests on the engine running on multiple devices at different resolutions.
Note All the code included in this chapter was developed, compiled and tested using Eclipse IDE
for Java Developers instead of Android Studio 1.0.1 since, when this manuscript was written, NDK
and JNI were not supported by Android Studio.
Reviewing the Code
To get an idea of the amount of work you will save, let's take a look at the number of lines of
C code for the engine.
231
 
 
Search WWH ::




Custom Search