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

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 #440 on: 04 Oct 2013, 12:32 »
anyway, the .dat is significantly larger than the .exe (18 mb vs 2 mb), but deleting the .exe doesn't remedy the error. i also tried renaming it to .ags, but it didn't help either.

Hmmm, I am getting an impression that I did not understand situation quite enough, and we were talking of different things.
2 mb is the size of the pure AGS engine, without any game. How this exe was called originally (and where did you get it)?

EDIT: Maybe rename ac2game.dat into Blackwell**whatever.exe instead? If Android port looks for "exe" only, that might do the trick.
EDIT2: Erm... actually ignore what I say here. I might not know very well how Android launcher works.
Looking in its code, it seems that it SHOULD find ac2game.dat too...

By the way, the latest versions of the Windows engine (since April 2013 IIRC) do not require you rename games into ac2game.dat, they may detect games in their original form (something.exe).

« Last Edit: 04 Oct 2013, 13:00 by Crimson Wizard »

monkey0506

  • AGS Project Tracker Admins
  • 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)
    •  
Re: AGS engine Android port
« Reply #441 on: 04 Oct 2013, 12:58 »
Is it possible that the original EXEs had some form of DRM or something applied? Of course... whether with or without the Windows executable attached, the Android engine is still capable of finding the games. I'm not sure what else to say, if the game is running on Windows. Hmmm... Maybe if you contact Dave he could shed some light on how these games were compiled?

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 #442 on: 04 Oct 2013, 13:15 »
Is it possible that the original EXEs had some form of DRM or something applied? Of course... whether with or without the Windows executable attached, the Android engine is still capable of finding the games.
Can it? I thought it was looking for PE signature at the file's header?
Look for "isAgsDatafile" in the port's code.
« Last Edit: 04 Oct 2013, 13:18 by Crimson Wizard »

monkey0506

  • AGS Project Tracker Admins
  • 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)
    •  
Re: AGS engine Android port
« Reply #443 on: 04 Oct 2013, 14:15 »
Well...without looking at the source code I can tell you that I have been using a hex editor to strip the first ~1.7 MB off of AGS (Windows) EXEs (up to the point where it says "PADDINGXXPADDINGXX...CLIB", leaving the CLIB in-tact). The engine is able to find these files just fine. It was my understanding that this is the Windows engine, plus padding (for alignment, presumably?), and then the game data.

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 #444 on: 04 Oct 2013, 14:28 »
To clarify, is it the launcher or the engine that found them?

Engine efficiently detects if the file contains AGS data, either stand-alone or attached to exe.
I am not sure if Android launcher does the same. I think it checks whether the file contains traces of being originally created as "acwin.exe" (and to check that it requires the file to have PE header).

Thing is, I suspect that in the sektor666's situation the launcher cannot detect the real game data (ac2game.dat) because it had its executable part cut off, and, although it detects another file (2mb exe) and lets to run it, the engine cannot use that file, because it does not actually have a game data inside.
« Last Edit: 04 Oct 2013, 14:35 by Crimson Wizard »

monkey0506

  • AGS Project Tracker Admins
  • 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)
    •  
Re: AGS engine Android port
« Reply #445 on: 04 Oct 2013, 15:39 »
Ohhhh. Yes, that makes sense now. ;) My bad. I had assumed that the engine library and the launcher app would be detecting game files the same way. Clearly that's not the case. Maybe they could use a hex editor to append (rather, "prepend") acwin.exe onto a copy of ac2game.dat and see if the launcher finds and runs that?

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 #446 on: 04 Oct 2013, 17:14 »
Maybe they could use a hex editor to append (rather, "prepend") acwin.exe onto a copy of ac2game.dat and see if the launcher finds and runs that?
Maybe... the engine does not care what is prepended to file it was pointes to, all it needs is to find certain tags at the beginning or at the end of file.

I do not know why JJS did the launcher this way. Unless Android imposes restrictions on what actions can Java program do with binary files in the game's folder, the better way would be to just do same checks: there must be either "CLIB" at file's start, or "CLIB\x1\x2\x3\x4SIGE" at the end.
(FYI: what is '\x' character in C-string)


PS. In hex :)
Start:  43 4C 49 42
End:    43 4C 49 42 01 02 03 04 53 49 47 45
« Last Edit: 04 Oct 2013, 17:20 by Crimson Wizard »

Re: AGS engine Android port
« Reply #447 on: 05 Oct 2013, 23:08 »
okay so... i got them working. i don't know what was the issue exactly, but i suspect that it might've been caused by installing the bundle versions over the retail ones, with some files being redundant. i deleted them completely and reinstalled from the bundle setup, and there are no ac2game.dat files in any of the game directories, just the exes. and now they work correctly (well apart from recurring random crashes, but i understand that's just something i have to deal with when using the android port), so it must've been a messed up installation.

monkey0506

  • AGS Project Tracker Admins
  • 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)
    •  
