"Man on the Moon" Packager release

Today I'm releasing a preview version of the BennuGD Packager for Windows and MacOS X. It works in Linux, too, so even though I haven't packaged it yet you shall soon be able to install it from my PPA.
The Packager should ease the packaging of your games for Android.
The icon was made by Javis Arias, from Pixelatom
Please be sure to first follow the pre-install instructions for Windows or OSX as those describe what you need to do to get the program working.

When launched, it looks like this:

It looks very simple and you'll notice that it includes a couple of disabled items: (right now you can only package your games for Android and you cannot change the app descriptor).

So, basically you must enter the directory where your game's data (including the game's main DCB file), the name and the icons that you want your app to show when installed.
If you've got a phone or an emulator instance running, you can choose to directly install the APK.
Also, when done packaging, the program will let you specify where you want to save the resulting APK.

The resulting APK will be usable in ARM or Intel based Android devices running Android 2.3.3 or later. Just one caution: ensure that your game's DCB file is named "main.dcb".

If you tested it yet, I'm telling you: the Android port is not yet done. scale_resolution, for example, doesn't work as expected. Still I consider that you can already use this program to get going and start porting your games to Android. I'll update the binaries and let you know when I publish new binaries so that you can update the Packager.
I'll publish some more notes on what works and what doesn't at a later time.

As a last note, you'll notice that you can launch the main Android SDK tools (SDK Manager, AVD Manager and DDMS) directly from the BennuGD Packager, it should also detect any AVD you have created and allow you to launch it directly from the GUI.

Keep an eye on the blog in the following days, as I'll post some more detailed info about how to use all the capabilities included.

<<Get the current binary version for Windows here and for OSX here>>

Humbly dedicated to the memory of Neil Armstrong.

BennuGD for Android preview release!

Good news, everyone!
Today I'm releasing a very alpha, preview release of BennuGD for Android. It corresponds to revision 418 in the bennugd-monolithic source code tree and you can see a small video of a demo video (recorded with my iPad 2!) of Puzsion running in my Android phone below:
The video is from a couple of days ago; that's why I don't show game interaction as a couple of days ago multitouch events weren't being emulated as mouse events.
So, a couple of warnings:

  • This is alpha quality code and you're supposed to know what you're doing if you want to use it. If you break it, then I'm sorry.
  • Sound doesn't work. You can load mod_sound but if you try to play a couple of sounds at a time, your app will break. This appears to be a SDL2 bug that needs to be fixed.
    For now I'm using the following code to suppress audio in testing games:
    #ifdef FAKE_SOUND
    #define stop_wav(a);
    #define stop_song(a);
    #define set_channel_volume(a,b);
    #define set_song_volume(a);
    #define unload_wav(a);
    #define unload_song(a);
    #define load_wav(a) 0
    #define load_song(a) 0
    #define play_wav(a, b);
    #define play_song(a, b);
    #define fade_music_off(a);
    #define pause_song(a)
    #define resume_song(a)
    #define ALL_SOUND 0
    #endif
  • Anything related to set_mode() beyond setting a video mode is either not working or untested. This includes scaling and rotation. Also, when setting the video mode be sure to set it to your device's display depth (usually 32bpp). Setting the video mode to a size different to your device's native seams to work fine, though.
    You can, however, set rotation by modifying AndroidManifest.xml's android:screenOrientation value to any value described here. This is faster than BennuGD's implementation and works just fine.
  • Touch events will ONLY be emulated as mouse events if you import BOTH mod_mouse and mod_multi.
  • This code should include all the official modules (minus mod_debug) plus mod_multi and mod_curl for handling multitouch input and server-client communications.
  • Anything activity-based in totally untested: you're responsible for what your app does when in the background. Also, coming back from the background won't probably work, so be sure to make your app die when sent to the background, but I don't know if that's working (refer to the first point if you need clarifications).
  • I don't yet know where to store your game's data (savegames, highscores...) in your phone, sorry. See first point in this list for more info :)
  • You can use say() for printing debugging info. It'll appear with a "W/SDL/APP" prefix in the adb logcat and I like to filter the ouput of the logcat like this:
    adb logcat SDL/APP:* SDL:* *:S
  • You can only set_mode once, and you must do it yourself. This version of BennuGD won't do it for you even if official BennuGD does.
  • Please, report any bugs here. Reporting bugs elsewhere will probably result in me forgetting about it and. So please, ONLY report bugs there.
Now, for your question: "How do I get an APK from your package", here's a step-by-step tutorial:
  • Get the Android SDK from here and set it up for your system. I don't use Eclipse and don't know how to compile the code with it, sorry.
    Also, be sure to install API 10 -Android 2.3.3- from the Android SDK manager. BennuGD might work in Android 2.2, but I use API 10.
  • Install ant.
  • Plug in your device or start the Android emulator. Be sure to enable debugging in the device.
  • Open your console and browse to the path where you uncompressed the BennuGD for Android template.
  • Modify local.properties to point to where you've installed the Android SDK.
  • Type "ant debug install". This should install a debugging version of the sample program in your device and you'll be able to test whether everything is working properly.
    If it's working fine, you can now try to get your game to work.
  • To do so, store your game's content in the "res" directory and be sure to rename your game's main DCB as "main.dcb".
    Then remove the "bin" directory and re-execute "ant debug install". If everything went fine, your game should now be installed in your phone! Congrats :)
<<Get the code from here>>

Blog Archive