The first steps to becoming an Android game programmer is configuring your development environment on your PC. There are more steps than visiting the Android website and downloading an installation package. There are other vendors than Android that produce tools and resources that are useful for Android app/game development. Android has tried to solve this with their development of Android Studio. However, for game development Android Studio (currently) falls short, lacking features and resources that are useful in game development.
Fortunately, by downloading and configuring the few outlined software packages below, will give you everything you need to develop UFO Tap Attack and/or your first Android game.
Java Development Kit
The fist step of configuring an Android development environment is the installation of the Java Development Kit (JDK). UFO Tap Attack was created with JDK version 8u112.
The main programming language of Android apps and games is Java. Java requires the JDK to translate the Java source-code into an intermediate build. Interpreted languages such as Java takes two main steps within its build process, an intermediate build is step one. The second step requires the user’s machine to translate the intermediate build into machine code. The Java Virtual Machine (JVM) performs the translation process during run-time or pre-run-time of the app or game.
An app or game built using Java (in most cases) can run on any machine or device as long as that machine or device has a JVM installed on it. That means a single intermediate build with Java can run on platforms such as Windows, Linux, Mac, and Android. However, machine binaries built from languages such as C and C++ process faster than intermediate builds translated by a JVM during run-time. Also, if the Java source-code attempts to communicate with the OS through OS specific function calls or attempts to have direct communications with a device’s hardware then the language looses its main selling point of portability.
Android Studio and Android SDK
The second step is to install Android Studio and Android’s software development kit (SDK). (Windows, Mac OS X, Linux) The Android SDK installation path must not have any white spaces within its directory path on Windows platforms, such as C:\DevTools\Android\SDK. UFO Tap Attack was developed with Android Studio Bundle 220.127.116.11.
Android Studio is Android’s interactive development environment (IDE). The IDE is a developer’s tool for interfacing with source-code so the developer can make an Android app using the Java programming language. This is similar to how a student uses MS Word to write a term paper. The Android SDK allows developers to use resources, libraries and application programming interfaces (APIs) to interface the developed app or game with an Android device’s OS and hardware resources.
Setup the relating Windows Environment Variables
The third step is setting up the Windows Environment Variables.
To create the variables click on Windows Start Menu
Within the “Search programs and files” text box; type “Edit the system environment variables” and select the app at the top of the list, to bring up the System Properties dialog.
On the Advanced tab click the button “Environment Variables…”.
Click the New button, under the title System variables, to create a system variable that points to the installation director of the JDK, named JDK_HOME.
Again, click the New button, under the title System variables, to create a system variable that points to the installation director of the Android SDK, named ANDROID_SDK.
Once more, click the New button, under the title System variables, to create a system variable that points to the installation director of the Android NDK, named ANDROID_NDK.
Optionally, you can set the path of where the Android emulators and related information are stored by clicking the New button, under the title User variables and creating a variable named ANDROID_SDK_HOME. If the variable is not set then the default path of where the emulators will be stored is C:\Users\<username>\.android.
Prepend %JDK_HOME%\bin;%ANDROID_SDK%\tools;%ANDROID_SDK%\platform-tools;, at the beginning of the PATH environment variable.
Configuring and updating the Android SDK
The fourth step is the configuration and updating the Android SDK through the SDK manager.
Through Windows Explorer, navigate to the directory where the Android SDK was installed; and execute ‘SDK Manager.exe’.
Within the SDK manager select the filter (in the lower left hand corner) Update/New.
Within the checkbox list select all of the Tools.
Also within the checkbox list select all of the Extras.
Expand each Android API and check ‘SDK Platform’, ‘Google APIs’ and ‘Sources for Android SDK’.
The next step is selecting the emulator images that UFO Tap Attack will be tested against. As a note, these images are hard-drive hungry for memory space. So the listed downloads are the minimum to see UFO Tap Attack to run. From Android 4.4.2 (API 19) and up select the system images: ‘Google APIs ARM EABI v7a System Image’ and ‘ARM EABI v7a System Image’.
Finally, in the lower right hand corner select the install button; and then go order a pizza and perhaps watch a few episodes of STNG on Nexflix. The installation will take a while to complete.
Congrats! You have successfully setup an Android game development environment! You are now ready to make Android apps and games. For our next step, we will test the dev environment by creating your first native program, in the next step within this tutorial series.
Thank you for reading our work. Please leave any questions and comments, below.