Game Development Reference
In-Depth Information
Need An OpenGL Refresher?
For this chapter, you'll need a basic understanding of OpenGL. If your OpenGL is a bit rusty, I suggest
referring to the best tutorials I have found on the Web:
Greg Sidelnikov's tutorial about the OpenGL coordinate system. It covers the basics
such as perspectives, orthographic projections, 3D camera, graphics pipeline,
variable and function naming conventions, and more. It is a good place to start:
http://www.falloutsoftware.com/tutorials/gl/gl0.htm
If you are confused about OpenGL projections, MathWorld has some good
information about all kinds of 3D projections used in OpenGL:
http://mathworld.wolfram.com/OrthographicProjection.html
NeHe Productions has compiled a comprehensive set of tutorials that cover pretty
much everything you need to write an OpenGL application. These are very popular:
http://nehe.gamedev.net/
The Power of Mobile Devices
Mobile Android devices have become pretty powerful for graphics development. Check out the following
hardware stats for the T-Mobile G1:
ARM processor running at 500MHz
Graphics processing unit (GPU) with 256KB of RAM
320-by-480 pixel display
To make good use of the GPU, Google has included the OpenGL Embedded System (ES) within
Android. OpenGL ES provides the software API to make high-performance, hardware-accelerated games
possible. This is a Java API, which is good news for Java developers who wish to create 3D games from
scratch, but bad news for C developers who wish to reuse 3D engines written in C. 3D game engines are
very complex and large, and are mostly written in C. Rewriting these engines in Java would be a very
difficult task, consuming significant development and time resources.
Consider how easy it is to reuse OpenGL code in C. Let's look at another powerful smart phone:
Apple's iPhone. If you search the iPhone App Store (or the Web), you will find that dozens of OpenGL-
based 3D games have already been ported to the platform, including some of the greatest 3D shooters
for the PC: Wolfenstein 3D, Doom, and Quake I. Even Quake III Arena—a game that has extremely
advanced 3D graphics for a mobile device—has been ported! What do all these games have in common?
They are written in C. Furthermore, Apple provides a C toolchain that makes it easy to have the games
running in the platform. Clearly, Android is at a big disadvantage in this field. Nevertheless, porting
these games to Android is still possible.
Even though Android supports only Java development, the Android OS is built in a stripped version
of GNU Linux featuring a C runtime. Using an ARM C toolchain, you can write and compile C code and
bind it to Java using JNI.
Search WWH ::




Custom Search