Game Development Reference
In-Depth Information
ï?®
File location does matter, and there is no virtualization of locations
equivalent to groups. It's as if all folders are folder references, and the only
way to not include files is to set up exclusion filters.
ï?®
Settings are per-workspace, so you can have several workspaces each
with different settings. This is very useful when you have both personal and
professional projects and you want to keep them separate.
ï?®
Eclipse has multiple perspectives The current perspective is identified by the
active icon in the upper-right area of the Eclipse window, which is Java by
default. As discussed in Chapter 2, a perspective is a preconfigured set of
views and some associated contextual settings. If things seem to get weird
at any point, check to make sure you are in the correct perspective.
ï?®
Deploying is covered in this topic, but it is not like changing the scheme or
target as you do in Xcode. It's an entirely separate operation that you do via
the right-click context menu for the project (Android Tools ➤ Export Signed
Application Package).
ï?®
If code edits simply don't seem to be taking effect, most likely your Build
Automatically setting is turned off. You will usually want that enabled for
desired behavior (Project ➤ Build Automatically).
ï?®
There is no direct equivalent to XIB. The closest thing is the Android layout,
but Android doesn't do outlets like XIB does, so just assume you'll always
use the ID convention. Most games don't need to care about more than one
layout, but it's good to keep in mind.
ï?®
Eclipse uses mostly XML-based configuration files in the project directory to
store project settings. Check for “dot� files like .project if you need to make
changes manually or build automation systems. This plus AndroidManifest.xml
is very similar to the project.pbxproj file in Xcode.
Android API Basics
In the rest of the chapter, we'll concentrate on playing around with those Android APIs that are
relevant to our game development needs. For this, we'll do something rather convenient: we'll
set up a test project that will contain all of our little test examples for the different APIs we are
going to use. Let's get started.
Creating a Test Project
From the previous section, we already know how to set up all our projects. So, the first thing we
do is to execute the eight steps outlined earlier. Create a project named ch04-android-basics ,
using the package name com.badlogic.androidgames with a single main activity called
AndroidBasicsStarter . We are going to use some older and some newer APIs, so we set the
minimum SDK version to 3 (Android 1.5) and the build SDK version to 16 (Android 4.1).
You can fill in any values you like for the other settings, such as the title of the application.
From here on, all we'll do is create new activity implementations, each demonstrating parts of
the Android APIs.
 
Search WWH ::




Custom Search