[OLD-1] AGS engine Android port

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

Previous topic - Next topic

Crimson Wizard

#740
Ok, I just realized that you had "undefined reference" error, not "undefined symbol", meaning its a linker error.

The reason could be that Android port links to GLES v1:
https://github.com/adventuregamestudio/ags/blob/master/Android/library/jni/Android.mk


Right now I wanted to split the issue, because all this is becoming bit disorganized.

1) First, compiling Android port without rising platform version.

2) Second, finding a solution for shader problem. Frankly I do not want to discuss it right here in this thread, because it makes it messy.

TBH, personally I would not want to delve too deep into this, because I do not know Android, and cannot predict consequences of my actions.

As a quick fix we could just disable tinting at all for now. Maybe look for a way to fallback to software tinting if hardware one is not supported.

Then, maybe we would need to check for ES version and find out if there is a way to get these functions dynamically, just like Windows port does, to make sure the port supports devices without GLES2.
(Then again, maybe GLES2 is a standard for Android now, and should be available everywhere?)


EDIT: found an example of getting OpenGL functions dynamically:
https://stackoverflow.com/questions/17902243/opengl-es-3-0-in-android-ndk-r9
I keep forgetting Android is just a Linux, so the standard C library linking functions should work.
NOTE: we have a generic wrapper over library linking, class called AGS::Engine::Library.

Crimson Wizard

#741
Alright, I decided to begin anew, reset all the changes I did to my repositories and started following solution eri0o found step by step.

So, what is confirmed is that newest NDKs dropped support for building for Android platforms lower than v 14. Here's some discussions I found:
https://groups.google.com/forum/#!topic/android-ndk/qqRVhXwSN4Y
https://stackoverflow.com/questions/45685227/android-ndk-support-version-limited

History of Android devices:
https://en.wikipedia.org/wiki/Android_version_history


I opened the issue on github regarding this, and couple of accompanying problems: https://github.com/adventuregamestudio/ags/issues/431


Trying to sum up, there are following problems that need to be decided now:
1) Updating building scripts for native libraries, where we need to decide if supporting Android API 9 (Gingerbread and Honeycomb) devices is a must, or we should move to minimal support of API 14 (Ice Cream Sandwich).

Personally, I am not Android user, and have no idea whether these old devices are still in use (the port was originally developed in 2011-2012 when they were still very new).

2) Another thing is how we are going to support GLES2 on Android, for OpenGL shaders (currently uses GLES1). Should we demand it and explicitly link to GLES2 library, or handle it as an option, similarily to Windows version, by loading shader-related functions from the corresponding .so and using them only if they exist.
Note, that unlike Windows version, Android has only OpenGL renderer and cannot change to anything else. Therefore if it fails, the game won't be able to run.

I am trying to find information about GLES2 support on Android devices now.

UPDATE: found super useful statistics page:
https://developer.android.com/about/dashboards/index.html

Notably, it mentions number of devices with given API and GLES support.

From the looks of it, GLES 2 should be supported on 99+% devices. Also I read somewhere that its support was introduced in API level 8, which is below API 14 we may switch to.


PS. Regarding iOS compilation, since there does not seem to be any iOS developer available right now, I would rather simply declare the shader functions as integer constants equal to 0, which would prevent AGS from calling them (or maybe defining empty function stubs).




eri0o

QuoteShould we demand it and explicitly link to GLES2 library, or handle it as an option, similarily to Windows version, by loading functions from the corresponding .so and using them only if they exist.

QuoteNote, that unlike Windows version, Android has only OpenGL renderer and cannot change to anything else. Therefore if it fails, the game won't be able to run.

I feel that from the last sentence, there is no point in per function loading. :/

Crimson Wizard

#743
Quote from: eri0o on Fri 16/02/2018 21:58:13
QuoteShould we demand it and explicitly link to GLES2 library, or handle it as an option, similarily to Windows version, by loading functions from the corresponding .so and using them only if they exist.

QuoteNote, that unlike Windows version, Android has only OpenGL renderer and cannot change to anything else. Therefore if it fails, the game won't be able to run.

I feel that from the last sentence, there is no point in per function loading. :/

Hmm, perhaps I was not clear enough, because I meant opposite.
I was speaking about function loading for optional features (tinting shaders), because then renderer will work even where they are not supported. Which may be important, because unlike Windows version, where you may change to Direct3D or Software renderer, on Android you have to use OpenGL.

Crimson Wizard

#744
I was able to compile AGS port for Android, almost (see note below), using following two changes:

1. Changes to native libs building scripts (practically identical to ones we have in pull request)
https://www.dropbox.com/s/yp3x3vpcfxh3qsu/0001-Android-updated-nativelibs-building-script.patch?dl=0

