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

Olleh19

  • I'm an AGS n00b, please don't kill me
Re: AGS engine Android port
« Reply #920 on: 07 Oct 2020, 18:40 »
game.agf - this is your game project file for the AGS editor, you do not need to distribute it.

This whole thread is a great mess, and should be locked and reopened with up to date information. I could perhaps do this after I deal with current issues.

I dont think this has anything to do with device model, it's probably that Launcher program has some inconveniencies.
I keep forgetting what the game file should be named to make this work, I must test this with emulator first.

You did see that i tried rename the file right? So that did not work, unfortunaly. I tried with the exe left in the folder, and without. Same outcome.

And YES you are absolutely right. I Wanted to try to build a APK turns out all this does is "play the game on the phone" which is FINE by me. I want to be able to TRY it, but i also would like to try and BUILD a game that works as an APK.
Such information would be REALLY cool to find on here, if there is such information.

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 #921 on: 07 Oct 2020, 18:48 »
OK, I OPEN AGS launcher, i see "windows" THEN i click windows and now i get  Error: "ERROR: Unable to find game data files

Sorry, but could you double check that this is the error message? I need exact wording to find it in the engine.

Also, where did you download AGS Launcher APK from?


E: Building your own APK is also possible, but that's done completely differently.

Olleh19

  • I'm an AGS n00b, please don't kill me
Re: AGS engine Android port
« Reply #922 on: 07 Oct 2020, 19:13 »
OK, I OPEN AGS launcher, i see "windows" THEN i click windows and now i get  Error: "ERROR: Unable to find game data files

Sorry, but could you double check that this is the error message? I need exact wording to find it in the engine.

Also, where did you download AGS Launcher APK from?


E: Building your own APK is also possible, but that's done completely differently.

Thanks for your replies. By accident i thought i would visit ags homepage and download a new launcher, turns out there was a new one released just recently.
It's working fine now on S7 phone. Maybe write in the new thread to ALWAYS use the LATEST version of the launcher.

HOWEVER in my s6 phone it crashes with the same apk latest launcher! If you want the error message for that here is that error:

I click the language i want in my game and then it crashes cause of a object animation. This is the exact message (same game but different phone).

Error: Unable to create local script: Runtime error: unresolved import 'Object::Animate'6'

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 #923 on: 07 Oct 2020, 19:22 »
Error: Unable to create local script: Runtime error: unresolved import 'Object::Animate'6'

This is not an android error, but may mean that game was compiled with newer editor than the engine is.

The latest APK (at this date) should be on this page: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58466.0
« Last Edit: 07 Oct 2020, 19:27 by Crimson Wizard »

Olleh19

  • I'm an AGS n00b, please don't kill me
Re: AGS engine Android port
« Reply #924 on: 07 Oct 2020, 19:56 »
Error: Unable to create local script: Runtime error: unresolved import 'Object::Animate'6'

This is not an android error, but may mean that game was compiled with newer editor than the engine is.

The latest APK (at this date) should be on this page: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58466.0

Thank you very much!

Re: AGS engine Android port
« Reply #925 on: 06 Dec 2020, 02:17 »
Hey all,

Is there a solution yet for the error "Script link failed: Runtime error: unresolved import 'AGSteam::SetAchievementAchieved^1' when trying to run certain AGS games?

