[OLD-1] AGS engine Android port

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

Previous topic - Next topic

Mehrdad

Thanks so much . I'm waiting for your good news.
My official site: http://www.pershaland.com/

monkey0506

Source of the Scourge of the Underworld app

This project actually serves well enough as a template for my purposes. It's extremely simple to swap the project files to a new game, a process I've actually done twice this morning already for Scourge DX and Mighty Pirate. I've explained the process in the README, though it will take some time to get everything set up properly the first time (install Android Studio, install gradle 2.10, download prebuilt native libs, setting up the necessary resource files, etc.). That being said, though, it occurred to me that if you are publishing multiple apps on Google Play, that using this git repository as a base, you can check out a branch for your app, make the necessary modifications, and then git will prevent you from having to clone the agsEngineLibrary, google_play_licensing_library, and google_downloader_library libraries multiple times. Since a large portion of the APK code between games is the same, git can keep track of the changes instead of you using multiple project folders. This is what I am doing for the OSD games that I am publishing on Google Play.

At some point I will try to create a separate thread that details, step-by-step, what needs to be done, with images.... at some point.

Mehrdad

#622
Wow . excellent ;)
I'm try but I can't success yet.Your files and 'read me' is nice as problem is in my knowledge. Maybe I need more clear.(Dummies complete)
My official site: http://www.pershaland.com/

AGD2

Quote from: monkey0506 on Tue 02/02/2016 22:28:57
Latest APK: https://bitbucket.org/monkey0506/ags/downloads/AGS-3.4.0.6.apk

I hadn't tested the Android version for a long while, and I downloaded and installed this latest APK build today. For some reason, no matter which AGS game I try to run on my Galaxy S5,it gives me the following error message before quitting and failing to run the game:

Quote
Error
Unable to write to the current directory. Do not run this game off a network or CD-ROM drive. Also check drive free space (you need 1Mb free).

I have all the games stored on a MicroSD card, and I set the game folder accordingly in the preferences (storage/extSdCard/ags). These games all worked in this location with previous versions of the APK that I installed.

Am I overlooking something or is there a new instruction that must be followed to get things working in the latest build?

monkey0506

When you were running the previous build, was the device running on KitKat (Android 4.4) or higher? Does that older APK still work? If so, please let me know which APK you were using previously, because there haven't been changes to the app since the last APK I provided, I just rebuilt the engine.

It seems that the issue is this one, because KitKat removed the ability to write to the SD card except into the app's private data folder.

Just to verify, could you test if Scourge of the Underworld works on your device? This standalone app explicitly uses its own private data folder as the save location. If this app works, then that pretty much confirms that your issue is that the Android OS is preventing writing anything to the SD card.

AGD2

Yeah, I looked through this thread after typing my post above and I came across another report of this causing issues with file permissions after Kit Kat. I was indeed using an earlier OS when I tested the games on Android last time (I believe ICS or Jellybean).

When I moved the game data from my SD card to the phone storage, it did start working again. It'd definitely be good if the game data could still be stored on the SD card, somehow, though.

BTW, I just tested Scourge of the Underworld and it worked fine. Although it installed to my phone's internal storage and couldn't be moved to the SD card via the Application Manager. Can any AGS app explicitly set its own private data folder as the save location?

AGD2

Oh, and one other bug is that tinting/light levels on regions and Tint/SetAmbientTint no longer work when using the Software driver.

gobeye

I've just found this port and disregarding the odd crash it works brilliantly, thanks for the hard work. Couple of questions though:

How do i save? I've found the keys area under menu but pressing the save and restore doesn't do anything? I've also tried pressing the function buttons directly using hacker's keyboard to no avail.

Also I mostly play on my mojo micro console so use a Bluetooth mouse or a controller to control my touchscreen presses. This works ok in AGS other than the android mouse is offset from the in game cursor position which is a bit of a pain. Any ideas on how to fix this? I can probably fudge something with tasker but it would be great to have a native solution.

I'm on the latest build posted.

Cheers

Crimson Wizard

Can anyone tell, whether is would be acceptable to increase default sprite cache size to 100 MB for Android device? We have a restriction in the Android port code that limits cache size to 20 MB always (even regardless the config), and I do not know why is that so.

luifer

greetings and congratulations for making it possible that good old games are possible to play them in the current devices, I just found its AGS-3.4.0.6.apk program to play Quest for Glory 2, but I get the following message,

