[OLD-1] AGS engine Android port

Started by JJS, Thu 03/11/2011 20:18:29

Previous topic - Next topic

Olleh19

Quote from: Crimson Wizard on Wed 07/10/2020 18:36:22
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

Quote from: Olleh19 on Wed 07/10/2020 18:18:42
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

Quote from: Crimson Wizard on Wed 07/10/2020 18:48:21
Quote from: Olleh19 on Wed 07/10/2020 18:18:42
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

#923
Quote from: Olleh19 on Wed 07/10/2020 19:13:17
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

Olleh19

Quote from: Crimson Wizard on Wed 07/10/2020 19:22:24
Quote from: Olleh19 on Wed 07/10/2020 19:13:17
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!

Iceberg

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

#926
Quote from: Iceberg on Sun 06/12/2020 02:17:46
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.

Iceberg

#927
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!  :)

Crimson Wizard

#928
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).

Vulpes

is there any "clear way" to compile my game as .apk ? :shocked: :shocked:

Crimson Wizard

#930
Quote from: Vulpes on Fri 15/01/2021 00:13:19
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:

Vulpes

thanks pal. You dont know me but u helped me a lot for weeks. cheers xd

Jinx1337

#932
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...

eri0o

#933
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.

Jinx1337

#934
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.

Jinx1337

(ok, had to manually give the App file access permission since it did not ask - testing severely now, will report back later)

eri0o

#936
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.

Jinx1337

#937
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.

eri0o

#938
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...)


Quotebind 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.

QuoteYeah, 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.

QuoteA 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!

QuoteOh, 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.

QuoteOne 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.

Jinx1337

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).

SMF spam blocked by CleanTalk