2. Changes to the Android port itself:
https://www.dropbox.com/s/btiq0tr0py8w93m/0002-Android-fixed-compilation-of-OpenGL-renderer.patch?dl=0

I solved the SwapInterval problem slightly differently, but that's not important. Most important was to add -lGLESv2 to Android.mk makefile, which resolves shader-related functions.

Native engine's .so object was linked, but then it failed on lua plugin, saying something about "no rule to make".

UPDATE I completely forgot that lua plugin is added as submodule! Had to do "git submodule update --init --recursive". Run ndk-build again, everything builds now!

Chicky

#745
Quote from: Crimson Wizard on Sun 18/02/2018 22:03:26
everything builds now!

Woo! Nice work guys ;-D Thank you both for your hard work with this. Exciting!

There are a lot of people who would benefit from this, keep it up :)

Mehrdad

Thanks a lot CW. So is there final apk for 3.4.1? And is any simple guide for making final apk signed with OBB (or without OBB) for Google play?
My official site: http://www.pershaland.com/

Crimson Wizard

#747
Quote from: Mehrdad on Mon 19/02/2018 15:23:13
Thanks a lot CW. So is there final apk for 3.4.1? And is any simple guide for making final apk signed with OBB (or without OBB) for Google play?

No APK yet, and I do not know anything about OBB. I heard you need to use monkey0506's plugin or instructions to make one?
Like eri0o explained here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=55681.0
I guess you may try that later when we have newest APK.

PS. I am currently trying to make APK, need to install Android SDK and hope instructions will work.

Mehrdad

Yes, But seems Monke0506 give up it. I sent some PM to him and wasn't any answer.
OK. Thanks.I'm waiting for final APK. But adventure games need to OBB too as they are more than 100MB often.
My official site: http://www.pershaland.com/

Crimson Wizard

#749
Alright... I really spent too much time on this.

First of all, recent version of Android SDK no longer has "ant" tool in it, which is required for automated building. Searching a little, I found an advice to download the tools pack from the previous version:
https://stackoverflow.com/questions/42912824/the-ant-folder-is-suddenly-missing-from-android-sdk-did-google-remove-it
For example, for linux it is: https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
Simply unpacking and merging this into "tools" dir in the SDK (skipping existing files of course) seemed to work.

( Related, I noticed monkey0506 has a WIP branch where he was updating Android port to build from Android Studio, which may be a way to go. But idk what state his work is in )


After that I finally managed to create Android APK for AGS 3.4.1:
https://www.dropbox.com/s/kwns9ao6yctlvlu/AGS-3.4.1-unsigned.apk?dl=0


Now, I am looking for anyone to try this out with any 3.4.1 game, just to make sure it works. I will test this on emulator, but later, when I remember how it works (or use one from Android Studio, since I have it installed on my Linux vm anyway).
I am probably off for today.

Joseph DiPerla

Quote from: Mehrdad on Mon 19/02/2018 15:51:01
Yes, But seems Monke0506 give up it. I sent some PM to him and wasn't any answer.
OK. Thanks.I'm waiting for final APK. But adventure games need to OBB too as they are more than 100MB often.

The plugin should still work as long as the ags engine library dll is precompiled. In theory. Once Cw can confirm that the android port is a functional port, I can see if I can find time to make monkeys plugin still work.
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Chicky

#751
Quote from: Crimson Wizard on Mon 19/02/2018 18:29:00

After that I finally managed to create Android APK for AGS 3.4.1:
https://www.dropbox.com/s/kwns9ao6yctlvlu/AGS-3.4.1-unsigned.apk?dl=0

Getting 'App not installed. The package appears to be corrupt.' when installing the .apk on my phone, can anyone else confirm this is a problem with the apk and not just me doing something wrong?

--

Also, that sounds great Joseph DiPerla! ;-D

Joseph DiPerla

Quote from: Chicky on Mon 19/02/2018 19:26:07
Quote from: Crimson Wizard on Mon 19/02/2018 18:29:00

After that I finally managed to create Android APK for AGS 3.4.1:
https://www.dropbox.com/s/kwns9ao6yctlvlu/AGS-3.4.1-unsigned.apk?dl=0

Getting 'App not installed. The package appears to be corrupt.' when installing the .apk on my phone, can anyone else confirm this is a problem with the apk and not just me doing something wrong?

--

Also, that sounds great Joseph DiPerla! ;-D

LOL. Hold your applause until I actually achieve something ;-)
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

eri0o