Re: AGS engine Android port
« Reply #448 on: 06 Oct 2013, 05:17 »
recurring random crashes, but i understand that's just something i have to deal with when using the android port

This really shouldn't be the case, but there are a lot of reports of these random crashes on Android. I'm trying to narrow it down, but I'm highly suspicious that it has to do with the OpenGL implementation used by the hardware renderer.

Re: AGS engine Android port
« Reply #449 on: 06 Oct 2013, 11:29 »
if it's of any help, they usually happen to me during dialogues, especially if i start skupping characters' slines

Re: AGS engine Android port
« Reply #450 on: 06 Oct 2013, 12:35 »
Hi, sorry but I dont understand the manual in file https://github.com/adventuregamestudio/ags/blob/master/Android/README.md

There is text:
Adding games to the game list

By default games have to be placed into the external storage device. This is usually the SD-card, but this can vary.
Place the game into the directory

<EXTERN>/ags/<GAME NAME>/

is what will be displayed in the game list.



So, i downloaded compiled AGS engine port for android from here:
http://jjs.at/daily/
..and intalled on my Android mobile phone.

But I dont know - what i have to put in my folder sdcard/ags? I have simple testing game "mygame" created in AGS 3.2.1 for Windows.

What I have to put to this folder?  Whole game or compiled EXE ?

Please, can someon specify what to do to run the game on Android step by step? Thank you!

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 #451 on: 06 Oct 2013, 14:17 »
What I have to put to this folder?  Whole game or compiled EXE ?

Same as with running the game on Windows, you need all relevant files.
If we are speaking about game that you have created, it is usually all files that appear in "Compiled" folder after you command to build the game in the Editor.
If we are speaking about other people's games that you've downloaded: if it was a common archive (zip or else), just copy all the contents of the package; if it was an installation program, install the game, then copy everything from the place where you installed it.

Re: AGS engine Android port
« Reply #452 on: 06 Oct 2013, 18:08 »
What I have to put to this folder?  Whole game or compiled EXE ?

Same as with running the game on Windows, you need all relevant files.
If we are speaking about game that you have created, it is usually all files that appear in "Compiled" folder after you command to build the game in the Editor.
If we are speaking about other people's games that you've downloaded: if it was a common archive (zip or else), just copy all the contents of the package; if it was an installation program, install the game, then copy everything from the place where you installed it.

Thank you for your reply. My game works! :)

I have another question - can I create ONE-PACKAGE-GAME?
I want that somebody can download my "game" for Android in one-package (engine+game) and run it by "one click"?

monkey0506

  • AGS Project Tracker Admins
  • 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)
    •  
Re: AGS engine Android port
« Reply #453 on: 06 Oct 2013, 20:50 »
It's definitely possible to create a stand-alone app. There was recently a game released in the Play store that does that. It's also something I'm working on. I'm trying to sort out the cause for some of the major issues with the Android port before I release anything.

If your game is over about 42 MB then you'll have to sort out a way of utilizing the expansion OBB files.

Re: AGS engine Android port
« Reply #454 on: 29 Oct 2013, 15:08 »
Hi everyone, particularly JJS and co.

My question concerns the 'breath' feature in Gemini Rue.

As this issue has been put forward in the past, I wonder if there has been any resolution for it: Being able to breath during the gunfight sequences.

I have looked at the bug log on mantis bug tracker, listing similar experiences with other users when attempting to play Gemini rue on their respective android devices.

I also took into consideration the following post on this forum by user zdj:
Quote
"Found a work around for those stuck on the gun training part of Gemini Rue due to the ctrl key issue:
1. Open the game menu by pressing back button
2. Press "keyboard" button.
3. reassign breathe action to the '6' key
4. Resume the game and you can now perform breathe by pressing the 'f' key on the on screen keyboard.

I stumbled upon this by accident and have no idea why it works but it does on my Galaxy S3. I don't know if it works on other phones. "

So far, I have attempted this on my Galaxy S4 but no success.
I have also attempted to map the breath key from 'ctrl' to other letters of the alphabet but am experiencing no success.
My last attempt was with a usb keyboard plugged through an otg cable to my S4. No success.

If there has been a resolution, I would love to hear about. If work is pending then great.

Many thanks

LOA

ps: Gemini Rue version 2.0.0.5 from GOG
AGS Apk is AGS_2013-10-24_16-22-13.apk from jjs' site.

Re: AGS engine Android port
« Reply #455 on: 29 Oct 2013, 18:42 »
Hello, I have problems setting games Castilian, Castilian language in WinSetup wear, but when I run it on my tablet, the game always comes out in English;

As I can do to make you change the language, if I have put Castilian default?

Example: Maniac Mansion Deluxe - has multiple languages, select "Castilian" with WinSetup, keep the changes and copy the game to the tablet, I run in and out in English :S

