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

Matt Frith

  • Mittens Vassal
  • Pixels Pixels Pixels
    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • Matt Frith worked on a game that was nominated for an AGS Award!
      Matt Frith worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #360 on: 12 Apr 2013, 14:08 »
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

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #361 on: 12 Apr 2013, 14:19 »
Previous Android build was... 10th March? Quite a lot changed in between :-/.

JJS

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine Android port
« Reply #362 on: 12 Apr 2013, 14:58 »
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.
« Last Edit: 12 Apr 2013, 15:23 by JJS »
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine Android port
« Reply #363 on: 13 Apr 2013, 07:54 »
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

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: AGS engine Android port
« Reply #364 on: 13 Apr 2013, 16:27 »
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

Re: AGS engine Android port
« Reply #365 on: 15 Apr 2013, 00:53 »
hi. i'm trying to play gemini rue and i have a question: i can't seem to save...
« Last Edit: 15 Apr 2013, 03:05 by sunerune »

Re: AGS engine Android port
« Reply #366 on: 15 Apr 2013, 01:04 »
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

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: AGS engine Android port
« Reply #367 on: 15 Apr 2013, 03:05 »
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.
« Last Edit: 15 Apr 2013, 03:11 by Joseph DiPerla »
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

Re: AGS engine Android port
« Reply #368 on: 15 Apr 2013, 05:41 »
I deleted the obj directory and started again. I ran ndk-build in ags/Android/library. This ran nicely, but once again failed:
Quote
SharedLibrary  : 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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine Android port
« Reply #369 on: 15 Apr 2013, 07:00 »
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: Adventure Game Studio
  1. git submodule init
  2. git submodule update
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Re: AGS engine Android port
« Reply #370 on: 15 Apr 2013, 07:29 »
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:
Quote
jni/../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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2012, for his efforts in porting AGS to multiple platforms
    •  
Re: AGS engine Android port
« Reply #371 on: 15 Apr 2013, 07:44 »
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

Re: AGS engine Android port
« Reply #372 on: 15 Apr 2013, 07:50 »
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.

Re: AGS engine Android port
« Reply #373 on: 16 Apr 2013, 04:10 »
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?

Re: AGS engine Android port
« Reply #374 on: 17 Apr 2013, 16:28 »
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.

Re: AGS engine Android port
« Reply #375 on: 25 Apr 2013, 02:59 »
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

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: AGS engine Android port
« Reply #376 on: 25 Apr 2013, 04:26 »
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: Adventure Game Studio
  1. if ((key == KeyEvent.KEYCODE_BACK) && ((ev.getFlags() & 0x80) > 0)) // FLAG_LONG_PRESS
  2.                                 {
  3.                                         ignoreNextActionUp_Back = true;
  4.                                         openOptionsMenu();
  5.                                 }

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.
« Last Edit: 25 Apr 2013, 05:19 by Joseph DiPerla »
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

Re: AGS engine Android port
« Reply #377 on: 01 May 2013, 18:48 »
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.

Re: AGS engine Android port
« Reply #378 on: 02 May 2013, 11:52 »
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

  • Mittens Serf
    • DoorKnobHandle worked on a game that was nominated for an AGS Award!
      DoorKnobHandle worked on a game that won an AGS Award!
Re: AGS engine Android port
« Reply #379 on: 02 May 2013, 11:55 »
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