"warning: your video card must support 32-bit color to play this game.
plase run the setup program and make sure that the "downgrade 32-bit graphics to 16-bit option is not checked before playing"


I hope you can help me how to pass this problem? thanks and sorry if not better place even post it, thanks


Crimson Wizard

#630
Quote from: luifer on Thu 21/07/2016 18:41:20
"warning: your video card must support 32-bit color to play this game.
plase run the setup program and make sure that the "downgrade 32-bit graphics to 16-bit option is not checked before playing"

I cannot find a message like this in the engine nor Android port itself. Do you get this message right in the game, or before the game could load up?

luifer

thanks for your answare, the mesage appear just when the game starts the app looks that work fine but in the game its appear when the game starts. the message its from the game not the app.

Crimson Wizard

#632
I'd suggest to ask game developers for clarification in case following won't work, but thinking logically, you may check config file to see if there is "notruecolor = 1" string mentioned anywhere, and if there is, remove that line.

luifer

Greetings again, I hope not to bother, I could install a new version of AGS.apk which allowed me to run the game without any problem, the game in question is Quest for Glory 2 remake, if you do not mind I would like to know how I can use the arrows of the system keyboard because in this particular game requires using the keyboard arrows, specifically required when the character train with Uhura. Thank you for your attention.

catafracta

Hello.

Since I see it's difficult to find the .apk files for the latest versions of the Android Engine, I decided to try and compile the code available in Github. I am using Eclipse and I have followed the instructions at https://github.com/adventuregamestudio/ags/tree/master/Android , and managed to compile the Java App and the Native Engine Library. I did not build the Native 3rd party libraries because it says it's not necessary.

I'm using Android 7.0 to make the build, both for AGS Engine Library and AGS Game Launcher. Then, once I manage to build the AGS Game Launcher project using "ant" from Eclipse, I exported the project AGS Game Launcher ( export as "Android application" ) and obtained an .apk file. I can install this apk in my mobile (Samsung Galaxy S5) with no problem, but when I try to run it all I get is an error message "Unfortunately AGS has stopped".

I have set up a virtual Android device, in order to try and debug the code, and I've placed many breakpoints in the different methods of GamesList.java. I can run the emulator and see it working in my screen, but when I select "Debug" on Eclipse, then I see in the emulator the message "AGS has stopped", and the debugger doesn't even stop at any break point.

I would really appreciate your help, some clue on where to look to investigate the problem, because I'm completely stuck now.

Thank you very much

Crimson Wizard

#635
Quote from: catafracta on Wed 31/08/2016 21:17:48
Since I see it's difficult to find the .apk files for the latest versions of the Android Engine
Hello.
First of all, we have a build server, where you could get the latest APKs:
http://teamcity.bigbluecup.org/viewType.html?buildTypeId=AdventureGameStudio_EngineAndroid
These downloads could be considered "nightlies". I do not use them myself, but I think they should at least be runnable.
You can click login as a guest - that will still let you download output files.
More info about build server:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=52581.0


Regarding running problems, could you clarify which branch you were building (was it master or another)? Mind that master is our development branch now and may not be fully stable (especially for mobile ports which are tested less often). I recommend building from "release-3.3.5" or "release-3.4.0" branches (depending on the version of the games you are going to run).

catafracta

Thank you very much for the URL of the build serve, that solved my problem.
Regards

SimSaw

Thank you very much for the link too! However I noticed that the current build for Android seems not to work with translations although translations can be configured and work with older versions. Is here somebody who could fix this in the code and let the build server rebuild?

Crimson Wizard

Quote from: SimSaw on Tue 27/09/2016 19:30:57
Thank you very much for the link too! However I noticed that the current build for Android seems not to work with translations although translations can be configured and work with older versions. Is here somebody who could fix this in the code and let the build server rebuild?

SimSaw, I restored some of the older builds on build server. The link is the same (http://teamcity.bigbluecup.org/viewType.html?buildTypeId=AdventureGameStudio_EngineAndroid) but it should now have more selection.
(this won't last long, the build server deletes unused builds after some time!)

Could you try different versions: "master", "release-3.3.5" and "release-3.4.0", - and tell which have translation working for you and which not?
I am trying to understand which version has this bug.

SimSaw

#639
Thanks for compiling them. Unfortunately both of them are not working with translations.

Maybe this is a builder configuration issue? I have a version 3.4.0.6 from another page in this thread which works with translations.

SMF spam blocked by CleanTalk