thanks

P.S: translated with google, sorry

Edit:
fixed hehe thx
« Last Edit: 29 Oct 2013, 23:20 by davoker »

Re: AGS engine Android port
« Reply #456 on: 31 Oct 2013, 13:04 »
Well, in response to my own original post on this thread, I would like to state that the suggestion made by user zdj DOES actually work.

I made the error of attempting to breath while ducked behind cover. By the time I had plugged in the keyboard (via otg), the original ctrl settings had booted up (from my earlier gemini rue save)

So, to clarify for anyone else who wishes to 'breath' in Gemini Rue on an android device (mine specifically being a samsung galaxy S4), I suggest using zdj's advice of doing the following (my own additions included)

1. Open the game menu (by hitting the back button
2. Hit the keyboard button in the menu (assuming your copy of Gemini rue has that feature, earlier copies lacked keyboard key remapping)
3. Reassign the 'breath' fuction from ctrl to the number 6
4. Return to the game and when prompted to breath during the game, step out of cover (so that you are now aiming at your target) and tap the 'F' key to breath, not 6!

And that is your (current) solution. So far, I guess neither zdj or myself know the reason why this works.
Additional note: This is confirmed working on zdj's Galaxy S3 and on my Galaxy S4.

Enjoy friends and I look forward to AGS developing further for Android.

LOA

Hi everyone, particularly JJS and co.

My question concerns the 'breath' feature in Gemini Rue.

As this issue has been put forward in the past, I wonder if there has been any resolution for it: Being able to breath during the gunfight sequences.

I have looked at the bug log on mantis bug tracker, listing similar experiences with other users when attempting to play Gemini rue on their respective android devices.

I also took into consideration the following post on this forum by user zdj:
Quote
"Found a work around for those stuck on the gun training part of Gemini Rue due to the ctrl key issue:
1. Open the game menu by pressing back button
2. Press "keyboard" button.
3. reassign breathe action to the '6' key
4. Resume the game and you can now perform breathe by pressing the 'f' key on the on screen keyboard.

I stumbled upon this by accident and have no idea why it works but it does on my Galaxy S3. I don't know if it works on other phones. "

So far, I have attempted this on my Galaxy S4 but no success.
I have also attempted to map the breath key from 'ctrl' to other letters of the alphabet but am experiencing no success.
My last attempt was with a usb keyboard plugged through an otg cable to my S4. No success.

If there has been a resolution, I would love to hear about. If work is pending then great.

Many thanks

LOA

ps: Gemini Rue version 2.0.0.5 from GOG
AGS Apk is AGS_2013-10-24_16-22-13.apk from jjs' site.

Creator

    • I can help with AGS tutoring
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with voice acting
    •  
Re: AGS engine Android port
« Reply #457 on: 18 Nov 2013, 10:04 »
Sorry to post, again, another "it doesn't work" help requests, but I can not for the life of me get my game to show up.

EDIT - I now get the game to show up, but I get "script link failed: Runtime error: unresolved import 'Character::ChangeRoom^4'. I don't get this error on Windows though.
EDIT 2 - I got another game to work however. I guess there's something in my scripts that makes it stuff up. I do have the keyboard movement module in the first game I tried, maybe that's it?
EDIT 3 - Actually, with all games except one this happens, regardless of how many modules I have. :/

I downloaded the latest engine from the link in the OP and installed it on my phone (Galaxy Note 3). When I put my game (.exe, winsetup and acsetup.cfg) on the SD card (I make a folder in there called ags, then another folder in that which mirrors my game's name) and run the app, it says there's no game installed in "storage/emulated/0/ags". I even created folders mimicking that and can't get the games to show up.
« Last Edit: 18 Nov 2013, 12:20 by Creator »

monkey0506

  • AGS Project Tracker Admins
  • 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)
    •  
Re: AGS engine Android port
« Reply #458 on: 18 Nov 2013, 19:48 »
AFAIK, "Character::ChangeRoom^4" is from the Draconian build, which adds an extra parameter to Character.ChangeRoom, isn't it?

Games built with the Draconian engine (or probably most any other modified engine) will not work with this engine. I believe there are some plans to include some of Drake's work in the official builds, but you'll have to actually compile the game with either AGS 2.5-3.2.1 or this 3.3.0 engine.

Creator

    • I can help with AGS tutoring
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with voice acting
    •  
Re: AGS engine Android port
« Reply #459 on: 18 Nov 2013, 22:29 »
Ah, damn. You're 100% correct, monkey. I'm using the draconian edition because I like the black background in code. Oh well, no biggie. I'll get a vanilla version and try it when I'm back on my PC.

EDIT - Yep, as you said. Compiled them with AGS 3.2.1 and it's fine.
« Last Edit: 19 Nov 2013, 02:11 by Creator »