Author Topic: Last AGS solution for Android and iOS port  (Read 4468 times)

Last AGS solution for Android and iOS port
« on: 15 Dec 2014, 16:47 »
Hi
I'm registered here for many years.I come here everyday.I made some games but not with AGS .My last game was Datswer.I always wish I could make an adventure games with AGS.And now I want start with it as first game.
As develop 2D animation and 2D Games is my main job, I can't make a game for PC only.
I'm appreciate for this ports by JJS and Monkey0506 and Crimson and others.I really need to iOS and Android ports and actually I don't want change engine because I write all scales my game and I don't need to high res and high visual effect.AGS is enough for me.

What can i do for get a fresh apk+Obb for Android and Xcode for iOS? I think here is many people that want this ports.And I'm sure they are can pay for it also me.So if is any problem for your times to works with this ports you can make AGS as commerical with mobile outputs.

Appreciate for any suggestion.... 
Thanks
My official site: http://www.pershaland.ir/

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #1 on: 25 Dec 2014, 21:02 »
Hi, Mehrdad, I suggest you ask your question in the Engine development forums. Idk about others, but I personally browse this section of forums much less often. I saw this post by pure luck.

I am not sure what to answer you though, because I do not maintain mobile ports myself at the moment (except for fixing obvious errors).

Re: Last AGS solution for Android and iOS port
« Reply #2 on: 26 Dec 2014, 05:01 »
Thanks CW for answer .
I have request from moderators move this topic to Engine development.

Edit : Thanks Mods for moved
« Last Edit: 26 Dec 2014, 14:22 by Mehrdad »
My official site: http://www.pershaland.ir/

Re: Last AGS solution for Android and iOS port
« Reply #3 on: 11 Jun 2016, 14:46 »
Sorry for up old topic
First Thanks for Crimson Wizard and Gurok and Nick and Monkey0506 and others for improve windows and Linux runtime . (MacOSX is soon as for as I know )
Thanks Janet for guide iOS port for App store.
But actually Android is most popular ....
Isn't really any news for Android port for accept google play? any tricks?
I sent PM for Monkey0506 many times because he said before have plan for it as apk+OBB for put in Google Play but sadly there was not any answer .
I think there is many people that want this port. And I'm sure same people is ready for pay for it too like me. Is it possible work on this port ? Or at least a guide for optimize Android port 3.4 (By JJS and Monkey0506) for accept Google Play ?

Thanks for any reply
My official site: http://www.pershaland.ir/

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #4 on: 16 Aug 2016, 13:43 »
Sorry for being unresponsive, but you should check out the Oceanspirit Dennis Android Studio project.

Integrating a full build process into the AGS Editor is likely too complicated to happen any time in the near future, but I have been able to port my jobbifier tool to C# using IKVM. This is an important first step because it includes a port of the required Java libraries for packaging your game files into an OBB file. This means that an editor plugin could be built to create the OBB file as part of building your game from the AGS Editor. Such a plugin could then also set up the necessary Android Studio project files to allow a two-step build process (build with AGS, then build with Android Studio)... I'll look into this approach and see what I can come up with.

Re: Last AGS solution for Android and iOS port
« Reply #5 on: 16 Aug 2016, 17:35 »
Thanks so much monkey0506 .
Actually I don't have any knowledge of make Android or apk + OBB file . I'm appreciate for add this port to editor. Did you have any estimate time for ready it? . I really need to it
My official site: http://www.pershaland.ir/

