[OLD-1] AGS engine Android port

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

Previous topic - Next topic

Matt Frith

Hello. I don't know if anyone else has experienced this but the latest Android build (AGS_2013-04-09_22-04-13) seems to crash out randomly. Currently running it on a Nexus 7 tablet and have yet to try it on my phone (Galaxy S2).  I rolled back to the previous version and it seems to be stable.  Just thought I'd let you know!

Crimson Wizard

Previous Android build was... 10th March? Quite a lot changed in between :-/.

JJS

#362
Joseph DiPerla provided two intermediate builds in this post: http://www.adventuregamestudio.co.uk/forums/index.php?topic=44768.msg636449832#msg636449832 You could also try those.

The newest version is compiled with the latest NDK and GCC 4.7. The previous ones were with older toolchains, I hope this didn't break anything (it didn't for me, but you never know).

Also can you provide system logs (logcat) that show the engine crashing?


Edit: About Ouya... I guess it is all about supporting the controller and providing meta information for their store. Since their launcher app doesn't really work on my phone (screen too small and I cannot manage to sign up) and the launcher also doesn't work on the emulator because it requires a "real" network connection (emulator only has 3g network) I will not do any work on it for the moment. The overarching problem of deploying for Android has not been solved anyway so Ouya support is not that useful right now.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

MrProsser

I am hoping someone can help clarify a few things about this project. I am new to AGS and only recently learned of this port. I have not had a chance to try using it yet, but my understand is that one manually must place the game in a folder ags on the sd card and install the engine. Is this correct?

Also, when I was looking at this a few days ago I thought I read some discussion about coming up with a method that would allow commercial, standalone releases but I cannot find those posts again. I was wondering if this is being worked on and how this was going to be accomplished (and where that discussion might be in here, I would love to read it).

Joseph DiPerla

Quote from: MrProsser on Sat 13/04/2013 07:54:52
I am hoping someone can help clarify a few things about this project. I am new to AGS and only recently learned of this port. I have not had a chance to try using it yet, but my understand is that one manually must place the game in a folder ags on the sd card and install the engine. Is this correct?

Also, when I was looking at this a few days ago I thought I read some discussion about coming up with a method that would allow commercial, standalone releases but I cannot find those posts again. I was wondering if this is being worked on and how this was going to be accomplished (and where that discussion might be in here, I would love to read it).

