Jibble

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

eri0o

Re: AGS engine Android port
« Reply #940 on: 24 Jan 2021, 23:38 »
Sorry, I must have sent a file wrongly or closed the window before Google Drive finished uploading

>> app-debug.apk <<

>> app-debug-cpprelease.apk <<

I have a new version that has a bit more fixes reggarding screen orientation. I also managed to fix the software renderer errors, at least it appears to work on my phones.

I also added above a version that has the AGS Engine, which is written in C++, built for release with some optimizations and the rest of the app that has Java parts is built for debug, this is kinda non recommended but allows to get more performance and test something more representative of the final app. In my tests the release build of the native part was 5 times faster then it's debug version.
« Last Edit: 25 Jan 2021, 03:22 by eri0o »

Re: AGS engine Android port
« Reply #941 on: 25 Jan 2021, 09:59 »
Great! Thanks!

From the initial testing:

Unawoved, 15 minutes without crashing - so far, so good :)
Kings Quest III Redux - for some reason, the game now launches in a miniature window in the upper left corner?

Settings aren't always working - cannot set some games to run with a relative mouse mode - Unawoved i.e. starts with touch controls, A Tale of Two Kingdoms starts with relative mouse - no matter the settings.

Ignore aspect ratio doesn't seem to work (I like my games stretched for full-screen, regardless of the proper aspect ratio).

Will test some more.

eri0o

Re: AGS engine Android port
« Reply #942 on: 25 Jan 2021, 11:29 »
Sorry, I uploaded the wrong binaries - ton of folders with the same names... Now I uploaded the correct binaries and settings and other things should work, including King's Quest.  8-)

Edit: Stretching will only work with Hardware rendering. I need to figure out how to do this with the software renderer on Android.

Edit2: I still need to figure out how to deal with relative mouse control, regular ags already supports it through an acsetup.cfg flag called control_enabled = 1, but I don't know yet how to properly map this, it seems that the old Android port did this through a different way for some reason I don't know yet. For now, I believe this specific setting doesn't do anything.

I also haven't wired longclick yet, trying to think if there's a different way to do right click.

Edit3: Full HD videos can be slow in the pure debug build but should run better in the cpprelease version. I don't know why yet it isn't better.
« Last Edit: 25 Jan 2021, 12:15 by eri0o »

Re: AGS engine Android port
« Reply #943 on: 25 Jan 2021, 12:19 »
Long click could be made through double clicking and holding On a second click. I map it like that in Magic Dosbox for some games. Or just activating on a long click without moving around after a second.

Re: AGS engine Android port
« Reply #944 on: 25 Jan 2021, 19:22 »
Tested some more:

Unawoved
Shardlight
Kings Quest I, II, III, III Redux
Quest for Infamy
A Tale of Two Kingdoms
Mages Initiation
The Order of the Thorne

Flawlessly so far.

1) However, as mentioned before - relative mouse setting doesnt work, games choose mouse mode seemingly at random.

2) Stretching (ignoring aspect ratio) only works with Hardware Pixel Perfect mode, meaning you cannot use filtering.

3) Left Mouse Button click activates immediately on touch, no room for moving the cursor in relative mode; either the client should differentiate *move* from *click*, or there should be half a second delay before a *click* activates. Or activating *click* once you let go of the screen? Right click doesnt seem to be working in some games either (the ones which launch in relative mode by themselves).

4) Rotate only works in AGs menu, as mentioned before.

5) Making use of the back button.

Personally, fixing 1) and 3) would make this client perfect.

As to the additional info in games list you mentioned before, a thumbnail would be perfect, but I guess that is off the limits as we only have some metadata to choose from. I dont really know, producer/developer name i. e.?
« Last Edit: 25 Jan 2021, 19:32 by Jinx1337 »

Re: AGS engine Android port
« Reply #945 on: 26 Jan 2021, 14:02 »
If there is anything in particular you would like me to test, feel free. Any AGS game too.

eri0o

Re: AGS engine Android port
« Reply #946 on: 27 Jan 2021, 11:34 »
Sorry for disappearing on you, I was taking my time to figure out how to build it on the cloud. I still need to figure out better though since it's not installing on my phone - the cloud built app, it appears to be a conflict with play protect, but not sure yet.

