[OLD-1] AGS engine Android port

Started by JJS, Thu 03/11/2011 20:18:29

Previous topic - Next topic

Cassiebsg

* Cassiebsg claps (nod)

Thanks, I'll look forward to test this... :-D
There are those who believe that life here began out there...

Crimson Wizard

#681
Quote from: cat on Sun 08/01/2017 12:56:14
Could you update the first post in this thread? I think you can do this as a moderator. The links there are old and the versions outdated. It is very hard for developers to find the most recent working port version here in this thread.
I did, but I think we need to create a new thread, because this is 6 years old, contains many obsolete information and spanning 35 pages now.
I think I will be able to upload Android builds to the same server as Windows ones, if server owners (not sure who are they, AGA or someone else) are okay with that.

BTW, what was that problem with on-screen keyboard mentioned earlier?
I tried to install old JJS's APK on emulator to see if I can spot any differences, but there was some error I could not solve yet.

Cassiebsg

The old version showed up ... (3 dots) that once clicked would bring up the keyboard. The newer version was missing those 3 dots buttons to bring up the keayboard, makeing it impossible to get the keyboard in a game.

Haven't tried your version yet, but if you can call the keyboard in game, then it should be fine. ;)
There are those who believe that life here began out there...

cat

Thanks for updating the first post!

The games that I tried don't use keyboard input, so I can't give any information about it.

Bhaal87

I can confirm that this release fixed the mouse cursor issue, but the three dots to bring up the keyboard are still not there. I think this has to do with what version of the Android SDK was used to compile the apk. The three dots are a back compatibility feature for older apps that expect menu button, since modern Android devices have no menu button. I haven't had the chance to test it for long enough to see if it still gets the random crashes like the jjs releases did. Thank you guys for all your hard work!

Bhaal87

Looks like this.openOptionsMenu(); needs to be set and set the targetsdk version to < 11.  This stack overflow discussion talks about the issue.

http://stackoverflow.com/questions/8774317/handling-the-missing-menu-button-in-new-versions-of-android-3-x-and-up

Crimson Wizard

Quote from: Bhaal87 on Tue 10/01/2017 17:01:36
Looks like this.openOptionsMenu(); needs to be set and set the targetsdk version to < 11.  This stack overflow discussion talks about the issue.

http://stackoverflow.com/questions/8774317/handling-the-missing-menu-button-in-new-versions-of-android-3-x-and-up

I can try to look into this, but, as I mentioned before, I am not an Android developer, so I would need to consult with other people who were working on this port (like monkey0506) before changing anything in official version.

Bhaal87

Thanks! In the meantime, if anyone is stuck without a keyboard, there is a workaround people have been using. You can download hackers-keyboard from the google play store and configure a permanent notification that allows you to bring up the keyboard. You just swipe down and tap it. It's a little hack-ey but it gets the job done.

Bhaal87

I've had some more time to test out the latest build and I'm still getting periodic crashing. Is there a log file I can provide to help the debug process?

Crimson Wizard

Quote from: Bhaal87 on Sun 15/01/2017 18:44:49
I've had some more time to test out the latest build and I'm still getting periodic crashing. Is there a log file I can provide to help the debug process?
The only thing I can recommend is to disable threaded audio. I investigated this a little before, and I came to conclusion that threaded audio is not implemented safely enough.
As for log file, unless Android has its own debug logs, or some analogue for a crash dump, that won't be much use, because our own mostly debugs game startup process.

Bhaal87

Quote from: Crimson Wizard on Sun 15/01/2017 19:22:24
The only thing I can recommend is to disable threaded audio. I investigated this a little before, and I came to conclusion that threaded audio is not implemented safely enough.
As for log file, unless Android has its own debug logs, or some analogue for a crash dump, that won't be much use, because our own mostly debugs game startup process.

This seems to have done the trick. I've played for about an hour total now and no crashes yet! Should threaded audio be disabled by default after install? I can't remember if turning it on is something I did while playing with settings or if that is the way it started out.

Anyways, thanks! This has made games playable that were not previously. So now the only real issue is the lack of a button to bring up the keyboard.

Radiant

#691
Ok, I'm feeling really stupid now, I'm trying this out and I cannot figure out how to display a file path on my Android phone. That is, none of the file browsers I've found (e.g. ES and the Samsung internal one) actually display a path name that I can input in the AGS executable. Any suggestions on this please?

