more on orx android

edited January 2013 in General discussions
Hi guys,

I wanted to make a small poll on the changes i'm about to make with both android orx port.

1) drop android-native port

android-native port require to runs on Android 2.3+ and use the NativeActivty to implement orx main loop.

Since it allow ones to write a complete android application in c/c++, I was expecting to have better performance than with a more traditional jni binding Activity.
Well, the various test i made proved me wrong. There is no measurable performance differences between both orx ports.
That was for the "pro" for android-native.

For the cons, I have one major, the impossibility to use the orx view in a layout (say you want to show an Admob banner, on top of orx). That is just not possible by design.

So, since there is no obvious advantages of using this port, I'm about to drop support for this (code will probably stay in the repo for a while in the repository, but I won't update it / maintain it anymore)

supporting two ports is a bit too much of works for me alone, so the non-native port will become the one and only orx port.

2) raise min API level for the non-native android port to 2.3
the non-native port of orx allowed me to lower the min API level down to 2.1 (not without some issues)
today, android 2.1 + android 2.2 is about 10% of the android landscape see Android Dashboard
thoses are mainly low-end devices old of about 2 years, and wont fit for orx games because of the low specs anyway.

raising the min API level to 2.3 will allow me to implement a better Sound plugin by using OpenSL ES, simplify file I/O and some other stuffs.

So I'd like to hear you opinion / question on theses changes before doing anything...

Comments

  • edited January 2013
    Sounds to me like you've thought this through rationally already. I say do it (drop the native), focus on one, make it better, and if at a later stage you want to go back, there's nothing stopping you ;)
  • edited January 2013
    Sounds good to me too!

    Just to make sure, there's no differences from a user point of view between using the android and android-native versions?

    What I mean is, if I want to use the non-native android version, I won't have to write any java code, will I?
  • edited January 2013
    well you need to extends the OrxActivity for, at least, load the native library
    public class OrxDemo extends OrxActivity {
    
    	static {
    		// load your native module here.
    		System.loadLibrary("orxTest");
    	}
    
    }
    

    that's the required minimal Java code you need to write
    take a look at demo/android project, it's very light

    I'll try to remove the requirement to call enableAccelerometer(), and the need to override requireDepthBuffer() if you need an OpenGL depth buffer
  • edited January 2013
    Sounds good to me, thanks!
  • edited January 2013
    From a newbie perspective (although the board seems to think I am "junior" already) I think having the two versions was confusing. I wasn't ever very sure which I would end up needing. I think dropping the native makes absolutely perfect sense.

    I would also bump up reqs to 2.3+ since this would be for gaming. But I am a bit more hesitant about that part. Perhaps other people who are interested in deploying to Android can pitch in?

    Cheers,
  • edited January 2013
    ok, it's done

    bitbucket repository has been updated, the min api level for android port is now 2.3

    i've already "reimplemented" the sound plugin using OpenAL and the performances are much better.

    I'm done with the android-native port, the code will stay in repositoy. maybe later, I'll clean the code and completly remove android-native stuff (if needed, I can still dig the repository history)

    I've also updated the wiki pages.

    If you are migrating from the native-android port, I suggest you start from scratch with demo/android as a template.

    anyway if you have issues just ask here.
  • edited January 2013
    one foot note about the new sound plugin implementation, ONLY .ogg files are supported, both for music and sounds
  • edited March 2013
    I'm chiming in very very late on this, but very well done for removing one port and for your continued work on this.

    It's very rewarding to see your own efforts appear on a mobile device.

    Now some extensive step-by-step documentation is needed to help those who just don't breathe this stuff everyday.

    I will be needing to convert my project now (and get it under 1.4 too) and so a good docco will be handy.

    I did make a start on a proper guide a few weeks ago, based on existing wiki material, so I'll revise that to suit the changes and see what you think.
  • edited April 2013
    Thanks,

    go ahead with the wiki, it's not where I'm shining so any help is welcomed.

    I'm planing for the mid-term to rewrite some internal part of glue code, hopefully it wont be to much intrusive for the user code (well... I'll do my best).

    It's encouraging to see there is some love for this port, but what would be even more encouraging is to see releases using it :P

    have fun
Sign In or Register to comment.