I am working on both actually. I have AGS Stream (You can find it in the Google Play Store) which I allow it to install the games for you easily. It has a few bugs which I just fixed (It wouldn't download on the SIII, the Nexus Tabs and Transformer Tabs) and I need to implement a game settings option to properly work which I am in the middle of. Also Some users are experiencing issues with the Android port on devices without hardware keys. For instance, they cannot get the Keyboard to be displayed or the menu option for the Function Keys, etc... Once these kinks are worked out, I will add more games. Expect an update to AGS Stream in a couple of weeks.

For the later part, I am also the one working on that. The issue with this latter part is that its not currently integrated into the editor to compile for Android, so I am trying to figure out a way that a user can easily package a game for Android without too much of work going to the Java Side. The next issue is working with OBB Files. But rest assured, I am finding a fix for all of these and will release something in the coming weeks, hopefully. Its just been busy for me lately, so I haven't had a chance to properly work on these things.
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

sunerune

#365
hi. i'm trying to play gemini rue and i have a question: i can't seem to save...

MrProsser

I obtained the latest release and have been trying to build it, but have gotten into trouble pretty quickly. When I try to build the native engine library using ndk-build, as explained in the docs and in this comment I end up getting this error:

Install        : libagsengine.so => jni/../libs/armeabi/libagsengine.so
Install        : libpe.so => jni/../libs/armeabi/libpe.so
Install        : libags_snowrain.so => jni/../libs/armeabi/libags_snowrain.so
Install        : libagsblend.so => jni/../libs/armeabi/libagsblend.so
Install        : libagsflashlight.so => jni/../libs/armeabi/libagsflashlight.so
make: *** No rule to make target `jni/../jni/../../../Engine/../Plugins/agslua/agslua/agslua/agslua_autogen.cpp', needed by `obj/local/armeabi/objs/agslua/__/Plugins/agslua/agslua/agslua/agslua_autogen.o'.  Stop.

The only thing that I seem to be doing differently is that I am using revision 8e rather than 8d.

Joseph DiPerla

#367
Quote from: MrProsser on Mon 15/04/2013 01:04:13
I obtained the latest release and have been trying to build it, but have gotten into trouble pretty quickly. When I try to build the native engine library using ndk-build, as explained in the docs and in this comment I end up getting this error:

Install        : libagsengine.so => jni/../libs/armeabi/libagsengine.so
Install        : libpe.so => jni/../libs/armeabi/libpe.so
Install        : libags_snowrain.so => jni/../libs/armeabi/libags_snowrain.so
Install        : libagsblend.so => jni/../libs/armeabi/libagsblend.so
Install        : libagsflashlight.so => jni/../libs/armeabi/libagsflashlight.so
make: *** No rule to make target `jni/../jni/../../../Engine/../Plugins/agslua/agslua/agslua/agslua_autogen.cpp', needed by `obj/local/armeabi/objs/agslua/__/Plugins/agslua/agslua/agslua/agslua_autogen.o'.  Stop.

The only thing that I seem to be doing differently is that I am using revision 8e rather than 8d.

Which Directory are you running it from? Most likely the reason why its doing that is that the .SO files are compiled already. Delete the OBJ folder inside library folder and then run the NDK Again. It should 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

MrProsser

I deleted the obj directory and started again. I ran ndk-build in ags/Android/library. This ran nicely, but once again failed:
QuoteSharedLibrary  : libagsblend.so
Install        : libagsblend.so => jni/../libs/armeabi/libagsblend.so
Compile++ thumb  : agsflashlight <= agsflashlight.cpp
jni/../jni/../../../Engine/../Plugins/AGSflashlight/agsflashlight.cpp: In function 'void CreateLightBitmap()':
jni/../jni/../../../Engine/../Plugins/AGSflashlight/agsflashlight.cpp:394:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
SharedLibrary  : libagsflashlight.so
Install        : libagsflashlight.so => jni/../libs/armeabi/libagsflashlight.so
make: *** No rule to make target `jni/../jni/../../../Engine/../Plugins/agslua/agslua/agslua/agslua_autogen.cpp', needed by `obj/local/armeabi/objs/agslua/__/Plugins/agslua/agslua/agslua/agslua_autogen.o'.  Stop.

JJS

The agslua plugin is pulled in from its original repository as a submodule, which has to be initialized separately.

On the command line this is done like this:
Code: shell
git submodule init
git submodule update
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

MrProsser

Thanks JSS. I tried ran those commands and it got a little farther but it ran into another problem just after that where it is unable to find the header file:
Quotejni/../jni/../../../Engine/../Plugins/agslua/agslua/agslua/agsplugin.h:543:0: warning: "DLLEXPORT" redefined [enabled by default]
jni/../jni/../../../Engine/../Plugins/agslua/agslua/agslua/AGSLua_Main.cpp:6:0: note: this is the location of the previous definition
jni/../jni/../../../Engine/../Plugins/agslua/agslua/agslua/AGSLua_Main.cpp:10:20: fatal error: agslua.h: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/agslua/__/Plugins/agslua/agslua/agslua/AGSLua_Main.o] Error 1

I notice that the file AGSLua.h exists, but there is no agslua.h. Could this just be a due to the case sensitive nature of Linux? I am running lubuntu 12.10.

JJS

Yes, that is the problem. I ususally build on Windows or through a virtual machine connected to a Windows share so I don't notice usually :(.

