Running on Android and iOS

Ethanon engine is designed to run its projects seamlessly across multiple platforms. Running Ethanon games on mobile platforms requires specific third-party software. Also, some basic understanding on Android or iOS development is highly recommended.

All project files and source code glue required to start the Ethanon machine on mobile platforms are in the Git folders and their specific locations will be listed below. No additional programming is necessary to run the project and deploy it to the target device. On the other hand, developers will often like to customize the platform-specific code to fit all their needs, in this case some extra knowledge is necessary.

This section provides some guidelines on how to run your game on Android (tablets and smartphones) and iOS (iPhone, iPad and iPod Touch) devices.

Getting necessary Ethanon sources

Before we start, we need to download the Ethanon project files from the repository. Download the entire repository either by cloning it to your computer or by downloading the full zip package generated by GitHub.

Android

Ethanon engine runs on Android 2.2 and above, however it uses Android SDK 3.2 (android-13) as base SDK.

Software needed:

Download the latest version of the Ethanon Android machine (libApplication.so) from our downloads section.

The Ethanon project for Android is in ethanon/toolkit/Source/src/gs2d/projects/Android/Ethanon/

Make sure you have Android SDK, Eclipse and the Android ADT plug-in installed and you have Android SDK 3.2 (android-13) downloaded from the Android SDK Manager.

  1. Import the Ethanon project for Android into Eclipse
  2. Move your Ethanon project to the Ethanon/assets/ directory (all Ethanon project files except machine.exe, *.dll, etc.)
  3. Your main.angelscript file must be in Ethanon/assets/main.angelscript
  4. Copy the libApplication.so file to Ethanon/libs/armeabi/, or compile the native code of the project with ndk-build

All logs and the android_game.bin file containing compiled AngelScript byte-code for Android are sent to <external-storage-path>/.ethanon/.

Deploy the project to Android Emulator or an Android Device using the Run as Android Application functionality just like any Android application project.

Warning! The Android Emulator available in the Android SDK doesn't use to handle OpenGL ES 2.0 well. It is recommended to test your games on an actual device.

iOS

The iOS deployment process requires a Mac computer with an up-to-date OS X system.

The Xcode project that builds and runs Ethanon machine on iOS is in ethanon/toolkit/Source/projects/xcode/iOS/.

Software needed:

  • Xcode
  • 7zX (or any app that unpacks *.7z files)

Now follow the steps:

  1. Extract ethanon/toolkit/Source/src/gs2d/vendors.7z because we will need boost headers that are packed there
  2. Open the Xcode project ethanon/toolkit/Source/projects/xcode/iOS/Ethanon.xcodeproj
  3. Copy both folders
    ethanon/toolkit/Source/src/gs2d/projects/Android/Ethanon/assets/data/ and ethanon/toolkit/Source/src/gs2d/projects/Android/Ethanon/assets/shaders/
    into ethanon/toolkit/Source/projects/xcode/iOS/assets/
    These are mostly shader files used by the base rendering library and Ethanon lighting shaders
  4. Move your Ethanon project into ethanon/toolkit/Source/projects/xcode/iOS/assets/
  5. Click Run

Warning! Shadows are not available on OpenGL ES 2.0 implementations (Android and iOS)