I will work on the other issues next, just need to figure out if my signing is proper and other new rules on Android! Thanks for making me a list!  :-D

I will leave the link for the cloud built artifact here in case you have any ideas - but again, for me it didn't installed. The website is terrible on mobile though and it has a super confusing web interface, so I also added direct links. Again, those didn't install on my devices.

Spoiler: ShowHide


« Last Edit: 27 Jan 2021, 17:03 by eri0o »

Re: AGS engine Android port
« Reply #947 on: 27 Jan 2021, 15:35 »
No worries; I know you're doing it for free in your past time, so no rush - I am happy you are working on it at all.

Weird, the direct links worked for me and I 've installed the apps (third party apps allowed in DEV settings of my device and PlayProtect security bypassed by allowing on prompt).

I take it there has been no changes yet? Or is there anything you'd like me to try out?

edit:

One more thing that came to my mind, it is mostly cosmetic, but still - since I have been playing lots of old games through Magic Dosbox / ScummVM on my device:
If we could try making the cursor screen-refresh rate smooth and not move in a jittery motion (relative mouse mode), it could be a little more helpful for pixel hunting in games.

Magic Dosbox and ScummVM emulates the cursor moves smoothly, whereas AGS moves at half the refresh rate :)
« Last Edit: 27 Jan 2021, 15:43 by Jinx1337 »

eri0o

Re: AGS engine Android port
« Reply #948 on: 27 Jan 2021, 16:40 »
No no changes, I have been trying to figure out why it doesn't install for a ton of hours.  >:(

Now that you told me that you managed to install it must be something on my phones. I will go on with this then and just install through adb for now until I can understand what's happening. I think it's related to my security configuration on Play Protect on the device then. Thank you so much! I would be locked trying to understand for a ton of time if you hadn't told me!!!  :)

In AGS I think the cursor is locked to being rendered along with the screen, and for some reason I don't know a lot of AGS games are made set to use 40fps. This may be possible to change in the future, but it would have to be done in a way that works on all platforms. I can look on it, but it will be in the future and not solely related to Android.

Crimson Wizard

  • Local Moderator
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Lifetime Achievement Award Winner
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: AGS engine Android port
« Reply #949 on: 27 Jan 2021, 16:49 »
In AGS I think the cursor is locked to being rendered along with the screen, and for some reason I don't know a lot of AGS games are made set to use 40fps. This may be possible to change in the future, but it would have to be done in a way that works on all platforms.

The point is in making update and render calls independent in time, where mouse cursor position will be updated along with render. Then engine will have  separate "ups" (updates per second) and "fps" (frames per second).

This will solve other problems too, such as vsync causing game animations to suddenly run slower if default game speed was set higher than 60 fps (and just basically prevent speed of rendering to affect internal game logic and vice versa).
« Last Edit: 27 Jan 2021, 16:57 by Crimson Wizard »

eri0o

Re: AGS engine Android port
« Reply #950 on: 27 Jan 2021, 17:08 »
Quote
The point is in making update and render calls independent in time, where mouse cursor position will be updated along with render. Then engine will have  separate "ups" (updates per second) and "fps" (frames per second).

This will solve other problems too, such as vsync causing game animations to suddenly run slower if default game speed was set higher than 60 fps (and just basically prevent speed of rendering to affect internal game logic and vice versa).

That would be super nice! For game logic in particular, one idea I had is having the repeat callbacks to pass a parameter that would be a float number representing the elapsed delta time in seconds since last call, like void repeatedly_execute(float dt), this would allow more fluid tween - this is how is done in love2d. Engine wise, I have no idea how to actually implement this though.

Re: AGS engine Android port
« Reply #951 on: 27 Jan 2021, 18:05 »
No no changes, I have been trying to figure out why it doesn't install for a ton of hours.  >:(

Now that you told me that you managed to install it must be something on my phones. I will go on with this then and just install through adb for now until I can understand what's happening. I think it's related to my security configuration on Play Protect on the device then. Thank you so much! I would be locked trying to understand for a ton of time if you hadn't told me!!!  :)

