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

AnasAbdin

  • Peace, Love and AGS
Re: AGS engine Android port
« Reply #660 on: 13 Nov 2016, 03:54 »
All the AGS_2014-4-30.apk links I tried are dead links :(

Re: AGS engine Android port
« Reply #661 on: 26 Dec 2016, 07:51 »
I've been trying to use the bitbucket link and the latest apk from jjs, but I get a lot of crashes. It seems to happen on all games, though I've only tried it on wadjet eye games. Blackwell and resonance. The crashes happen often enough that the games are almost unplayable. Is there a more stable version I should be using? Is anyone else experiencing this issue? I'm using a Moto g3 running Android marshmallow, stock unrooted.

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 #662 on: 26 Dec 2016, 08:17 »
Do you get any error messages on those crashes?

By the way, I would not recommend using JJS's apks. It's not only that they are very old and not compatible with the recently released games, but also they have "threaded audio" option hardcoded in enable state, and later we found that threaded audio causes lots of problems on non-Windows systems.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on a game that was nominated for an AGS Award!
Re: AGS engine Android port
« Reply #663 on: 26 Dec 2016, 10:01 »
@AnasAbdin: Here I've uploaded it for you: http://www.mediafire.com/file/s3jbztzoi71oei8/AGS_2014-4-30.apk
There are those who believe that life here began out there...

Re: AGS engine Android port
« Reply #664 on: 26 Dec 2016, 21:25 »
@Crimson Wizard I am just getting the "Unfortunately AGS has stopped" popup and crash back to the launcher. I have looked for any available log files, but haven't found anything relevant. I don't have a rooted device if that makes a difference. Is there something I can do to get a more verbose output?

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 #665 on: 26 Dec 2016, 22:51 »
First of all, I believe the most recent version should be tested. We cannot debug and support 2014th and earlier versions anymore.
That's a big problem that up-to-date versions are not linked anywhere in this thread. I think we need to address this issue asap.

Meanwhile, I used build server to make the APK which corresponds to the latest official AGS 3.4.0:
http://www.mediafire.com/file/2ull91f9a7a9439/AGS-android-3.4.0-P1.zip

Could you test it instead and tell how it runs for you?

Re: AGS engine Android port
« Reply #666 on: 27 Dec 2016, 02:53 »
The version you posted has an issue I've seen with all the other nightlies from the build server (that didn't crash immediately) which is that the cursor is stuck on the left hand side of the screen. It can move vertically, but no horizontal movement is possible. Also, it is missing the three dot menu button that allowed toggling of the on-screen keyboard. I believe this is an Android SDK compatibility feature. The stated way to open the keyboard is with the menu button, but most modern devices do not have a menu button.
« Last Edit: 27 Dec 2016, 02:54 by Bhaal87 »

cat

  • Mittens Baronet
  • AGS Baker
  • Now investigating MonoAGS
    • 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 #667 on: 27 Dec 2016, 10:33 »
http://www.mediafire.com/file/2ull91f9a7a9439/AGS-android-3.4.0-P1.zip

Could you test it instead and tell how it runs for you?

I just tried this version on my Android phone. I can start games, but the mouse cursor is still stuck to the left edge of the screen, I cannot move it anywhere else, so it it absolutely not usable at the moment.

Are there any tests I could do to help narrow down the problem?

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 #668 on: 29 Dec 2016, 13:45 »
I will have more free time in the beginning of January, then I hope to study how Android port works.

Mehrdad

    • I can help with animation
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with web design
    •  
Re: AGS engine Android port
« Reply #669 on: 29 Dec 2016, 16:43 »
I will have more free time in the beginning of January, then I hope to study how Android port works.

Great news CW . I'm sure it's a start to generate Android port from editor. Please do it .

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 #670 on: 29 Dec 2016, 17:45 »
I will have more free time in the beginning of January, then I hope to study how Android port works.

Great news CW . I'm sure it's a start to generate Android port from editor. Please do it .

No, all I want is to find out if I can make 3.4.0 version work on Android. (I was replying to cat's and Bhaal87's reports above) I have no plans concerning the Editor.
« Last Edit: 29 Dec 2016, 20:39 by Crimson Wizard »

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 #671 on: 06 Jan 2017, 21:09 »
Just to report my progress; I am not an Android developer, and did not yet manage to build Android port myself, but I learnt how to launch it on emulator program called BlueStacks on my PC.

Running a random game, I found this in the AGS logs:
Quote
Succeeded. Using gfx mode 1 x 1 (32-bit) windowed
   filter dest (0, 0, 0, -1 : 1 x 0), render dest (0, 0, 0, -1 : 1 x 0)

Mouse confined: (0,0)-(0,199) (1x200)
...along with numerous failed attempts to set gfx mode 0 x 0.

I have a feeling this may explain why the mouse is so weird. Well, going to look into this further.


PS. By the way, Android game launcher should be updated to make it work without need of renaming all game files to ac2game.dat. Windows and Linux engines use completely different way of game detection, which should be used everywhere now.
« Last Edit: 06 Jan 2017, 21:21 by Crimson Wizard »

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 #672 on: 07 Jan 2017, 01:00 »
Ok, I think I fixed the mouse issue, please try new APK:
http://www.mediafire.com/file/co45wtuxfa0h232/AGS-android-3.4.0-P1-fix1%282%29.zip