Re: Last AGS solution for Android and iOS port
« Reply #6 on: 24 Aug 2016, 15:20 »
It seems not any good news for Android port . As my assets is almost ready and my first target is Android , I couldn't wait for this port on AGS anymore. Unfortunately I have to change engine because haven't much time :(
My official site: http://www.pershaland.ir/

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #7 on: 24 Aug 2016, 20:42 »
It seems to me that it isn't an issue of lack of time so much as a lack of willingness to follow instructions. It is significantly easier to build a standalone APK using the methods I have already advised you to use than it is to switch your game to a new engine.

Edit: Sorry if I was a bit curt, but I've written more detailed instructions below. It isn't a unified, built-in (to the editor) process, but it's really not difficult (I promise).
« Last Edit: 25 Aug 2016, 04:40 by monkey0506 »

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #8 on: 24 Aug 2016, 21:46 »
Mehrdad, from what monkey said in his previous post, it seem that game conversion process does exists, and works, it's just that it is not automated and not put into Editor. If you cannot build game APK by these instructions yourself, maybe you could simply ask someone who knows how to do that? I would assume there are computer savvy people out there who are capable of this task.
« Last Edit: 24 Aug 2016, 21:55 by Crimson Wizard »

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #9 on: 25 Aug 2016, 04:38 »
Instructions for building a standalone APK are available in the README of the OSD Android Studio project.

If anything there is unclear, please ask for help with that and I'll do what I can, but it's mostly straightforward.

* Install the necessary tools (Android Studio, JDK (not just the JRE), and NDK (available as a download through the Android Studio SDK Manager).
*** The OSD Android Studio project was made some time ago, and may need updating. I'm looking into several related things currently, but if this doesn't build please let me know.

* Use the jobb tool (part of the Android SDK, but see note below) to create an OBB file.
*** The tool published by Android has breaking bugs in the mainstream codebase that prevent it from working if you have a file size that is too small or too large. My jobbifier project is a replacement with fixes. You can download a prebuilt binary here, though I think that may be out-of-date (Update 26 August 2016: New version of tool uploaded to same URL 28 August 2016: Got automated building set up with GitHub, so the binary will now be hosted alongside the GitHub repo).

* Download the project files and be sure to include the git submodules. (Run "git submodule init && git submodule update" from a git command line inside your working directory for the project)

* Follow the remaining instructions in the README to replace the project's package name and resources.

From there you should be able to export a signed and aligned APK which is deployable over the Google Play Store. As I noted, some of these items may be out of date, but I will update them if they are non-functional.

P.S. You can create a personal fork of the OSD Android Studio project and set up a branch for your project. This will allow you to pull in any crucial changes made to the OSD project with minimized difficulty.
« Last Edit: 28 Aug 2016, 08:15 by monkey0506 »

Re: Last AGS solution for Android and iOS port
« Reply #10 on: 25 Aug 2016, 08:12 »
Thanks a lot Monkey0506 and CW for advice.

Actually did't saw README on github . I'll going to do step by step our guides and ask if I had problem.

I'm still with AGS and happy that Android port is live ;-D

CW,Monkey0506,Nick,Gurok and others:
I'm appreciate for your hard works and great updates ;)

My official site: http://www.pershaland.ir/

Re: Last AGS solution for Android and iOS port
« Reply #11 on: 26 Aug 2016, 06:59 »
Hi Monkey

First , sorry for don't find any person for help me because AGS is old engine for them and almost unknown for my friends .Second , your OBB maker is great but I don't accomplish and use it with my game.

I only want an absolute guide (For Dummies) step by step from you . I have Sony Z1 Android OS and can test my game in it and report any bug to you.
Please start to lead me after compile game to exe in AGS.

1) Compile AGS game
2)...
3)...

p.s : Is Android port support all modules like mirror,smooth parallax,tween,...?
I appreciate what you are doing for me



« Last Edit: 26 Aug 2016, 07:54 by Mehrdad »
My official site: http://www.pershaland.ir/

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #12 on: 26 Aug 2016, 13:49 »
First , sorry for don't find any person for help me because AGS is old engine for them and almost unknown for my friends
But I do not think that they need to know much about AGS. These instructions are applied over game which is already compiled.


p.s : Is Android port support all modules like mirror,smooth parallax,tween,...?
If you are speaking of SCRIPT modules, than there should not be any difference, all script commands should work the same for all ports.
Plugins, on other hand, is a complicated issue... and it depends on type (if you are using them). Mobile ports do not really support plugins, because they cannot use separate libraries. This is why we include several built-in plugins into the Android & iOS ports.
« Last Edit: 26 Aug 2016, 13:54 by Crimson Wizard »

Re: Last AGS solution for Android and iOS port
« Reply #13 on: 26 Aug 2016, 14:39 »
Quote
If you are speaking of SCRIPT modules, than there should not be any difference, all script commands should work the same for all ports.
Plugins, on other hand, is a complicated issue... and it depends on type (if you are using them). Mobile ports do not really support plugins, because they cannot use separate libraries. This is why we include several built-in plugins into the Android & iOS ports.

No I don't need to any plug in. Instead I use many modules . Glad news for support them .
Unfortunately my knowledge is very low for mobile ports and need a super easy manual for it . 
My official site: http://www.pershaland.ir/

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #14 on: 26 Aug 2016, 16:11 »
As CW said, you need to use the jobb/jObbifier tool to package already Compiled AGS games.

I've updated my jObbifier project to build with Gradle, and I believe I can also invoke my patched jobb library from the Gradle command line (or, rather, I can definitely invoke the java command as a process... and build the Android Studio project using the Gradle command line). If this is the case, then it may be possible to invoke a full build of the Android Studio project from an AGS plugin, but that will still take some time.

