Game Development Reference
In-Depth Information
C H A P T E R 1
■ ■ ■
Welcome to Android Gaming
Welcome to the world of Android Games ! The goal of this topic is to help you build the best games for the
platform. As you work your way through the chapters, you will learn how to create two kinds of games:
pure Java, and perhaps most interestingly, hybrid games that combine the elegant design of Java with
the raw power of C for maximum performance. The ability to combine both Java and C in this way is
what makes the games in this topic unique, as Google does not support this kind of development. But
you may ask, “Why even bother with hybrid games?” After all, Java provides all the APIs you need to
build any kind of game. This is certainly true. However, there are thousands of games out there written
in C that can be brought to Android by compiling the C core and wrapping a Java graphical user
interface (GUI) using the Java Native Interface (JNI). In this topic, you'll learn how to bring to the
platform two of the great 3D shooter games for the PC: Wolfenstein 3D and Doom.
The bottom line? My goal is to bring to you the latest documented and undocumented secrets to
building games for Android. Furthermore, if your plan is to port a PC game, this topic will provide you
with invaluable expertise to do so. But before we get started, there are some things you need to know to
get the most from this topic.
What Skills Do You Need?
In this topic, I am targeting seasoned game developers, not only in Java, but also in C. This makes sense,
as performance is critical in game development. Java provides elegant object-oriented capabilities, but
only C gives you the power boost that game development needs. This is the best of both worlds in the
palm of your hand. This topic assumes you are familiar with Android, as well as Linux and shell scripting.
A Solid Foundation of Android
This topic assumes that you already know the basics of Android development. For example, you need to
know what activities, views, and layouts are. Consider the following fragment. If you understand what it
does just by looking at it, then you are in good shape.
public class MainActivity extends Activity
{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Search WWH ::




Custom Search