[Ohrrpgce] Android port

James Paige Bob at HamsterRepublic.com
Mon Jun 3 12:46:24 PDT 2013


Either place is fine. The wiki is handy for getting our compile 
instructions clear and complete, and the mailing list is good for 
discussing it. I am sure both TMC and I will read anything written in 
either place :)

---
James

On Mon, Jun 03, 2013 at 01:07:58PM -0400, Seth Hetu wrote:
> I ran into an error in the last phase of compiling the APK; posted it
> to the talk page of the wiki.
> 
> That reminds me; is it better to post about these kinds of errors to
> the list or just in the talk page?
> 
> -->Seth
> 
> On Mon, Jun 3, 2013 at 10:31 AM, Seth Hetu <seth.hetu at gmail.com> wrote:
> > Ah, thanks. I misread "the latest SVN" and picked up the latest git source.
> >
> > -->Seth
> >
> > On Mon, Jun 3, 2013 at 10:13 AM, James Paige <Bob at hamsterrepublic.com> wrote:
> >> That is in the ohrrpgce svn repository
> >>
> >> svn://gilgamesh.hamsterrepublic.com/ohrrpgce
> >>
> >> On Mon, Jun 03, 2013 at 09:22:11AM -0400, Seth Hetu wrote:
> >>> Got a quick question regarding the compiling instructions: "You can
> >>> use the script wip/android/compiling-using-toolchain.sh..."
> >>>
> >>> Where exactly is this? I checked the various repositories I cloned,
> >>> but can't seem to find it. I'm sure there's a really obvious answer...
> >>>
> >>> -->Seth
> >>>
> >>> On Sun, Jun 2, 2013 at 1:59 AM, Ralph Versteegen <teeemcee at gmail.com> wrote:
> >>> > I managed to figure out your makefile problem from the error messages.
> >>> >
> >>> > I'm surprised that Bell of Chaos runs that quickly on your tablet,
> >>> > nearly 5 times faster than my phone. A single core of a high end
> >>> > desktop CPU is nowhere 5 times faster than the lowest end one (well,
> >>> > actually it is if you compare to an Atom instead). I guess that on a
> >>> > device with an actual GPU a lot of CPU is freed up for the
> >>> > application... but if it's running at <4 fps, then there isn't much
> >>> > GPU emulating to do anyway :)
> >>> >
> >>> > I should have specified the button mapping: top left is ESC, top right
> >>> > is Enter, and the other four are arrows. Menu and Search are also
> >>> > Enter, and BACK is Esc.
> >>> >
> >>> > On 2 June 2013 17:30, James Paige <Bob at hamsterrepublic.com> wrote:
> >>> >> No luck compiling tonight, I will try more tomorrow. I tested the apk
> >>> >> and it runs nicely on my Xoom tablet. Sword of Jade ran smooth as butter
> >>> >> (well, 18.2 fps butter anyway) and Bell of Chaos averaged around 16.5
> >>> >> fps. I didn't figure out the SDL button remapping, but that can be a
> >>> >> task for later too :)
> >>> >>
> >>> >> Awesome work, TMC!
> >>> >>
> >>> >> ---
> >>> >> James
> >>> >>
> >>> >> On Sat, Jun 01, 2013 at 09:54:18PM -0700, James Paige wrote:
> >>> >>> Yay! I am excited! :)
> >>> >>>
> >>> >>> I am going to try and compile myself. More comments on the wiki talk
> >>> >>> page :)
> >>> >>>
> >>> >>> ---
> >>> >>> James
> >>> >>>
> >>> >>> On Sat, Jun 01, 2013 at 11:00:54PM +1200, Ralph Versteegen wrote:
> >>> >>> > http://tmc.castleparadox.com/pics/android-shot2.png
> >>> >>> >
> >>> >>> > A few more debugging sessions, and I've gotten the port working on a
> >>> >>> > 2.2 phone and 4.2.2 emulator. So far the only brokenness that I've
> >>> >>> > seen is in the file browser. autotest.rpg passes, though I haven't
> >>> >>> > tried comparing the screenshots. Although I actually got this far a
> >>> >>> > week ago, it took me several days to clean things up, e.g. removing
> >>> >>> > hardcoded paths, fixing the build systems, and fixing various problems
> >>> >>> > with bad path variables I didn't run into before. I've rewritten the
> >>> >>> > compile instructions. Do a git pull on both git repositories and
> >>> >>> > follow the new instructions. Compiling FB actually became more
> >>> >>> > complicated when I did things the proper way.
> >>> >>> > http://rpg.hamsterrepublic.com/ohrrpgce/Compiling_for_Android
> >>> >>> >
> >>> >>> > I put lots of info on the wiki:
> >>> >>> > http://rpg.hamsterrepublic.com/ohrrpgce/Android_Port
> >>> >>> >
> >>> >>> > Here's a precompiled .apk to play with if you want, although it's too
> >>> >>> > early to be asking for testing.
> >>> >>> > http://tmc.castleparadox.com/ohr/ohrrpgce-game-2013-06-01.apk
> >>> >>> > Some of the most obvious problems (see the wiki page for more):
> >>> >>> > -controls are awkward. But at least you can use the builtin SDL
> >>> >>> > configuration menu to adjust key bindings and button sizes and
> >>> >>> > positions
> >>> >>> > -midi doesn't play, simply because I didn't include instrument patches
> >>> >>> > for timidity. The suggested patches are 18MB. Can we find a smaller
> >>> >>> > set?
> >>> >>> > -directories don't appear in the browser
> >>> >>> > -there are long pauses in a couple places
> >>> >>> >
> >>> >>> > On my low end phone I can seemingly play typical games at full speed,
> >>> >>> > although only just. Bell of Chaos runs at less than 4 fps though.
> >>> >>> >
> >>> >>> >
> >>> >>> > On 17 May 2013 07:50, Seth Hetu <seth.hetu at gmail.com> wrote:
> >>> >>> > > Seems pretty similar to my config.mk. Good to know I'm on the right track!
> >>> >>> > > I'll give it another go if I can drum up some motivation later (the sample
> >>> >>> > > sdl-android app is strangely giving me an error).
> >>> >>> > >
> >>> >>> > > -->Seth
> >>> >>> > >
> >>> >>> > >
> >>> >>> > > On Thu, May 16, 2013 at 3:25 PM, Ralph Versteegen <teeemcee at gmail.com>
> >>> >>> > > wrote:
> >>> >>> > >>
> >>> >>> > >> Ah, yes, setting TARGET_ARCH wasn't sufficient. Here is my config.mk.
> >>> >>> > >> I am using a Slackware64 14.0 multilib system. I haven't edited
> >>> >>> > >> anything else:
> >>> >>> > >>
> >>> >>> > >> ENABLE_PREFIX=1
> >>> >>> > >> CFLAGS := -Wfatal-errors -O2 -I/usr/lib/libffi-3.0.11/include/ -g -m32
> >>> >>> > >> TARGET_ARCH=x86
> >>> >>> > >> prefix=/home/ralph/local/fbc-0.90
> >>> >>> > >> V=1
> >>> >>> > >>
> >>> >>> > >> Linking with libffi is optional: you can add -DDISABLE_FFI.
> >>> >>> > >>
> >>> >>> > >> On 17 May 2013 04:10, Seth Hetu <seth.hetu at gmail.com> wrote:
> >>> >>> > >> > While compiling this on a 64-bit system, it seems that setting
> >>> >>> > >> > TARGET_ARCH
> >>> >>> > >> > is not sufficient. In particular:
> >>> >>> > >> >     * gcc will freak out regarding assembly functions and "operand type
> >>> >>> > >> > mismatch" errors.
> >>> >>> > >> >     * gcc won't find libffi (on Ubuntu), as it's in a special
> >>> >>> > >> > "i686-linux-gnu" directory inside "/usr/include".
> >>> >>> > >> >
> >>> >>> > >> > To get around this, I just hacked the makefile, changing:
> >>> >>> > >> >
> >>> >>> > >> > ALLCFLAGS := -Wall -Werror-implicit-function-declaration
> >>> >>> > >> >
> >>> >>> > >> > ..to:
> >>> >>> > >> > ALLCFLAGS := -Wall -Werror-implicit-function-declaration -m32
> >>> >>> > >> > -I/usr/include/i686-linux-gnu
> >>> >>> > >> >
> >>> >>> > >> > If you got this working on a 64-bit system some other way, let me know
> >>> >>> > >> > (I'm
> >>> >>> > >> > really bad at makefiles).
> >>> >>> > >> >
> >>> >>> > >> > -->Seth
> >>> >>> > >> >
> >>> >>> > >> >
> >>> >>> > >> > On Fri, May 10, 2013 at 5:53 PM, Ralph Versteegen <teeemcee at gmail.com>
> >>> >>> > >> > wrote:
> >>> >>> > >> >>
> >>> >>> > >> >> I did some work on the Android port today, and got to the point of
> >>> >>> > >> >> being able to compile everything, create an .apk, and install it. It
> >>> >>> > >> >> currently crashes almost instantly with only the following error
> >>> >>> > >> >> message (an earlier version at least managed to initialise everything
> >>> >>> > >> >> except the native code).
> >>> >>> > >> >>
> >>> >>> > >> >> D/dalvikvm( 9355): Trying to load lib
> >>> >>> > >> >> /data/app-lib/com.hamsterrepublic.ohrrpgce.game-1/libapplication.so
> >>> >>> > >> >> 0x41f5cdf0
> >>> >>> > >> >> I/ActivityManager(  495): Process com.hamsterrepublic.ohrrpgce.game
> >>> >>> > >> >> (pid 9355) has died.
> >>> >>> > >> >>
> >>> >>> > >> >> Instructions are here:
> >>> >>> > >> >> http://rpg.hamsterrepublic.com/ohrrpgce/Compiling_for_Android
> >>> >>> > >> >>
> >>> >>> > >> >> I've automated all the drudgery. Now the hard work remains: debugging,
> >>> >>> > >> >> platform and device differences, Android-specific OHR modifications,
> >>> >>> > >> >> touch input, and lots of customisations to all the stuff in the SDL
> >>> >>> > >> >> port. For example I'm not very happy with the way that emulated
> >>> >>> > >> >> keyboard input works. we will want per-game settings without having to
> >>> >>> > >> >> recompile.
> >>> >>> > >> >>
> >>> >>> > >> >> However I'm taking a break for a while. I have too much else to do.
> >>> >>> > >> >> _______________________________________________
> >>> >>> > >> >> Ohrrpgce mailing list
> >>> >>> > >> >> ohrrpgce at lists.motherhamster.org
> >>> >>> > >> >> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> >>> > >> >
> >>> >>> > >> >
> >>> >>> > >> >
> >>> >>> > >> > _______________________________________________
> >>> >>> > >> > Ohrrpgce mailing list
> >>> >>> > >> > ohrrpgce at lists.motherhamster.org
> >>> >>> > >> > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> >>> > >> >
> >>> >>> > >> _______________________________________________
> >>> >>> > >> Ohrrpgce mailing list
> >>> >>> > >> ohrrpgce at lists.motherhamster.org
> >>> >>> > >> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> >>> > >
> >>> >>> > >
> >>> >>> > >
> >>> >>> > > _______________________________________________
> >>> >>> > > Ohrrpgce mailing list
> >>> >>> > > ohrrpgce at lists.motherhamster.org
> >>> >>> > > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> >>> > >
> >>> >>> > _______________________________________________
> >>> >>> > Ohrrpgce mailing list
> >>> >>> > ohrrpgce at lists.motherhamster.org
> >>> >>> > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> >>> >
> >>> >>> _______________________________________________
> >>> >>> Ohrrpgce mailing list
> >>> >>> ohrrpgce at lists.motherhamster.org
> >>> >>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> >>>
> >>> >> _______________________________________________
> >>> >> Ohrrpgce mailing list
> >>> >> ohrrpgce at lists.motherhamster.org
> >>> >> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> > _______________________________________________
> >>> > Ohrrpgce mailing list
> >>> > ohrrpgce at lists.motherhamster.org
> >>> > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>> _______________________________________________
> >>> Ohrrpgce mailing list
> >>> ohrrpgce at lists.motherhamster.org
> >>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> >>>
> >> _______________________________________________
> >> Ohrrpgce mailing list
> >> ohrrpgce at lists.motherhamster.org
> >> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
> 



More information about the Ohrrpgce mailing list