Having both AGSLua.h and agslua.h (i.e. copying the file) should be the easiest fix for now. This has to be really fixed in the agslua repo.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

MrProsser

Windows breeds bad habits, but I cannot say anything because I have done tons of Windows development and know how easily it can happen. I modified the includes in the other files, but creating a new copy might be a good idea as well. It is currently building in the background and got past building the Lua components this time. Hopefully that was the only error.

sunerune

there's a tutorial part in gemini rue where you must use ctrl button to focus before shooting. i have dl the hackers keyboard but the ctrl button doesnt seem to work when pressed. anyone know what i am talking about?

km3k

Quote from: sunerune on Tue 16/04/2013 04:10:12
there's a tutorial part in gemini rue where you must use ctrl button to focus before shooting. i have dl the hackers keyboard but the ctrl button doesnt seem to work when pressed. anyone know what i am talking about?

I ran into the same issue last year. I created an issue in the old issue tracker ( http://jjs.at/tracker/view.php?id=72 ) but we weren't able to figure out what was wrong. I went back to playing Gemini Rue on PC, where it worked fine. Sorry that I can't help, but I wanted to let you know that this issue has been seen before.

garry4all

Hi, first of all let me congratulate and thank u 4 the wonderful work u did.
Npw, I'm testing the aandroid port in a galaxy tab 2, which doesnt have a physical menu button. So I cannot save, load, etc.
Do you have any plan on modifying that to use the button bar that android 4 devices have ?
Thanks

Joseph DiPerla

#376
I believe that if you replace the target Android SDK to be 14 or higher, it will show a soft key menu button, which would then allow you to pop up the keyboard. That has to be done in the Android Manifest file of the source code. I will try re-compiling the sources I have to see if that would do the trick.

EDIT:

Actually, JJS, if you change the Keycode_Back to perform this this:

Code: AGS
if ((key == KeyEvent.KEYCODE_BACK) && ((ev.getFlags() & 0x80) > 0)) // FLAG_LONG_PRESS
				{
					ignoreNextActionUp_Back = true;
					openOptionsMenu();
				}


in dispatchKeyEvent in AGSEngine.java, it should allow you to longpress the back button on screen and pop up the menu which has all the options we need: Toggle Keyboard, Exit Game, F Keys, etc... That would then allow the game to work on Nexus 7/10, ASUS and Kindle devices or other devices without hardware keys.
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

SKYY

Is there any way to make the ags cursor coincide with the android system cursor? I have to aim way high with my galaxy note stylus, in relation to the game cursor.

rykkeri

How about a bit of redesign in the way how cursor handles for touch screens:

-Left and right hand modes for cursors.
-For the cursor not to hide under users fingertip, place the cursor to the upper left or upper right corner of the users fingertip, depenging on the cursor mode. I do not know without measuring how far in pixels this would be, maybe a configurable value?
-The effective cursor position would be the upper left or upper right corner of the cursor icon, depending on the cursor mode.

This way the user would be capable of "dragging" the cursor while actually seeing it and placing the cursor would be a lot easier. After dragging, tapping would initiate the action. By making cursor icons that would visually point to the upper left or right corner, the user would have better idea on where the game actually thinks you are trying to click.

The way you usually grab a tablet or a phone would in my opinion make this the most ideal solution for emulating a mouse; the effective cursor position to trigger the actions would be close to the continuum of your finger's position and angle.

Or do you guys prefer seeing your finger and nothing else, while trying to click that tiny object in your screen? Try a HTC Explorer & AGS if you do...

DoorKnobHandle

I've always just used the alternative input mode where you can put your finger down anywhere on the screen and it WON'T warp the cursor over there but leave the cursor where it was and just move it RELATIVE to your finger position. Works really well!

The problem with your idea is that, when the cursor is always to the top left of where your finger is, all of the sudden you can't click things on the right or bottom edge of the screen. :p

SMF spam blocked by CleanTalk