Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Author Topic: AGS engine Android port  (Read 169355 times)

Re: AGS engine Android port
« Reply #780 on: 20 Mar 2018, 01:22 »
I made another build, but it is not final work, just for the test: https://www.dropbox.com/s/f62oqlis9a7zgho/AGS-3.4.1-debug.apk?dl=0

I'm able to install this one and the app finds my game folder, however when I run the game I get the error: 'Unable to initialize your audio hardware error', followed by 'Unable to write in the savegame directory.'. The app then crashes.

I've checked permissions on the app and it has write access. I only have 1gb free on my internal storage but I would imagine this is enough?

Can we confirm what the steps are needed for putting the game files onto the phone? I'm using the following process (not sure if I'm doing something wrong):

copy game files (no need for winsetup) to folder on internal storage
use ES File Explorer android app to get game folder path
Open ags app and in preferences set the file path of the folder which contains the game folder (for me it's SD card - AGS)
GuardDuty folder now shows in the app.


My acsetup.cfg has 'driver=OGL' listed under [graphics], is that correct? Is there a specific setup you need in the cfg?



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
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #781 on: 20 Mar 2018, 01:34 »
My acsetup.cfg has 'driver=OGL' listed under [graphics], is that correct? Is there a specific setup you need in the cfg?
Android port overrides much of the graphic setup, and supposed to take one from other config, set up in App Preferences (although it is limited now, as I mentioned in a post above).


Can we confirm what the steps are needed for putting the game files onto the phone? I'm using the following process (not sure if I'm doing something wrong):
Yes, it should be about like that.

Game launcher requires a windows version of game exe, renamed to ac2game.dat to detect a folder.
« Last Edit: 20 Mar 2018, 01:38 by Crimson Wizard »

Joseph DiPerla

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: AGS engine Android port
« Reply #782 on: 20 Mar 2018, 01:37 »
I made another build, but it is not final work, just for the test: https://www.dropbox.com/s/f62oqlis9a7zgho/AGS-3.4.1-debug.apk?dl=0

I'm able to install this one and the app finds my game folder, however when I run the game I get the error: 'Unable to initialize your audio hardware error', followed by 'Unable to write in the savegame directory.'. The app then crashes.

I've checked permissions on the app and it has write access. I only have 1gb free on my internal storage but I would imagine this is enough?

Can we confirm what the steps are needed for putting the game files onto the phone? I'm using the following process (not sure if I'm doing something wrong):

copy game files (no need for winsetup) to folder on internal storage
use ES File Explorer android app to get game folder path
Open ags app and in preferences set the file path of the folder which contains the game folder (for me it's SD card - AGS)
GuardDuty folder now shows in the app.


My acsetup.cfg has 'driver=OGL' listed under [graphics], is that correct? Is there a specific setup you need in the cfg?




I believe each game has to be in its own subfolder in a main ags game directory. Eg: AgsGames/indianajones
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Re: AGS engine Android port
« Reply #783 on: 20 Mar 2018, 01:38 »

I believe each game has to be in its own subfolder in a main ags game directory. Eg: AgsGames/indianajones

Cool, that's how I've got it setup. With the app pointing to the main AGS game directory.

Game launcher requires a windows version of game exe, renamed to ac2game.dat to detect a folder.

I found that doing this stopped the app from being able to see the game, I had to do that when I tried the old emulator (Monkey's version) but this time I had to keep it as it's original exe name (with the .exe extension) for the app to be able to see the game.
« Last Edit: 20 Mar 2018, 01:43 by Chicky »

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
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #784 on: 20 Mar 2018, 01:48 »
Game launcher requires a windows version of game exe, renamed to ac2game.dat to detect a folder.

I found that doing this stopped the app from being able to see the game, I had to do that when I tried the old emulator (Monkey's version) but this time I had to keep it as it's original exe name (with the .exe extension) for the app to be able to see the game.

Well, I don't have exe files in my game folders, but ac2game.dat files. So don't know what is going on. Either way, it is still wrong that it requires actual windows exe there.

Regarding audio problem, this is not error, but warning, and it usually indicates that MIDI is not supported. Try setting "midiid=0" in config to disable MIDI.
For games using MIDI you would need to install DIGMID patches.
It may be also a good thing to silent this error and make it write to the log instead of exploding into player's face.

Privateer Puddin'

  • Mittens Knight
  • bob
Re: AGS engine Android port
« Reply #785 on: 20 Mar 2018, 02:38 »
AGS seemed to see games whether it was the original .exe, or renamed to ac2game.dat

I've tried both 14th and 20th versions (20th version installed fine, without removing previous version)

I get a black screen upon starting my game, whether it's a 3.4.0 version or 3.4.1. Is the log file any use?

Which games have been used to test? Is it worth me checking one to see if it displays properly versus my game?

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
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #786 on: 20 Mar 2018, 02:41 »
Which games have been used to test? Is it worth me checking one to see if it displays properly versus my game?

Some random games I had there, "All pigs deserve to burn in hell", "Donna: Avenger of Blood", "Last & Furious" (my own game).

You may add "log=1" under "[misc]" in config file, log will probably get created in sdcard/ags.

Privateer Puddin'

  • Mittens Knight
  • bob
Re: AGS engine Android port
« Reply #787 on: 20 Mar 2018, 03:10 »
Tried Last & Furious - got the same black screen. Here's the log from trying to run my game:

http://tom-simpson.com/ags.log

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
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #788 on: 20 Mar 2018, 15:08 »
Updated the build, but do not think there is any change (just tidied some code): https://www.dropbox.com/s/a8iib4gbov26lgn/AGS-3.4.1-debug.apk?dl=0


I found that Java side of the engine explicitly creates GLES1 context, while AGS now needs GLES2. Need to find out how to setup GLES2 properly.
Of course this means that Java code needs to be changed, and I do not even know how to debug it in case something is wrong.


EDIT: Alright, this does not look like something that may be done as a quick hack. One needs to actually rewrite the thing, import different java libraries, use different classes etc. Which means a person needs to know what to do.
Wish I knew how to compile and debug Java application. Do you need to use Android Studio for that?
I see no better solution than to hire an actual Android developer to help fix this. This is stupid and very inefficient to keep spending time on something I am not skilled with.

« Last Edit: 20 Mar 2018, 18:00 by Crimson Wizard »

Re: AGS engine Android port
« Reply #789 on: 20 Mar 2018, 18:24 »
I think some of the games I was testing were 16 bit, so that might explain why some were working. I'll have a look at it once I'm done with a couple of other things. I've not looked at Java in a long time, but there is a developer guide that uses GLES2 in a tutorial here and I've got one device that I could try it on.

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
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #790 on: 20 Mar 2018, 18:43 »
I think some of the games I was testing were 16 bit, so that might explain why some were working.

I tried 16-bit game and it had correct colors. So, 32-bit games have incorrect colors for some reason.

Also, that is true that *.exe is also detected by launcher.

UPD: Did some extra logging, only to make it clear that all gfx are converted to 32-bit regardless. Yes, the engine always runs in 32-bit mode, but for some reason when 16-bit games are converted to 32-bit they look okay, and when 32-bit games are run their colors are broken.
« Last Edit: 26 Mar 2018, 01:34 by Crimson Wizard »