Adventure Game Studio

AGS Development => Engine Development => Topic started by: Mehrdad on Mon 15/12/2014 16:47:27

Title: Last AGS solution for Android and iOS port
Post by: Mehrdad on Mon 15/12/2014 16:47:27
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 (http://www.adventuregamestudio.co.uk/forums/index.php?topic=51306.0/).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
Title: Re: Last AGS solution for Android and iOS port
Post by: Crimson Wizard on Thu 25/12/2014 21:02:15
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).
Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Fri 26/12/2014 05:01:18
Thanks CW for answer .
I have request from moderators move this topic to Engine development.

Edit : Thanks Mods for moved
Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Sat 11/06/2016 14:46:19
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
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Tue 16/08/2016 13:43:23
Sorry for being unresponsive, but you should check out the Oceanspirit Dennis Android Studio project (https://github.com/monkey0506/osd-scourgeoftheunderworld-as).

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 (https://github.com/monkey0506/jobbifier) tool to C# using IKVM (https://www.ikvm.net/). 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 (https://developer.android.com/google/play/expansion-files.html). 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.
Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Tue 16/08/2016 17:35:40
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
Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Wed 24/08/2016 15:20:42
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 :(
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Wed 24/08/2016 20:42:01
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).
Title: Re: Last AGS solution for Android and iOS port
Post by: Crimson Wizard on Wed 24/08/2016 21:46:08
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.
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Thu 25/08/2016 04:38:43
Instructions for building a standalone APK are available in the README (https://github.com/monkey0506/osd-scourgeoftheunderworld-as/blob/master/README.md) 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 (https://github.com/monkey0506/jobbifier) project is a replacement with fixes. You can download a prebuilt binary here (https://github.com/monkey0506/jobbifier/releases/download/v2.0/jObbifier.jar), 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.
Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Thu 25/08/2016 08:12:16
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 ;)

Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Fri 26/08/2016 06:59:49
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



Title: Re: Last AGS solution for Android and iOS port
Post by: Crimson Wizard on Fri 26/08/2016 13:49:28
Quote from: Mehrdad on Fri 26/08/2016 06:59:49First , 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.


Quote from: Mehrdad on Fri 26/08/2016 06:59:49
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.
Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Fri 26/08/2016 14:39:27
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 . 
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Fri 26/08/2016 16:11:33
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.
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Fri 26/08/2016 20:05:50
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.
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Sun 28/08/2016 00:47:16
Updated the OSD project, and expanded the README (https://github.com/monkey0506/osd-scourgeoftheunderworld-as/blob/master/README.md). This should clarify what is needed to build your own project's standalone APK.
Title: Re: Last AGS solution for Android and iOS port
Post by: Mehrdad on Sun 28/08/2016 06:16:55
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
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Sun 28/08/2016 19:13:02
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:


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).
Title: Re: Last AGS solution for Android and iOS port
Post by: monkey0506 on Thu 01/09/2016 18:01:16
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.