Mehrdad

    • I can help with animation
    •  
    • I can help with characters
    •  
    • I can help with story design
    •  
    • I can help with web design
    •  
Re: AGS engine Android port
« Reply #673 on: 07 Jan 2017, 12:17 »
Ok, I think I fixed the mouse issue, please try new APK:
http://www.mediafire.com/file/co45wtuxfa0h232/AGS-android-3.4.0-P1-fix1%282%29.zip

Mouse isn't calibrate with finger. maximum distance in corner Up_Left and minimum distance in Down_Right . My mean is corner of Down_Right is OK.

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 #674 on: 07 Jan 2017, 13:23 »
Mouse isn't calibrate with finger. maximum distance in corner Up_Left and minimum distance in Down_Right . My mean is corner of Down_Right is OK.
I do not have any idea of what that even means...

My fix was regarding mouse cursor sticking to the left border of the screen.
I recall there are couple of mouse-behavior settings in the AGS Launcher, could you check them up?

cat

  • Mittens Baronet
  • AGS Baker
  • Now investigating MonoAGS
    • 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 #675 on: 07 Jan 2017, 14:42 »
Thanks for looking into the mouse issue!

I can now now move the mouse, but the position, where I put my finger is not the same as where the mouse cursor is or where the click event is performed.
When I have the finger in the upper-left corner, finger position and mouse cursor match. But the further I move my finger down or right, the more the cursor moves down or right. I guess this is what Mehrdad was trying to say.
When I check the "relative mouse control" option, the behaviour working relative, as expected, but there is still this issue with the finger position affecting the scaling.

I tried a different scaling (i.e. none) and now I have a different behaviour as well. The game is now rather small and centered so I cannot be as precise with my movements. However, when I move the finger to the left or top, there seems to be an invisible border. The cursor can't get past it and is restricted to the area below and right. But I can move it out of the screen on the right bottom border.
« Last Edit: 07 Jan 2017, 14:53 by cat »

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 #676 on: 07 Jan 2017, 15:25 »
but the position, where I put my finger is not the same as where the mouse cursor is or where the click event is performed.
When I have the finger in the upper-left corner, finger position and mouse cursor match. But the further I move my finger down or right, the more the cursor moves down or right. I guess this is what Mehrdad was trying to say.
When I check the "relative mouse control" option, the behaviour working relative, as expected, but there is still this issue with the finger position affecting the scaling.

I tried a different scaling (i.e. none) and now I have a different behaviour as well. The game is now rather small and centered so I cannot be as precise with my movements. However, when I move the finger to the left or top, there seems to be an invisible border. The cursor can't get past it and is restricted to the area below and right. But I can move it out of the screen on the right bottom border.

I can reproduce this behavior when the game is larger than 320x200. I found that Android port is made to report device resolution as 320x200 at all times, regardless of real device size. This means that AGS thinks that game is always stretched to 320x200. Naturally, if the game is 320x200 too, there is no problem, but when games is hi-res, there is mismatches between what AGS thinks is correct (cursor) coordinates and real coordinates.

In other words, drawing coordinates are always thought to be 320x200, but mouse coordinates are probably real...

What is your game resolution, and what happened when you tried same game with older APK?
« Last Edit: 07 Jan 2017, 15:26 by Crimson Wizard »

cat

  • Mittens Baronet
  • AGS Baker
  • Now investigating MonoAGS
    • 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 #677 on: 07 Jan 2017, 15:40 »
The resolution of the game I tried is 640x360.

I tried it with an older version from monkey0506 some time ago (https://bitbucket.org/monkey0506/ags/downloads/AGS-3.4.0.6.apk) and it worked then.

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 #678 on: 07 Jan 2017, 17:55 »
I think I found what was wrong (comments below). Please try another APK:
http://www.mediafire.com/file/dy8cuhctzy1cadg/AGS-android-3.4.0-P1-fix2.zip

Technical commentary follows:

So, the real issue is that when JJS was making these mobile ports, he created a discrepancy. Historically AGS deals with virtual->real coordinates conversion on its own. That is: it calculates how the game's frame should be positioned on real window or fullscreen, and also does mouse cursor position scaling.
However, iOS and Android (not sure about PSP) ports have those conversions done in the backend library (versions of Allegro library, which JJS has written for the ports). This creates an annoying situation when you cannot simply add a new feature or change code related to graphics mode or mouse movement, but have to keep in mind that different ports may apply their own adjustments or report unexpected or useless screen parameters. This also cause duplication of functionality: for example, there is mouse scaling programmed inside AGS engine, and also mouse scaling programmed in Android library. (So I had to turn off mouse scaling inside AGS for Android and iOS to solve this bug).

Ideally, virtual->real coordinate transformation should be done in one place, either core engine code, or back-end library (probably latter is more correct). But current situation is that it's done in one place for one set of engine ports, and in another place for another set of engine ports.
« Last Edit: 07 Jan 2017, 17:57 by Crimson Wizard »

cat

  • Mittens Baronet
  • AGS Baker
  • Now investigating MonoAGS
    • 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 #679 on: 08 Jan 2017, 12:56 »
Now it's working! Thank you so much! Absolute and relative mouse modes work, as well as fullscreen scaling with and without aspect ratio.

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.