This is the port of Alien Blaster game with libSDL ported to Android (includes SDL 1.2.14 and SDL 1.3, SDL_mixer 1.2.11, SDL_image 1.2.10 with jpg and png support, Tremor, SDL_ttf with freetype, and STLPort). Only SDL 1.3 has hardware acceleration currently, SDL 1.2 draws to memory surface (however you may use OpenGL ES to get HW accel with SDL 1.2).
Unlike other libSDL ports around, it does not require root access to video device, and will produce .apk package that you may publish on Android Market (and sell them, the LGPL license allows closed-source apps).
It is intended to be used as template to easily port your own C++ applications that use SDL library,
readme file describes all the steps required. No Java knowledge is necessary to use this lib.
It requires Android NDK r4 and SDK 2.2 to compile, however it will run on Android 1.6 devices. Android 1.5 devices do not have OpenGL lib, but it's still possible to port libSDL on them using software surfaces and drawing them to bitmap, however it will be slower than OpenGL (and I probably won't bother with this, only 19% of all Android devices are 1.5 or older).
To make successful port you have to ensure that your application supports native screen resolution (480x320, or 800x480 for widescreen devices), 16 bits per pixel. Alternatively you can draw to 640x480 and application screen will be resized nicely to fit device screen.
Also to make your application usable on every device around you have to ensure that it uses only arrow keys plus 4 action keys - that's Menu key mapped to Enter, Volume Up/Down keys mapped to PgUp/PgDown, and Back key mapped to Escape (which should quit application, plz don't make it game control). Arrow keys are emulated with accelerometer, touchscreen maps to mouse events.
You can combine SDL and OpenGL ES, see GLXGears example in sources.
The SDL without OpenGL mode renders using OpenGL ES renderer, so it should be HW accelerated (only if you're using SDL_Texture functions from SDL 1.3, trying to use backward-compatible SDL_Surface to draw on screen will give you exactly the same software renderer as was in SDL 1.2).
There still no multitouch support for 2.0, no vibrator and no virtual on-screen keyboard.
Accelerometer currently acts as arrow keys, to support devices without keyboard (later I'll add some config page to use it as joystick etc).
Also it will crash when you put the app to background with Home key.
Get the sources from this URL . Get the compiled application here to check performance. If you want to fix some bugs you can clone my GIT repository, fix them and merge your changes (I've documented some bugs in readme).
Also notice that I'm still working on the port and breaking it from time to time - you may wish to check out some stable revision.
If you've ported any other app I can publish it for you (it's better to pay $25 for developer account yourself though, I'll demand the app to be usable on my HTC Evo without keyboard)
Published to Android Market:
Alien Blaster
Jooleem






.
