Game Development Reference
In-Depth Information
OpenGL ES 2.0 has a so-called “shader-based,� or programmable, pipeline as opposed to
the fixed-function pipeline of OpenGL ES 1.0 and 1.1. Newer specs of OpenGL ES, such as
3.0, follow the same model and are backwards compatible with 2.0, so we just refer to them
collectively as 2.0. For many 3D (and 2D) games, OpenGL ES 1.x is more than sufficient. If you
want to get fancy, though, you might want to consider checking out OpenGL ES 2.0! Don't be
afraid—all the concepts you learned in this topic are easily transferable to the programmable
pipeline.
There is a Google-supported library for Android called Renderscript, which is a high-level
interface for building flashy OpenGL ES 2.0-based effects without all of the pain of implementing
them using its tedious API. Don't get us wrong—OpenGL ES 2.0 is great, and we have plenty of
experience with it—but Renderscript certainly provides an easier way of creating many graphics
effects, and it is at the heart of many of the default Live Wallpapers that ship with stock versions
of Android.
We also haven't touched on topics such as animated 3D models and some more-advanced
OpenGL ES 1.x concepts such as vertex buffer objects. As with OpenGL ES 2.0, you can find
many resources on the Web, as well as in book form. Smithmick and Vernma's Pro OpenGL ES
for Android (Apress, 2012) has more in-depth information and a chapter on 2.0. You know the
basics. Now it's time to learn even more!
Frameworks and Engines
If you bought this topic with little prior game development knowledge, you may have wondered
why we didn't choose to use one of the many pre-existing frameworks available for Android
game development. Reinventing the wheel is bad, right? Not if you want to understand the
principles thoroughly. Although learning them may be tedious at times, it will pay off in the end.
It will be so much easier to pick up any precanned solution out there when you are armed with
the knowledge you gained here, and it is our hope that you'll recognize the advantage that
gives you.
For Android, several commercial and noncommercial open source frameworks and engines
exist. What's the difference between a framework and an engine?
ï?®
A framework gives you control over every aspect of your game development
environment. This comes at the price of having to figure out your own way
of doing things (for example, how you organize your game world, how you
handle screens and transitions, and so on). In this topic, we developed a
very simple framework upon which we build our games.
ï?®
An engine is more streamlined for specific tasks. It dictates how you should
do things, giving you easy-to-use modules for common tasks and a general
architecture for your game. The downside is that your game might not fit the
precanned solutions the engine offers you. Oftentimes, you'll have to modify
the engine itself to achieve your goals, which may or may not be possible
depending on whether the source code is available. Engines can greatly
speed up initial development time, but they might slow development to a
grinding halt if you encounter a problem for which the engine was not made.
 
Search WWH ::




Custom Search