I'm trying to run Heroine's Quest v1.2 or higher and am using the last stable build (can't remember the number, but I got it from the link a few posts up.

Thanks!

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 #926 on: 06 Dec 2020, 02:28 »
Is there a solution yet for the error "Script link failed: Runtime error: unresolved import 'AGSteam::SetAchievementAchieved^1' when trying to run certain AGS games?

This was supposed to be fixed in 3.5.0 ports.

If it does not work, I'd need to investigate the game contents. Is it the one from steam?
Maybe it was using steam plugin of older versions which had different name or something.
« Last Edit: 06 Dec 2020, 02:31 by Crimson Wizard »

Re: AGS engine Android port
« Reply #927 on: 06 Dec 2020, 03:06 »
I'm using the previous build.  When I try clicking on Android Launcher for 3.5 in the link referenced above, nothing happens.  Could the link be broken?

EDIT:  I figured it out!  And it works!  Thanks!  :)
« Last Edit: 06 Dec 2020, 03:40 by Iceberg »

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 #928 on: 10 Dec 2020, 05:18 »
I would like to open a new thread for Android port, because this one goes on for many years and contains too much outdated information. Plus the first post contains links that are also outdated and would be difficult to keep up to date all the time anyway (and I don't have perms to edit it at the moment).

I'll notify again when I'm done writing a head post (will find spare time later today).
« Last Edit: 10 Dec 2020, 05:29 by Crimson Wizard »

Re: AGS engine Android port
« Reply #929 on: 15 Jan 2021, 00:13 »
is there any "clear way" to compile my game as .apk ? :shocked: :shocked:

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 #930 on: 15 Jan 2021, 00:16 »
is there any "clear way" to compile my game as .apk ? :shocked: :shocked:

I think this is most recent thread explaining a method: https://www.adventuregamestudio.co.uk/forums/index.php?topic=55681.0

The engine libs for APK mentioned in that post may be found in any recent release post, under "for Android" spoiler: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58747.0

But yes, we need to make a proper explanation somewhere (like in the manual) when someone gets spare time for that  :embarrassed:
« Last Edit: 15 Jan 2021, 00:19 by Crimson Wizard »

Re: AGS engine Android port
« Reply #931 on: 16 Jan 2021, 20:54 »
thanks pal. You dont know me but u helped me a lot for weeks. cheers xd

Re: AGS engine Android port
« Reply #932 on: 23 Jan 2021, 17:03 »
Just tried the newest port of 3.5.0

Several games crashing the App on startup (KQ1, KQ2, A Tale f Two Kingdoms etc.), newer ones launching OK.

Checking for the usual android crashes, will report back later.

Edit: crashes earlier than before. Random crash without auto saving. I would seriously consider paying someone to make AGs playable on Android. It has almost been over two years now...
« Last Edit: 23 Jan 2021, 17:06 by Jinx1337 »

eri0o

Re: AGS engine Android port
« Reply #933 on: 23 Jan 2021, 17:32 »
Can you test this super early app here? >> app-debug.apk <<

The preferences Menu is not working yet - I am still writing that code. MIDI is also not working, so don't expect any MIDI to run correctly. It's using the SDL2 Backend. Also load last save is not working yet - I haven't yet wired that option. Once I finish writin the preferences there is still a lot of work on the mouse.

I haven't yet tested on anything except Android 10 though because it's super early in development.

I also accept money, since these devices are expensive.
« Last Edit: 23 Jan 2021, 21:50 by eri0o »

Re: AGS engine Android port
« Reply #934 on: 23 Jan 2021, 17:47 »
PM me your PayPal/Revolut and I will donate what I can after the 10th of Feb; living in a third world country, so please don't except much - would love to help however I can tho.

Testing it now, but it doesnt find my games?
Path is Sdcard/AGS
Going for storage/emulated/0/AGS doesnt work either.
« Last Edit: 23 Jan 2021, 17:50 by Jinx1337 »

Re: AGS engine Android port
« Reply #935 on: 23 Jan 2021, 18:09 »
(ok, had to manually give the App file access permission since it did not ask - testing severely now, will report back later)

eri0o

Re: AGS engine Android port
« Reply #936 on: 23 Jan 2021, 18:52 »
I fixed the Storage permission request and updated the file on Google Drive.

I thought about showing the file manager to set the directory but I don't know how to test if the phone has a file manager - some phones apparently ship without one. I am still trying to make settings work with the newest model.

Edit: Settings should be working now, but some settings are not implemented yet - even though they show on the menu.

Edit2: Fix settings per game were incorrect, now it correctly sets the android.cfg per game if you use the context menu with long click on a game.

Edit3: Set to ignore acsetup.cfg and use android.cfg in place.

Edit4: Did a bunch of other little fixes but I have two issues I haven't been able to figure out, so I will sleep and try again tomorrow. I have a null on opendir if I try to loadLastSave, resulting in it being skipped, and I have an assertion error on SDL_DestroyTexture_REAL when using the new SDL "Software" renderer, but I don't know why yet.
« Last Edit: 24 Jan 2021, 02:41 by eri0o »

Re: AGS engine Android port
« Reply #937 on: 24 Jan 2021, 09:11 »
Yeah, Unawoved throws up the SDL_DestroyTexture_REAL  error (tho it hasnt in the first version you posted).

Settings show up but do not work, other than that it seems super stable? Didn't get a single crash, but have yet to test Unawoved which was the one to crash the most (tho eventually every game crashed randomly on the regular, official ver.).

I think if you manage to make settings work, make a slight delay before the touch registers as a LMB in the relative mouse mode (whenever you try movong the cursor, it registers as left click on the initial touch), and maybe bind the androids Back button to ESC, we might have a proper winner here! I shall test Unawoved on the older version some more and report.

One suggestion for a setting that the official AGS port lacked - mouse sensitivity for relative mouse mode.

A thousand thank yous for your work, please send me your do nation address through PM.

Edit:
Oh, and something minor - your version does not auto-rotate the screen on phone devices. You need to put your device in portrait mode while in AGS menu, before launching the game, otherwise it will remain in vertical mode.
« Last Edit: 24 Jan 2021, 09:19 by Jinx1337 »

eri0o

Re: AGS engine Android port
« Reply #938 on: 24 Jan 2021, 13:52 »
I updated the build but not with the specific fixes yet. For now the goal is to mirror the original port as faithful as possible ( sans crashes  (laugh))
(but I do plan to improve things in the future...)


Quote
bind the androids Back button to ESC

The previous port had back to show a menu with options like showing the keyboard, using fn functions and exiting the game - or at least it should according to it's code, but this actually didn't work at my phone last time I tested.... So I have been thinking a lot on what to do with the Back button.

Quote
Yeah, Unawoved throws up the SDL_DestroyTexture_REAL  error (tho it hasnt in the first version you posted).

selecting the Hardware Renderer should work - I can't yet fix the Software Renderer, it won't crash now, but it will be super tiny... I think the first version simply ignored and always used the non-Software renderer, this is why it didn't crash.

Quote
A thousand thank yous for your work, please send me your do nation address through PM

I also live in a third world country too, but I am fine now, I actually reflected and I don't need money, but testing and bug reports are much more valuable to me at this time, since if you test things it offloads from me having to test  ;) So just keep reporting bugs!

Quote
Oh, and something minor - your version does not auto-rotate the screen on phone devices. You need to put your device in portrait mode while in AGS menu, before launching the game, otherwise it will remain in vertical mode.

I think it will need one more mode, something like "guess the right orientation and fix it (I think 0 is working like this...), auto-rotate along with the screen, and fixed portrait and and fixed landscape. It's possible to fix landscape but allow changing between both orientation, as fixing portrait but allowing for the phone to be upside down, I don't know yet which modes are best.

Quote
One suggestion for a setting that the official AGS port lacked - mouse sensitivity for relative mouse mode.

I need to check, but I think the Engine already supports this, it's just a matter of exposing in the options menu.

Also, again, thanks for reporting bugs in the Android, there are waaaay too many different devices, I managed to get a Android 7 and Android 8 device here for testing.

Ah, this is useless but was fun to implement, if you change your device between dark and light modes, the app theme should follow along.

Edit:

Ah, the list view of games as soon as you open the App I made up since the previous App used an actual list view component, which has been deprecated in Android. If you have ideas for things/information that would be useful to show per game, I can try to figure a way to add there. I also want to add a button instead of relying on long click for the context menu but I couldn't figure the right way to add this per game - like, design wise what won't look terrible as a button there.
« Last Edit: 24 Jan 2021, 14:11 by eri0o »

Re: AGS engine Android port
« Reply #939 on: 24 Jan 2021, 14:20 »
Thanks a lot for your work on that thing; I adore playing ScummVM/DOSBOX adventure games on my S10+ device, AGS has been the only one that left me begging for it to work.

Have you updated the build? It won't install now and only weights 7.5MB - something with compiling?

I can run unrooted logcat and paste logs once I encounter a crash (which I hopefully won't).