Uhm. For me the apk complains about corrupt too. I tried to upload to Google Play (where there is a analyser) and it complained it wasn't zipaligned. I zipaligned but my phone still think it's corrupt.

I decided to just extract the libs, place in my Android Studio project and try to build, but it got me a new error : Loading game failed with error: Main game file not found. . I did had rebuilt my game with 3.4.1 (it was 3.4.0) and regenerated the obb file.

Spoiler
Code: adb

02-19 22:13:33.581 24301-24301/? I/art: Late-enabling -Xcheck:jni
02-19 22:13:33.900 24301-24301/com.mythsuntold.dungeonhands I/InstantRun: starting instant run server: is main process
02-19 22:13:33.906 24301-24301/com.mythsuntold.dungeonhands V/Monotype: SetAppTypeFace- try to flip, app = com.mythsuntold.dungeonhands
02-19 22:13:33.908 24301-24301/com.mythsuntold.dungeonhands V/Monotype:     Typeface getFontPathFlipFont - systemFont = default#default
02-19 22:13:33.940 24301-24301/com.mythsuntold.dungeonhands V/Monotype: SetAppTypeFace- try to flip, app = com.mythsuntold.dungeonhands
02-19 22:13:33.941 24301-24301/com.mythsuntold.dungeonhands V/Monotype:     Typeface getFontPathFlipFont - systemFont = default#default
02-19 22:13:33.958 24301-24301/com.mythsuntold.dungeonhands D/STORAGE_MNT: SUCCESSFULLY QUEUED
02-19 22:13:33.992 24301-24322/com.mythsuntold.dungeonhands I/Adreno: QUALCOMM build                   : dfab96b, I762e720a6a
                                                                      Build Date                       : 01/31/17
                                                                      OpenGL ES Shader Compiler Version: XE031.09.00.04
                                                                      Local Branch                     : 
                                                                      Remote Branch                    : 
                                                                      Remote Branch                    : 
                                                                      Reconstruct Branch               : 
02-19 22:13:33.998 24301-24322/com.mythsuntold.dungeonhands I/OpenGLRenderer: Initialized EGL, version 1.4
02-19 22:13:33.999 24301-24322/com.mythsuntold.dungeonhands D/OpenGLRenderer: Swap behavior 1
02-19 22:13:34.052 24301-24301/com.mythsuntold.dungeonhands D/PATH =: /storage/emulated/0/Android/data/com.mythsuntold.dungeonhands/files/main.3.com.mythsuntold.dungeonhands.obb
02-19 22:13:34.052 24301-24301/com.mythsuntold.dungeonhands D/STATE =: 1
02-19 22:13:34.055 24301-24301/com.mythsuntold.dungeonhands D/STORAGE: -->MOUNTED
02-19 22:13:34.097 24301-24301/com.mythsuntold.dungeonhands V/Monotype: SetAppTypeFace- try to flip, app = com.mythsuntold.dungeonhands
02-19 22:13:34.097 24301-24301/com.mythsuntold.dungeonhands V/Monotype:     Typeface getFontPathFlipFont - systemFont = default#default
02-19 22:13:34.178 24301-24338/com.mythsuntold.dungeonhands D/AudioTrack: Client defaulted notificationFrames to 1365 for frameCount 4096
02-19 22:13:34.195 24301-24338/com.mythsuntold.dungeonhands D/AGSNative: Unable to initialize your audio hardware.
                                                                         [Problem: DIGMID patch set not found]
02-19 22:13:34.232 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
02-19 22:13:34.232 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
02-19 22:13:34.232 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
02-19 22:13:34.233 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
02-19 22:13:34.233 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
02-19 22:13:34.236 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@745309a
02-19 22:13:34.236 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@e60cdcb
02-19 22:13:38.102 24301-24338/com.mythsuntold.dungeonhands D/AGSNative: Loading game failed with error:
                                                                         Main game file not found.
                                                                         
                                                                         The game files may be incomplete, corrupt or from unsupported version of AGS.
02-19 22:13:38.125 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@99b3831
02-19 22:13:38.125 24301-24301/com.mythsuntold.dungeonhands V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@91c0b16

[close]

As a comparison, below is the output of the normal game package (that runs, uses 3.4.0)

Spoiler
Code: adb

