A Basic Knowledge of Linux and Shell Scripting
For the chapters dealing with the hybrid games, you will do the work within Ubuntu Linux, so dust off all those old Unix skills. You should know the basic shell commands, such as those for listing files, installing software components (this can be tricky, depending on your Linux distribution), and basic system administration. There are a few very simple shell scripts in this book. A basic knowledge of the bash shell is always helpful.
This chapter kicks things off by explaining how to set up your environment to compile hybrid (C/Java)
games. This includes the development IDE (Eclipse) and the Android SDK, which are the tools required
to build any basic Android application. This information is critical if you wish to learn how to combine
the elegant object-oriented features of Java with the raw power of C for maximum performance, and it is
required when we build Doom and Wolfenstein 3D in later chapters. The following software is assumed to be already installed on your desktop:
• VMware Player or Workstation: This is required to run a Linux virtual machine (VM). VMware is available for free from the VMware download site (http://www.vmware.com/products/player/).
• Ubuntu Linux VMware appliance: This is the actual Linux operating system (OS), where all development will take place. If you don’t have it, appliances are available for download for free from the VMware Virtual Appliance Marketplace (http://www.vmware.com/appliances/). Note that the appliance can be quite large
(600+MB).
• Eclipse: This is the development IDE used to create your projects. Version 3.3 (Europa), 3.4 (Ganymende), or 3.5 (Galileo) will do.
• Android SDK, properly configured: At the time of this writing, the latest version of the SDK is 1.6. You’ll use the Android Debug Bridge to connect to the device. Unzip the SDK to your favorite folder. Make sure you add the command-line tools to the PATH of your system. Edit the file .bashrc in your home directory, and modify the PATH environment variable: PATH=[PATH_TO_SDK]/tools:$PATH. Now you should be able to start and connect to the emulator from the command line. For a simple test, open a terminal and type adb. You should see the tool’s help text on your screen.
• Java JDK 5.0 or later: This is required to run Eclipse and the Android SDK itself. We’ll begin by setting up the Ubuntu VM with the required software. Log in, and let’s get started.
0 comments:
Post a Comment