Android Game Programming Eclipse Overview

This is a brief overview of the Eclipse IDE as you will pick up a number of tips and short cuts as you need them.   Before you start Eclipse must have Java runtime installed.  You will need at least Java version 6 or higher installed to use these lessons. 

Java runtime environment can be downloaded from the Oracle web site.  Make sure that you select the correct version for your operating system and the correct 32 or 64 bit version.

When you have Eclipse downloaded double click on the Eclipse icon.  If you downloaded the Windows version then double click the eclipse.exe icon.  For Mac and Linux users just double click on the file where you extracted the contents.

When Eclipse starts up you are presented with a dialog box asking you to select a workspace.  The workspace is the physical location on your hard drive where all your Eclipse projects will be stored.

Eclipse Workspace Launcher

When a project is created it will be stored in the path about, assuming you are using Windows.  If you were to create a project called SpaceMission, the path would look like

C:\Users\Cynic\workspace\SpaceMission

Each Eclipse project will contain source code, resources including images, music, text file, xml files, binary files and configuration files.

Accept the default workspace location and click the OK button.

Eclipse is a large program and these tutorials will not give you an in depth guide but will give you a basic knowledge of what is required in order to achieve the task.  There are many books and tutorials available for Eclipse.  The book below is a great resource for learning Eclipse but isn’t required this tutorial.

Eclipse IDE Book
Eclipse IDE based on Eclipse 4.2 & 4.3 by Lars Vogel

 

Looking at the screenshot below you can determine that a large number of features are available.  Your version may appear differently but this will give you an idea of what to expect of Eclipse.

Eclipse IDE

Eclipse IDE

Number 1 in the screenshot is where the projects or packages are stored.  This is known as the Package Explorer.  Your files will be stored in this location under the name of the project.  Here you can see that the project open is called MOS.

Eclipse Package Explorer

Eclipse Package Explorer

The folder below this is src which contains our source code for the program.  Any images and music that you will use will also be stored in this area although it will be in difference locations.

Number 2 contains the area which displays our source code of the file you are working on.  You can see that the code is highlighted in different colours.  Eclipse is letting you know that some of these words are reserved java keywords while others are information that the user has typed.

Eclipse Source Code

Eclipse Source Code

Number 3 outlines your code as you create variables, functions and activities.  This will allow you to quickly jump to the variable or function that you need.

Eclipse Outline

Eclipse Outline

Number 4 reserves an area so that you can see console, error logs, warnings etc when you are debugging code.  This is also a good resource when you need to see what programs are running on your phone and what they are doing.

Eclipse Debugging

Eclipse Debugging

 

Android game programming Hello World

Next Android Game Programming Lesson – Day 2.1 >>