02-19 22:30:07.675 26836-26836/? I/art: Late-enabling -Xcheck:jni
02-19 22:30:07.801 26836-26836/com.mythsuntold.dungeonhands W/ActivityThread: Application com.mythsuntold.dungeonhands is waiting for the debugger on port 8100...
02-19 22:30:07.832 26836-26836/com.mythsuntold.dungeonhands I/System.out: Sending WAIT chunk
02-19 22:30:08.784 26836-26844/com.mythsuntold.dungeonhands I/art: Debugger is active
02-19 22:30:08.834 26836-26836/com.mythsuntold.dungeonhands I/System.out: Debugger has connected
02-19 22:30:08.834 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:09.034 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:09.235 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:09.435 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:09.636 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:09.836 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:10.037 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:10.237 26836-26836/com.mythsuntold.dungeonhands I/System.out: waiting for debugger to settle...
02-19 22:30:10.438 26836-26836/com.mythsuntold.dungeonhands I/System.out: debugger has settled (1407)
02-19 22:30:10.912 26836-26836/com.mythsuntold.dungeonhands I/InstantRun: starting instant run server: is main process
02-19 22:30:10.922 26836-26836/com.mythsuntold.dungeonhands V/Monotype: SetAppTypeFace- try to flip, app = com.mythsuntold.dungeonhands
02-19 22:30:10.931 26836-26836/com.mythsuntold.dungeonhands V/Monotype:     Typeface getFontPathFlipFont - systemFont = default#default
02-19 22:30:11.030 26836-26836/com.mythsuntold.dungeonhands V/Monotype: SetAppTypeFace- try to flip, app = com.mythsuntold.dungeonhands
02-19 22:30:11.031 26836-26836/com.mythsuntold.dungeonhands V/Monotype:     Typeface getFontPathFlipFont - systemFont = default#default
02-19 22:30:11.089 26836-26836/com.mythsuntold.dungeonhands D/STORAGE_MNT: SUCCESSFULLY QUEUED
02-19 22:30:11.227 26836-26996/com.mythsuntold.dungeonhands I/Adreno: QUALCOMM build                   : dfab96b, I762e720a6a
                                                                      Build Date                       : 01/31/17
                                                                      OpenGL ES Shader Compiler Version: XE031.09.00.04
                                                                      Local Branch                     : 
                                                                      Remote Branch                    : 
                                                                      Remote Branch                    : 
                                                                      Reconstruct Branch               : 
02-19 22:30:11.309 26836-26996/com.mythsuntold.dungeonhands I/OpenGLRenderer: Initialized EGL, version 1.4
02-19 22:30:11.309 26836-26996/com.mythsuntold.dungeonhands D/OpenGLRenderer: Swap behavior 1
02-19 22:30:11.441 26836-26836/com.mythsuntold.dungeonhands D/PATH =: /storage/emulated/0/Android/data/com.mythsuntold.dungeonhands/files/main.3.com.mythsuntold.dungeonhands.obb
02-19 22:30:11.441 26836-26836/com.mythsuntold.dungeonhands D/STATE =: 1
02-19 22:30:11.445 26836-26836/com.mythsuntold.dungeonhands D/STORAGE: -->MOUNTED
02-19 22:30:11.541 26836-26836/com.mythsuntold.dungeonhands V/Monotype: SetAppTypeFace- try to flip, app = com.mythsuntold.dungeonhands
02-19 22:30:11.541 26836-26836/com.mythsuntold.dungeonhands V/Monotype:     Typeface getFontPathFlipFont - systemFont = default#default
02-19 22:30:11.799 26836-27023/com.mythsuntold.dungeonhands D/AudioTrack: Client defaulted notificationFrames to 1365 for frameCount 4096
02-19 22:30:11.845 26836-27023/com.mythsuntold.dungeonhands D/AGSNative: Unable to initialize your audio hardware.
                                                                         [Problem: DIGMID patch set not found]
02-19 22:30:11.942 26836-26836/com.mythsuntold.dungeonhands V/BoostFramework: mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
02-19 22:30:11.943 26836-26836/com.mythsuntold.dungeonhands V/BoostFramework: mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
02-19 22:30:11.944 26836-26836/com.mythsuntold.dungeonhands V/BoostFramework: mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
02-19 22:30:11.945 26836-26836/com.mythsuntold.dungeonhands V/BoostFramework: mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
02-19 22:30:11.945 26836-26836/com.mythsuntold.dungeonhands V/BoostFramework: mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
02-19 22:30:11.959 26836-26836/com.mythsuntold.dungeonhands V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@99fed60
02-19 22:30:11.960 26836-26836/com.mythsuntold.dungeonhands V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@bab8219
02-19 22:30:13.442 26836-26842/com.mythsuntold.dungeonhands I/art: Do partial code cache collection, code=27KB, data=28KB
02-19 22:30:13.443 26836-26842/com.mythsuntold.dungeonhands I/art: After code cache collection, code=27KB, data=27KB
02-19 22:30:13.443 26836-26842/com.mythsuntold.dungeonhands I/art: Increasing code cache capacity to 128KB
02-19 22:30:18.464 26836-26842/com.mythsuntold.dungeonhands I/art: Do partial code cache collection, code=50KB, data=62KB
02-19 22:30:18.464 26836-26842/com.mythsuntold.dungeonhands I/art: After code cache collection, code=50KB, data=62KB
02-19 22:30:18.464 26836-26842/com.mythsuntold.dungeonhands I/art: Increasing code cache capacity to 256KB

