New release coming, this time for iOS too!

So, today I've been working on getting the latest BennuGD for Android code up to shape.
This version bundles pretty much the same core BennuGD code -with a small but important bugfix- from previous releases but is compiled against SDL2 RC3.

What you'll get from this next version depends on what your Android version (I'll support Android 2.3.3 and above) is, as shown below:
  • All versions of Android:
    • Standard BennuGD
    • mod_multi: Multitouch support, created by me. See an example here.
    • mod_chipmunk: Physics library based on the excellent Chipmunk library. Have a look here, too.
    • mod_curl: Web request support, created by me. based on cURL. You can use it to download stuff from the web on the go from your app. See an example here.
    • fsock: Low level networking library. Really powerful, but you must have some insight into how networks works in order to use it.
    • mod_sensor: Sensor access library, created by me. It allows you to access the readings from all the sensors in your devices (gyroscopes, accelerometers, barometers, proximity sensor, light sensor...). It looks like I'll have to write some sample code...
    • Some level of gamepad support.
  • Android 3.1 and over:
    • Mouse support. You can have interfaces that act differently if you're using a real mouse/trackpad than they do when used with fingers. You'll also be able to tell from code when the cursor is moving but the user isn't clicking.
  • Android 4.0 and over:
    • When the user presses the mouse/trackpad button, you'll be able to tell if it's a left/middle/right click (through mouse.left, mouse.right...)
  • Android 4.1 and over (this includes the OUYA!):
    • Your games will be able to fully utilize joysticks in Android, as long as Android recognizes them as such.
      In theory, you can set up an unlimited number of joysticks and the user can connect them through USB and/or bluetooth.
I hope you can use this info and that available at the Android DashBoards to plan your game development according to the market shares of the different Android versions.

Enough of Android! If you're an Apple fan, there'll be updates for you as well.
I'm also going to update the iOS builds and include most* of the stuff above, so that you fanboys can have fun, too.

Hope you like the news :)

* I might not be able to include mod_sensor...

mod_key working

At some point in the past, I had removed libkey & mod_key from the default Android build as the SDL2 API for managing keyboard has changed/improved substantially and I hadn't taken the time to upgrade the code.
A few days ago, Pixel reminded me (thanks!) that I hadn't done so, so today I've taken some time to fix this.

Here you can see a small video of the sample code running in the ICS emulator:

As for what I've been doing lately: I've worked on better integration with the window manager events (mouse_status, focus_status and so on) in Android and the BennuGD code is now compiled as a single APK for armv6, armv7 & x86 so that at least I can run the tests at a decent speed in the android x86 emulator.

Also, as packaging for Android is a bit frightening for the typical BennuGD user right now, I'm doing a small app for Linux/Windows/OSX that should take care of the packaging process for you. More on this later.

As a last note, I've set up a public Twitter account that you can follow me. I'll publish small status updates there and from time to time I'll also drop some builds for you to test and report back:
@josebagar_p

[UPDATED] Android progress info

Yesterday I spent some time working on the android port. Just to keep you posted: thanks to an updated version of SDL2 (with patches from user gabomdq from the libsdl forum) it looks like music playback from apks is finally working! Let's see if I can get something useful out soon :)

[UPDATE] It looks like thanks to the updated SDL version BennuGD for Android also works in Android 4.0. Results here are mixed as some users report that the apk works and others report that it doesn't for the same OS version. I'd say it's because of the OpenGL ES version I'm using but I will have to test that.

Live wallpapers and a nice blog about SDL programming in Android

gabomdq has posted a couple of small patches for SDL that allow you to create live wallpapers with it. You can have a look at the patches here.
Live wallpapers are a distinctive feature of Android that look like this:
Random Youtube video about live wallpapers in Android

So, when applying those patches to your activity file (it's a cuople of lines, actually), you'll be able to create live wallpapers in BennuGD! Pretty neat, right?

Also, Wilbefast is a very nice blog about SDL programming in Android. Be sure to give it an eye if you're interested.

PD: I made some improvements to the Android code: now mod_curl is compiled in Android, too, and I've started work on adding FMOD Ex support for Android. Not working yet, but it will soon.

Advance

I just made an interesting commit (if you're into commits, that is) to my branch with changes related to SDL 1.3 support. Main changes are:
  • Finally got rid of the SDL compat layer! (I'm still using it for the mod_key/libkey modules, but I'm not compiling those for the devices).
  • Updated sample bennugd code to include a bouncing PNG.
  • Modes set with scale_resolution and normal seem to redraw the screen fine (although the screen pixel format is not yet correct).
  • Orientation is starting to get set automatically now (there are things to fix yet, though). If width>height, the iOS device will default to a landscape configuration.
  • Other minor changes.
As you might know, in order to use SDL (upon which BennuGD relies) in iOS and Android platforms, you have to use SDL 1.3*, which is the development version of SDL and includes a somewhat major API breakage as compared to SDL 1.2. SDL provides a very buggy 1.2 <-> 1.3 compatibility layer which I just got rid of. Getting rid of it and using the new code allows for better integration with the new platforms and allows us to implement things not possible in SDL 1.2 like multitouch, multi-monitor support, advanced UTF-8 input support....
There are still some bugs I must fix before releasing a new binary, but things are progressing nicely.
When I release the new binary it will most probably also include a new version of mod_chipmunk and maybe a module for handling multitouch that I just began drafting a few days ago.

* Unless you want to use unofficial versions of SDL 1.2, which I don't for different reasons.

iOS game template

Today I'm releasing a game template for iOS. It should work fine for jailbroken iOS devices. Just copy the uncompressed package to the "/Applications" folder in your device.
Also, please make sure that the file "main" has executable permission set, otherwise it won't work.

Just copy your compiled DCB as main.dcb in the folder and put your resources there, it should work.

One note: rotation is not working as expected yet, but you can just rotate your game with the following code:
scale_resolution_orientation=1;
Get the template from here (Removed).

If you've got any question, let me know. Soon I'll write a small FAQ with more info and I'll try to update the build to a more recent SDL revision.

[Update] I've published template for Xcode that makes it easier to upload your games to your device.

Blog Archive