AGS Development > Engine Development

AGS engine Android port

(1/1)

Crimson Wizard:
The old forum thread may still be found here. Please beware that it was started many years ago and may contain alot of outdated information.

This new thread is dedicated to discussing the Android port of AGS engine. Following is a brief cover of the topic.


AGS engine has an Android port that can run on most contemporary devices. [TODO] check device ranges and minimal requirements.
To run AGS games on Android you need a dedicated Android app (APK) and a game data.
We support two kinds of applications: a universal game launcher (aka "AGS Player") that can run just any random AGS game without any extra manipulations, and a single game app that you have to package along with the game data yourself into a signed APK. The latter may be then distributed by game shops, such as Google Play.

Currently the v3.x.x engine branch supports running games created with AGS 2.50 and higher.


AGS Player

"AGS Player" is a universal game launcher on Android, that displays a list of found AGS games and lets you run them.

This launcher requires games to be unpacked, placed in the internal storage or sd card, one game in its own subdirectory. You may use raw game data (*.ags files), or even games compiled for other platforms such as Windows ( Windows version of a game is usually just an engine exe with game data appended to it).

We distribute AGS Player with every release of AGS. The download link may be found in respective forum posts for each release.
Another place to find them is releases page in our repository: https://github.com/adventuregamestudio/ags/releases
In the Assets look for AGS-3.x.x.x-debug.apk and AGS-3.x.x.x-release.apk (these are same program, built with debug or release configuration).
If you'd like to build it yourself, you may do so following these instructions: https://github.com/adventuregamestudio/ags/blob/master/Android/README.md

After installing one on your Android device, run it and open the [...] menu, choose "Select game folder". Then type the path or browse to the parent folder you keep all your AGS games in (NOTE: browse button is added since v3.6.0).
You will see the list of all games that the AGS Player detected in that directory. Note that since v3.6.0 the search is recursive, displaying games also found in subfolders.
Touch the game name to run one.

KNOWN ISSUES

1. Please be aware that most AGS games are made not having touch screen in mind. We therefore cannot guarantee (or be responsible for) positive gaming experience. The port provides basic touch controls, and these may be configured to some degree, but they may not be convenient at all times. We accept suggestions for improving these controls, so long as these are universally useful (not meant for a specific game). Ideally the game should be adjusted for mobile/touch controls by their authors.

2. If the game requires engine plugins to run, these have to be included into the launcher APK. We include several plugins by default, mostly ones that were popular among AGS game authors in the past. We may probably expand the list of these plugins if there will be a demand for it.


Building games for Android in the Editor

Editor also comes with an optional feature that lets you deploy for Android using a ported engine.
To use this feature make sure you have installed the "Android build component" along with the editor. This creates a "Android" subfolder inside the Editor's program folder. After that a "Android" option will become available for selection in "Build targets" list in the General Settings of your game project.
You would also require Android Studio.

Before running the build you will have to configure paths to Android SDK and other options. This is done in File->Preferences dialog, on "Android" tab. These options will be used for all your games.
The "Android" section in General Settings is used to configure individual game's properties related to Android build, such as game name, and package format.

The compiled game will be placed into Compiled/Android folder.

For detailed information please see this dedicated forum post:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=59772.0


Building single game APK without Editor

If you'd like to have your individual game APK which you may distribute, or even sell on e.g. Google Play, you have to build one by combining following components:
- The Java/Kotlin application. We provide an project template for this: https://github.com/adventuregamestudio/ags/tree/master/Android/mygame
- The native engine module (and optionally plugins) in the form of dynamic libraries (*.so). You may either build these yourself following instructions in the README, or get prebuilt ones attached to corresponding AGS release. The archive is called AGS-3.x.x.x-android-libs.
- Your raw game's data found in Compiled/Data folder after compilation.

For building the full APK you will be also requiring Android Studio and some other tools.
The process is explained in this dedicated readme: https://github.com/adventuregamestudio/ags/tree/master/Android/mygame#readme

If you encountered bugs or have feature suggestions, you may open an issue in our tracker.


Any other useful information may be added to this post later.

eri0o:
I still need to document this properly (as in put it in the AGS Manual), but in the meantime, information on how to use the Android build available in the Editor is available in this thread: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59772.0

Note: the feature is fairly recent so any questions is better to ask. There's a FAQ in the linked thread, so I recommend checking it, as questions appears I will try to summup things and add there until a manual page is written.

Amir:
I have a question. As far as I remember I tried android launcher back then and it worked fine, but in my new game there are a lot of "strings" fields where you have to type something. Will this also work with the android launcher? Will the keyboard appear on mobile phones, so that you type something?

Crimson Wizard:

--- Quote from: Amir on 03 Jul 2022, 09:33 ---I have a question. As far as I remember I tried android launcher back then and it worked fine, but in my new game there are a lot of "strings" fields where you have to type something. Will this also work with the android launcher? Will the keyboard appear on mobile phones, so that you type something?

--- End quote ---

There's a built in keyboard, which you may bring by holding "back" key and choosing "keyboard" from the menu. But that is meant mostly for games which were not specifically designed for touch screen. If that does not suit your game you could script your own on-screen keyboard.

Amir:

--- Quote from: Crimson Wizard on 03 Jul 2022, 12:07 ---
--- Quote from: Amir on 03 Jul 2022, 09:33 ---I have a question. As far as I remember I tried android launcher back then and it worked fine, but in my new game there are a lot of "strings" fields where you have to type something. Will this also work with the android launcher? Will the keyboard appear on mobile phones, so that you type something?

--- End quote ---

There's a built in keyboard, which you may bring by holding "back" key and choosing "keyboard" from the menu. But that is meant mostly for games which were not specifically designed for touch screen. If that does not suit your game you could script your own on-screen keyboard.

--- End quote ---

Ah cool, this works on my old iPad. But you can't delete what you wrote. Delete doesn't work  :-\  Is it possible to make the keyboard appear on the touchscreen? You know, the newer ones don't have a "back" key anymore.


--- Quote ---If that does not suit your game you could script your own on-screen keyboard.
--- End quote ---

Has anyone ever made a module for a keyboard?

Edit: I just tried with Galaxy tab s6. I was able to delete and use the touch button "Back" to bring up the keyboard. With my old Galaxy tab a6 (Android version 5 I guess) I was not able to delete what I wrote, I think it's the old version. It doesn't matter. Now my friends who don't have PC can play my game. Thank u.

Navigation

[0] Message Index

Go to full version