In AGS I think the cursor is locked to being rendered along with the screen, and for some reason I don't know a lot of AGS games are made set to use 40fps. This may be possible to change in the future, but it would have to be done in a way that works on all platforms. I can look on it, but it will be in the future and not solely related to Android.

I have doubled checked and reinstalled both debug and release version again (from the direct links) - both times got the PlayProtect prompt if I am sure to do so.
So yeah, something to do with that, I suppose (I take it you have enabled third party apps installation in the dev menu of your devices).

edit:

I don't suppose it matters, but just for the record, I am downloading and installing them straight from the device.
« Last Edit: 27 Jan 2021, 18:13 by Jinx1337 »

Re: AGS engine Android port
« Reply #952 on: 31 Jan 2021, 12:29 »
Hello I just came across the AGS Android port and it works really great. I know the right-click is still not working.One question though i tried to redirect the game folder to an actual sdcard not the emulated internal one and the game was recognized but got a warning no authorization for save games and it crashes. I set the ags to allow storage and it works in the emulated/0 storage. The reason I'd like to be able to use the real sdcard is because I have lots of space on it vs the cramped internal one. Anyway am I doing something wrong or is there a fix for it? Again thanks for the hard work and I'm checking here frequently for Right-mouse update and this storage question.
Thank you for your continued dedication.
« Last Edit: 31 Jan 2021, 12:31 by tservo »

eri0o

Re: AGS engine Android port
« Reply #953 on: 01 Feb 2021, 01:24 »
 I need specific details of your device, what phone, Android version,... These are in settings->about->Software Information. What did you type when configuring the directories? By using this information what I can try is to create a device in the emulator to attempt to reproduce the issues. The specifics of the errors are also valuable, if you have a error message, having the specific error message can save a lot of time.
« Last Edit: 01 Feb 2021, 01:56 by eri0o »

Re: AGS engine Android port
« Reply #954 on: 01 Feb 2021, 05:29 »
Hi I actually went thru the whole thread and found the midi fix,works great  now and installed ver 3.50.25 debug and the back button,keyboard and right mouse button works on all my ags games from old to newest. Problem solved. The sd card location I put in under the preferences is path: /storage/F203-17FF/ags/   
the error was 'cannot do save to that location'.  Looks like reading the thread all versions seem to only work from the /emulated/0/ags location.But since everything works well now its ok.  Thank you for your fast reply. I am so happy I found this site  :smiley: :)

Re: AGS engine Android port
« Reply #955 on: 03 Feb 2021, 20:04 »
eri0o - any updates to your builds?

I am itching to test some more :)

eri0o

Re: AGS engine Android port
« Reply #956 on: 04 Feb 2021, 01:42 »
I actually added relative mouse mode here

https://cirrus-ci.com/task/6019375054454784

I know it's not perfect but I would prefer to fix on SDL2 itself - if it's not possible, then I would reimplement on the AGS Engine.

The bug is that you can hold the finger on the screen to drag the mouse but the first time the finger touches the screen it registers a click. This is wrong, it should only register the click on a quick tap not on touch-hold. I am using the relative mouse mode provided by the new backend though instead of implementing my own.

Unfortunately in the meantime a bunch of things happened so I am kinda really low on time now.
« Last Edit: 04 Feb 2021, 01:54 by eri0o »

Re: AGS engine Android port
« Reply #957 on: 08 Feb 2021, 19:52 »
Great. If you manage to fix it, this will basically maje the port 100% playable! :)
I have tested so far and no crashing.

Re: AGS engine Android port
« Reply #958 on: 23 Mar 2021, 11:50 »
Hey eri0o!

Any new updates for this port?
I eagerly await any info :)

eri0o

Re: AGS engine Android port
« Reply #959 on: 23 Mar 2021, 12:03 »
I gave up. Look, I just want to make games, and I will do ports for myself and my games.

People here have too much differences from how I think things should be done (coding wise) and it's too draining for me to try to accommodate that - it resulted in me getting 0 games done in 2020 and getting depressed about it.