• Home
  • Tutorials
    • Game Development Tutorial>
      • Unit 1: Beginning Java>
        • Before you begin...
        • Day 1: Setting Up
        • Day 2: Java Basics
        • Day 3: More Basics
        • Day 4: Java Math
        • Day 5: More Math
        • Day 6: If... else...
        • Day 7: More Control Flow
        • Day 8: Looping
        • Day 9: More on Looping
        • Day 10: Inheritance, Interface
        • Day 11: Threads and Graphics
      • Unit 2: Creating a Game I>
        • Day 1: Foundations
        • Day 2: Basic Framework
        • Day 3: Taking User Input
        • Day 4: Enter the Robot
        • Day 5: Background and Sprites
        • Day 6: Adding Enemies
        • Day 7: Shooting Bullets
        • Day 8: Animations
        • Day 9: 2D-Arrays
        • Day 10: Painting the Tilemap
      • Unit 3: Creating a Game II>
        • Day 1: Level Creation - Part 1
        • Day 2: Level Creation - Part 2
        • Day 3: Level Creation - Part 3
        • Collision Detection Basics
        • Day 4: Collision Detection Part 1
        • Day 5: Collision Detection Part 2
        • Day 6: Collision Detection Part 3
        • Day 7: Health System & Death
        • Day 8: Basic AI & Final Touches
      • Unit 4: Android Game Development>
        • Day 1: Introduction to Android
        • Day 2: Setting up for Development
        • Day 3: Creating our First Android Application
        • Day 4: Parts of an Android Application
        • Day 5: The Android Game Framework: Part I
        • Day 6: The Android Game Framework: Part II
        • Create an Android Game From Scratch (or port your existing game)
        • Day 7: Creating an Android Game (From Start to Finish)
      • Reference Sheet
    • Zombie Bird Tutorial (Flappy Bird Remake)>
      • Unit 1: Building the Game>
        • Introduction
        • Day 1: Flappy Bird - An In-depth Analysis
        • Day 2: Setting up libGDX
        • Day 3: Understanding the libGDX Framework
        • Day 4: GameWorld and GameRenderer and the Orthographic Camera
        • Day 5: The Flight of the Dead - Adding the Bird
        • Day 6: Adding Graphics - Welcome to the Necropolis
        • Day 7: The Grass, the Bird and the Skull Pipe
        • Day 8: Collision Detection and Sound Effects
        • Day 9: Finishing Gameplay and Basic UI
        • Day 10: GameStates and High Score
        • Day 11: Supporting iOS/Android + SplashScreen, Menus and Tweening
        • Day 12: Completed UI & Source Code
    • Android Application Development Tutorial>
      • Unit 1: Writing Basic Android Apps>
        • Before you begin...
        • Day 1: Android 101
        • Day 2: Getting to Know the Android Project
        • Day 3: The Development Machine
        • Day 4: Building a Music App - Part 1: Building Blocks
        • Day 5: Building a Music App - Part 2: Intents
        • Day 6: Building a Music App - Part 3: Activity Lifecycles
  • New Forum
  • About Us
    • Contact Us
  • Our Games
    • TUMBL: FallDown
  • Facebook
  • Twitter

      GAME DEVELOPMENT TUTORIAL: DAY 4-2: Setting Up for Development

Welcome to Day 2 of the Android Game Development Unit. In today's lesson, we will setup everything we need to develop for Android! 
Picture

Downloading the Files

To develop on Android, we need to make sure our computer has the following:

1. Java Development Kit
2. Eclipse
3. Android SDK
4. Eclipse ADT Plugin

Google has recently made it very easy to download items 2, 3, and 4 at once. If you already have Eclipse installed, you can opt for the "USE AN EXISTING IDE" option, but for ease and organization, I highly recommend that you just download the SDK ADT Bundle provided on the site below.

1. Go to this page (opens new window):
http://developer.android.com/sdk/index.html

2. Read the following conditions, agree to the terms, and select your operating system type. 
Picture
On Windows, you can find this by right clicking on Computer (or My Computer on older versions), and selecting Properties.
Picture
Look at System type for this information
Once you press "Download the SDK ADT Bundle for Windows" it will begin to download the 399 MB file. 
While your computer downloads that .zip file, let's talk about its contents! 

Contents of the SDK ADT Bundle

The file that you have downloaded includes the following:

1. Eclipse IDE
2. Android SDK
3. ADT Plugin for Eclipse

Since we are very familiar with Eclipse now, let's talk about the other two. Android SDK (software development kit) contains various tools and programs you need to develop on Android. It lets you download full Android verions (like Jelly Bean) that you can create an Emulator (or Virtual Device) with, and also contains various libraries that you can import from as you build on Android.

The ADT plugin acts as a bridge between the SDK and Eclipse. Once you install the ADT plugin to Eclipse, you will be able to access much of the Android SDK directly inside the Eclipse interface.

THE JAVA DEVELOPMENT KIT

Android is based in Java. You will be writing Java code like you have in the previous units to build your apps and games. Android requires that you use the Java 1.6 compiler. 

Java 7 is backward-compatible with Java 6 (1.6) so if you have that, you should be fine.

Let us first make sure that you have the correct version of Java installed.

1. Open up Eclipse (it can be any version. Does not have to be the one that you just downloaded).
2. Select Window >> Preferences >> Java >> Compiler, and make sure that you can select "Compiler compliance level" 1.6 as an option. 
Picture
If you are unable to select 1.6, click on "Installed JREs" to the left. You should be able to see what version of the JRE you have.
As long as you have jre6 OR jre7, you should be fine. If you know that you have these installed but cannot see it, click Add and navigate to its path, and select its directory. It should then appear, and you should be able to go back to the Compiler option and select 1.6.

If you do not have any compatible JREs, install one below:
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Selecting JDK 7 will be perfectly fine.

Extracting the Files

Once your Android SDK ADT Bundle is finished, extract it to a directory of your choice. I personally like to place this in my Desktop, but it's up to you.

As I said, this Bundle contains its own Eclipse. It has a cool new icon, splash loading box, and a wealth of good information for developers.

1. Open up the directory you extracted the Bundle to, and go to the eclipse folder, and run eclipse.exe.
2. Select a workplace of your choice. I recommend creating a new workplace to separate your code from the previous Units.
3. By now, you should be able to see this welcome screen (much better looking than the original Eclipse welcome screen IMO).  
Picture
Just like in Unit 1, we will pick up from here in the next lesson.

I hope you guys are very excited about this Unit! I know I am. The whole purpose of the other three Units was to get you all ready for the fun stuff: Android game development. And finally, we are ready to begin.
Feel free to email me questions at jamescho7@kilobolt.com

Picture
No source code is available for this lesson.
Go to Unit 4: Day 1
Go to Unit 4: Day 3
© 2014 Kilobolt, LLC. All rights reserved.