I don't have the time to explain to you how to use Android Studio, if that's what you're asking for, but there are tutorials on getting started... beyond that I really don't know what more you're wanting.
« Last Edit: 26 Aug 2016, 17:36 by monkey0506 »

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #15 on: 26 Aug 2016, 20:05 »
Looked at the Android Studio project and I was jumping through some hoops to try and get the NDK build process to work with an older version of Android Studio and and out-of-date NDK (AGS didn't build with the then-latest NDK). During the process I used an experimental gradle plugin, but I don't think that was necessary. Using the latest (stable) gradle plugin everything seems to be building correctly, but I need to test further, and the project files required several changes.

This also made it apparent that however I was invoking the NDK from Android Studio was expecting the project to be located at the (ags-source)/Android/library path, which isn't really practical. I'm working on updating that to use a local property to point to the AGS source directory and then copy the built files as necessary. All of this (read as: this paragraph, not the entire post) only applies if not using the pre-built libraries which are linked in the README, though of course those libraries are out-of-date, relative to the latest AGS versions. Additionally, AGS (master) isn't building with the latest NDK, but that's not really related and I think it is because the newer NDK doesn't really use the Android.mk file...

The above paragraph also isn't really related to being able to build everything from the editor, as that would rely on pre-built libraries. It should be possible for the editor to make a copy of a "base" Android Studio project, do the necessary text and resource replacements, invoke a Java process to build the game files into the necessary OBB, and then invoke the gradle command line to build the Android Studio project.

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #16 on: 28 Aug 2016, 00:47 »
Updated the OSD project, and expanded the README. This should clarify what is needed to build your own project's standalone APK.

Re: Last AGS solution for Android and iOS port
« Reply #17 on: 28 Aug 2016, 06:16 »
Wow ;-D  Thanks so much . It's really clear and great .Nice job man. I'll try it now. If I still had problem let you know
My official site: http://www.pershaland.ir/

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #18 on: 28 Aug 2016, 19:13 »
Got a fully automated build, but the process is still far too complicated for implementation directly into the editor. It will have to remain as a plugin, but that's not that big of a deal as I see it.

Prerequisites for the automated build are down to:

  • JDK
  • Android SDK
  • Java keystore (required for signing, very simple to generate and only needs to be set up once)
  • Following text items:
    • string SdkDir: Path to the Android SDK installation (will look in default locations, but may require manual entry if installed elsewhere)
    • string PackageName: Your app's package name (e.g., "com.bigbluecup.game")
    • int VersionCode: Your app's version code (unique, increment only version used by Google Play Store)
    • string VersionName: Friendly-text version
    • string KeyStorePath: Path to your keystore
    • string KeyStorePassword: Password for your keystore
    • string KeyStoreAlias: Alias in your keystore file (usually each app will have a unique alias in your private keystore)
    • string KeyStoreAliasPassword: Password for your app's alias in the keystore
    • string GameName: Your game's name as displayed on the device
    • int ObbVersion: The version code of your APK expansion file (to be updated if making changes to your game, as opposed to changes to the app itself)
    • string ObbPassword: If you want your APK expansion file to be encrypted (though this isn't supported on all Android versions, AFAIK)
    • string RSAPublicKey: Provided by Google Play Developer Console after your first APK file is uploaded (will default to embedding OBB file if left blank)
    • string PrivateSalt: Comma-separated signed byte values ([-128, 127]) used as a salt when downloading your OBB file from Google Play
  • Graphics resources (icons, etc.) (will accept a zip archive as input to replace these files)

As you can see, most of the text items are specific to your app, and many of them only need to be updated once. With these few items set up, an editor plugin will be fully capable of deploying an APK and OBB expansion file, ready for upload to Google Play. I should be able to have a plugin ready pretty soon, actually. As mentioned, the process isn't suitable for integration into the editor (I'm currently invoking two separate command-line processes, which will make tracking any errors much, much more difficult, and there are a large number of files (file count, not large in size) that have to be created on-the-fly).

monkey0506

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Last AGS solution for Android and iOS port
« Reply #19 on: 01 Sep 2016, 18:01 »
Using this thread as somewhat of a dev log for the plugin... 8-)

I was toying around a bit with security details since some passwords and other private data are involved, but I think it's a futile effort as the build chain depends on those items being available as plain text. What I can do is attempt to read those items directly from the Android Studio project (which is set up by the plugin as part of the build process) without serializing any of it to/from Game.agf.

I think the easiest way of collecting the necessary metadata from the user is a simple dialog wizard, which can be prepopulated from prior builds. That can be set up pretty simply. Then the last task will be to extract graphics resources from a zip archive, which isn't set up yet.

The plugin should be available pretty shortly, I think.