[close]

I don't know yet what's happening. :/

Crimson Wizard

#754
Alright, so there are two issues: first that the APK is not built correctly for some reason; here I have no idea what to look for, need to investigate and experiment using emulator, I guess.

By the way, did you tried to build APK yourself? You need to use latest release-3.4.1 branch and this patch applied: https://www.dropbox.com/s/btiq0tr0py8w93m/0002-Android-fixed-compilation-of-OpenGL-renderer.patch?dl=0

The second issue is that the AGS engine itself does not find a game or cannot read it. Question: can you run your game if you place pure acwin.exe from 3.4.1 Windows engine in the folder with game files and run it?

Joseph DiPerla

#755
I haven't looked at the source in a while, but the game has to be located in a directory called "AGS". The game itself can not be in a zip. Must be fully extracted in it's own sub-directory under "AGS" and it has to have the main .EXE file in that sub-directory to work. The NDK only compiles the AGS engine into a loadable library. The Java files create a loader which allows you to choose all the games found under the "AGS" directory and then makes a call to the AGS Engine Library to run the selected game. Now I can't recall if the "AGS" directory has to be on the device root or the SD Card root directory. But I will look at the code later on. Hope this helps in some way.

EDIT

I believe the game sub directory needs to be in the external storage. Found this here: ags/Android/launcher_list/src/com/bigbluecup/android/launcher/GamesList.java

Line 60: baseDirectory = settings.getString("baseDirectory", Environment.getExternalStorageDirectory() + "/ags");

I recently switched to iOS so I haven't fired up my old Android device yet. But how far are you getting? Can you try creating a directory called AGS in SD Card Root and see how far you get with that?

However, I believe this directory can be changed via the preferences. And if the directory doesn't exist, by default the GameLister should create it automatically. After you select a game, Line 176 should execute the function that starts the game(Line 196). I get the feeling the loader is just not picking up on the right directory. Does this make any sense?

EDIT #2
Seems I misunderstood the problem. But if my suggestions above help anyone else, great!
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Crimson Wizard

#756
How can you run an APK on emulator in Android Studio on Linux? I know literally nothing about this, don't even know where to start, and fear that it will cost too much time for me than necessary.

Tried to launch Android Studio and choose "Debug APK". Selected the APK I previously built with ant scripts. I do Run -> Debug, it shows a dialog where I need to configure some settings. There I set "Deployment target" to Emulator. The "preferred device" list is empty for some reason.
Also it displays an error : "Please select Android SDK". Where do I select it?

E: frankly I just want to stop at this point. I made the native code compile again, the rest is for Android developers, which I am not.

Joseph DiPerla

When i get home tonight I will take a look if the kids let me have some me time.
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

eri0o

Just a question... In ags/Engine/platform/android/acpland.cpp, when the engine is called with main(1, &psp_game_file_name_pointer), the variable psp_game_file_name_pointer actually has the folder where the GameName.ags is located (in my case, in the device it mounted the obb to a random folder like /mnt/obb/1175cb392d70c5744bffa846b85c5467/ ).I get the error: Main game file not found. The game files may be incomplete, corrupt or from unsupported version of AGS. Now, I couldn't find where it looks for .ags files in the folder, apparently the exception "Main game file not found" is thrown by main_game_file.cpp, in the function OpenMainGameFile and in the function OpenMainGameFileFromDefaultAsset. I couldn't confirm which function is actually being called, or which filename is being looked for. I know only that OpenMainGameFileFromDefaultAsset looks for either game28.dta or ac2game.dta. This is really weird for me because gitblame doesn't show many changes in the android port in 6 years, and I am positive that the prebuilt 3.4.0 finds my game files built for 3.4.0 . :/

So, given a folder, which files does the AGS Engine looks for in the directory?

Crimson Wizard

#759
Quote from: eri0o on Wed 28/02/2018 02:08:24
So, given a folder, which files does the AGS Engine looks for in the directory?

It searches through all files, looking for the ones that have AGS data package format signatures.
game28.dta and ac2game.dta are names of internal assets, not package files themselves.

Could you just add some log output to see which files it tries?

SMF spam blocked by CleanTalk