Jump to: navigation, search
The official logo of Android.

This article is about the Android operating system and developing and publishing games for it. Android support is in early development. Many features are missing or broken and it has not been tested on many devices.


Setup on Windows


Setting up the toolchain

Because ENIGMA is dependent on the standard library, it is impossible to use the NDK as it is. Because of this, we will use Cygwin to run a shell script to create a standalone toolchain which has support for the standard library.

  1. Run a Cygwin terminal as administrator
  2. Navigate to your NDK tools directory.
    • cd /cygdrive/c/android-ndk-r13b/build/tools
  3. Create the toolchain
    • export ANDROID_NDK_ROOT=/cygdrive/c/android-ndk-r13b
    • ./ --platform=android-14 --install-dir=/cygdrive/c/androidtoolchain --ndk-dir=$ANDROID_NDK_ROOT --system=windows-x86_64
  4. Update permissions so that ENIGMA will be able to access the toolchain
    • chmod -R 777 /cygdrive/c/androidtoolchain

If you are not running a 64 bit version of Windows, you will need to value passed to --system. Likewise, change the paths to your corresponding NDK and toolchain paths. You may change the platform API level if you wish, and an additional flag --toolchain can be used to specify your desired Android target. The default is Arm, with GCC 4.6.

Setting up ENIGMA

It is likely your folders are not setup the same way.

Setting up your game

  1. Start up ENIMGA/LateralGM.
  2. Load your game or create a simple test project
    • For a first-time test, I'd recommend something very simple, such as a single room with a color background, just to make sure it works.
  3. Change the compiler to the Android compiler.
    1. Open Enigma Settings (either by double-clicking the tree node or through the Enigma > Settings menu).
    2. Open the API tab, and locate the "Compiler" dropdown.
    3. Change the selected compiler to Android NDK.
      • The Platform, Graphics, and Audio settings should change automatically.
    4. Confirm your selection by clicking the Green Checkbox in the top-left corner.
  4. Compile/Run by clicking Engima -> Run or press the Run button.

Setup Another Platform

Compiling for Android from another platform (such as Mac OSX or Linux) has not been tested but should be functionally similar to the setup for Windows. Install the SDK and NDK as described above and run the shell script to create the custom toolchain.

  1. Download and install the Android SDK and Android NDK
  2. Run android-ndk-r13b/build/tools/ as described above. If your environment variables are already setup correctly, you may not need to export ANDROID_NDK_ROOT, or pass the --ndk-dir and --system options.
  3. Copy Compilers/Windows/Android.ey to your platform's directory
  4. Modify the path, make, cc, and ccx keys with the location of your toolchain and NDK

Work In Progress

The Android project is in the early stages of development. Currently, the engine does not even fully compile

TODO list:

See Also

Personal tools