Author Topic: AGS engine Android port  (Read 145213 times)  Share 

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
Re: AGS engine Android port
« Reply #680 on: 08 Jan 2017, 13:46 »
* 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

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Android port
« Reply #681 on: 08 Jan 2017, 14:39 »
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.
« Last Edit: 08 Jan 2017, 14:41 by Crimson Wizard »

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
Re: AGS engine Android port
« Reply #682 on: 08 Jan 2017, 14:55 »
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

  • Mittens Baronet
  • AGS Baker
  • Toffee Trouble in Creamville
  • cat worked on a game that was nominated for an AGS Award!cat worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #683 on: 08 Jan 2017, 14:59 »
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.

Re: AGS engine Android port
« Reply #684 on: 09 Jan 2017, 17:26 »
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!

Re: AGS engine Android port
« Reply #685 on: 10 Jan 2017, 17:01 »
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

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Android port
« Reply #686 on: 10 Jan 2017, 22:58 »
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.

Re: AGS engine Android port
« Reply #687 on: 11 Jan 2017, 14:46 »
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.

Re: AGS engine Android port
« Reply #688 on: 15 Jan 2017, 18:44 »
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

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Android port
« Reply #689 on: 15 Jan 2017, 19:22 »
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.

Re: AGS engine Android port
« Reply #690 on: 18 Jan 2017, 15:14 »
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

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #691 on: 23 Jan 2017, 19:23 »
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.
« Last Edit: 23 Jan 2017, 19:38 by Radiant »

NicolaGs

  • Going nowhere fast
Re: AGS engine Android port
« Reply #692 on: 23 Jan 2017, 21:33 »
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.

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #693 on: 23 Jan 2017, 21:41 »
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

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: AGS engine Android port
« Reply #694 on: 23 Jan 2017, 22:14 »
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

  • Going nowhere fast
Re: AGS engine Android port
« Reply #695 on: 23 Jan 2017, 22:19 »
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...

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #696 on: 24 Jan 2017, 05:18 »
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

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #697 on: 24 Jan 2017, 05:26 »
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.
« Last Edit: 24 Jan 2017, 05:29 by Radiant »

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #698 on: 24 Jan 2017, 05:35 »
Aha, moving it to internal storage worked  :-D

Yay, I managed to complete Errand on smartphone.
« Last Edit: 24 Jan 2017, 05:49 by Radiant »

Radiant

  • AGS Baker
  • Mittens Knight
  • Return once more to the Two Kingdoms!
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #699 on: 01 Feb 2017, 13:01 »
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: Adventure Game Studio
  1. 699 eScriptSystemOSID AGSAndroid::GetSystemOSID() {
  2. 700   return eOS_Win;
  3. 701 }

to
Code: Adventure Game Studio
  1. 699 eScriptSystemOSID AGSAndroid::GetSystemOSID() {
  2. 700   return eOS_Android;
  3. 701 }

and add this value to ags/Editor/AGS.Editor/Resources/agsdefns.sh after line 92
Code: Adventure Game Studio
  1. 88 enum eOperatingSystem {
  2. 89   eOSDOS = 1,
  3. 90   eOSWindows,
  4. 91   eOSLinux,
  5. 92   eOSMacOS
  6. ++  ,eOSAndroid
  7. 93 };

and to ags/Engine/platform/base/agsplatformdriver.h after line 34
Code: Adventure Game Studio
  1. 30 enum eScriptSystemOSID {
  2. 31     eOS_DOS = 1,
  3. 32     eOS_Win = 2,
  4. 33     eOS_Linux = 3,
  5. 34     eOS_Mac = 4
  6. ++     ,eOS_Android = 5
  7. 35 };


Thank you very much!