Android support phase1 complete!


I have just committed a bunch of stuff that includes preliminary support for android in it – but don’t get too excited! It’s in a pretty rough state right now! There’s an ‘android’ dir in the root monkey dir that explains the various spells and incantations that must be performed to produce an mx2 android app.

Building an android app is not fun at this point by any means (you need to copy output files to a ‘real’ android project), but it’s far enough along that curious users should be able to get it working and give some feedback.

It’s also highly unstable, but the guts of it are in including touch input and audio (the scary ones). Touch is only currently generating fake mouse events – which required low level tweaks to mojo to get all the mouse down/enter/leave/up event stuff working sensibly so I hope I haven’t broken anything there!

What I’ve ended up deciding to do is leave the ‘project’ stuff OUT of mx2cc altogether, so this phase is complete in as far as that’s pretty much all I need/want mx2cc to do. So mx2cc’s job will be to just generate .exe/.so files and assets folders, without caring what’s going to be done with them. These currently end up in hard coded locations (ie: inside the .buildv dir) but there’ll probably be mx2cc args to allow you to change this.

I am now planning to implement the project side of things as ted2 ‘plugins’ (now that there’s the beginnings of a plugin system in Ted2). I’m not sure exactly how just yet, but it should along similar lines to my earlier post on ‘project templates’ etc. And with mojox, there’s a reasonably decent gui system in place to handle the front end stuff.

But before that, I’ve decided to forge ahead with adding ‘plain’ iOS support to mx2cc so I know exactly what the project stuff has to deal with. All going well, the end result should be much like android, ie: it produces an .so file and an assets folder and that’s it. The only tricky bit I can think of is possibly dealing with the different architectures (although I think there are only 2?). I managed to side step that with android by using the ndk-build system which builds arm, x86, mips etc. for you in one hit (currently only armv7a, but it’s easily configurable). I don’t think there’s anything like that on mac(?) but it shouldn’t be too hard to deal with.



8 thoughts to “Android support phase1 complete!”

  1. I haven’t tried a real mouse yet, but yes, my bluetooth keyboard works. With the wdw-game2d asteroids example anyway…

    I haven’t tried the dreaded ‘soft’ keyboard yet either – will do soon when I get some ‘free’ time! I’d also like to try a mojox soft keyboard one day.

  2. This is so cool!

    Your big ted and little ted tweet looked awesome too btw!

    Perhaps little ted could have the ability to copy latest so versions and assets from host (update manager extends module manager).

    An automatic update from compiling on desktop to testing on mobile would be oh so cool as in games are already running and get sent some sort of signal to restart with new versions when Little Ted says.

  3. When do you think it will be reasonable to expect retina support for ted2

    Wont be working on ted2 for a while yet, but you can tweak the default.json file in the ted2/themes dir to increase font size, and tweak pretty much anything else. It’s likely ‘retina support’ will involve the use of alternate theme file.

    and working fullscreen modes on OS X?

    Not sure what you mean. If you’re having a problem with monkey2, please ask about it in the forums or  post an issue at github if you think you’ve found a bug.


    Your big ted and little ted tweet looked awesome too btw!

    Unfortunately, no compiler support on android means it’s largely useless – but it was a good test of android builds!

    Perhaps little ted could have the ability to copy latest so versions and assets from host (update manager extends module manager).

    Not such a crazy idea – unzip the apk, modify main/assets and rezip it, all on the android side? As long as we don’t have to ‘root’ anything!


  4. Hi Mark

    Nice news on the progress.

    Since you’re working with input on Android, it would be great to have these tweeks included, so that MX2 will be able to make Android TV Apps, and use dpad.

    Middle Button: (post #2)
    Ekstra Joystick: (post #3)
    Android TV Target: (post #11)

    [EDIT] : I see now, that the joystick system in MX2 is different and based on SDL2, and therefore might handle these things already, as there now are functions like JoystickDevice.NumJoysticks() .

    Looking forward to testing building for Android TV.

  5. Don’t know where to post… but a little error in banana’s calculator source code

    AddButton( “/”,Lambda:Long( lhs:Long,rhs:Long ) ‘not –
    Return lhs / rhs
    End )

    I’ve did my own version (some weeks ago) and … something interesting to learn in yours!


Leave a Reply