(for instance, I see things like /storage/emulated/0/Download which sounds like a fake path and indeed doesn't work...)

(edit) Galaxy A3 running Android 6.0.1, using the AGS-3.4.0.6 posted two pages back.

NicolaGs

In ES Explorer, you can select a folder (long press) then 3-dots menu ("more") and then "properties"... The path is displayed and you can copy it.
My first game : I Want Out!

Radiant

Quote from: Nicolas on Mon 23/01/2017 21:33:55
In ES Explorer, you can select a folder (long press) then 3-dots menu ("more") and then "properties"... The path is displayed and you can copy it.

I've tried that, but it didn't work. It shows a fullpath of /storage/1234-5678/ags (or /storage/1234-5678/ags/Gamename, I'm not sure which one is needed) but neither works in AGS 3.4.0.6. There's both an .AGS and a .EXE file in there. Do I need to set folder rights or something?

Crimson Wizard

Quote from: Radiant on Mon 23/01/2017 21:41:30
I've tried that, but it didn't work. It shows a fullpath of /storage/1234-5678/ags (or /storage/1234-5678/ags/Gamename, I'm not sure which one is needed) but neither works in AGS 3.4.0.6. There's both an .AGS and a .EXE file in there. Do I need to set folder rights or something?

Android launcher still uses misleading and incorrect way to search for games: game exe should be renamed to ac2game.dat. I created a ticket about this recently.

NicolaGs

Quote from: Radiant on Mon 23/01/2017 21:41:30
Do I need to set folder rights or something?
I didn't need to do so and it works for me.
I don't copy all the \Compiled folder, with the .ags. I just copy the folder within (i.e. \Windows) which contains the compiled Windows binaries.

If it doesn't work : is there a restriction in folders access with Android 6 ? IIRC, there was a writing restriction on the SD card in version 5...
My first game : I Want Out!

Radiant

Quote from: Crimson Wizard on Mon 23/01/2017 22:14:49
Android launcher still uses misleading and incorrect way to search for games: game exe should be renamed to ac2game.dat. I created a ticket about this recently.
Aha, that helps.

Somewhat. Now instead of getting a "no games found" message, I get a big popup "ERROR: Unable to find game data files" and a "no games found" message and AGS crashes. Hmm. I've placed audio.vox in the folder and that didn't help, I wonder what other data files these could be?

Radiant

#697
Actually, let me retry that on your newest patch build.

I can select the game now and get error "unable to initialize your audio hardware." [Problem: DIGMID patch set not found] This appears to be the same problem I'm getting on Linux: despite using only OGG music, the engine tries to initialize a MIDI library and finds that numerous modern machines don't come with MIDI libraries installed.

Then I get a loading screen and the game hangs.

Retrying, I've now removed audio.vox and acsetup.cfg. I now get the error "unable to write to the current directory". Hmm, ES file manager gave me a similar error, implying that the path /storage/1234-5678 isn't writable but another path with the same target is...

(edit) if acsetup.cfg is in the location, I get that message followed by a crash. If acsetup is not found, it simply exits.

Radiant

#698
Aha, moving it to internal storage worked  :-D

Yay, I managed to complete Errand on smartphone.

Radiant

To facilitate further android development, could someone with GIT access please take five minutes to alter ags/Engine/platform/android/acpland.cpp to change line 700 from

Code: ags

699 eScriptSystemOSID AGSAndroid::GetSystemOSID() {
700   return eOS_Win;
701 }


to
Code: ags

699 eScriptSystemOSID AGSAndroid::GetSystemOSID() {
700   return eOS_Android;
701 }


and add this value to ags/Editor/AGS.Editor/Resources/agsdefns.sh after line 92
Code: ags

88 enum eOperatingSystem {
89   eOSDOS = 1,
90   eOSWindows,
91   eOSLinux,
92   eOSMacOS
++  ,eOSAndroid
93 };


and to ags/Engine/platform/base/agsplatformdriver.h after line 34
Code: ags

30 enum eScriptSystemOSID {
31     eOS_DOS = 1,
32     eOS_Win = 2,
33     eOS_Linux = 3,
34     eOS_Mac = 4
++     ,eOS_Android = 5
35 };



Thank you very much!

SMF spam blocked by CleanTalk