Jump to content

  • Log In with Google      Sign In   
  • Create Account

  • You cannot edit this iotd

Mad Marbles  by undead    -----

 



Time Spent: 30 days
Date Added: Sep 19 2012 03:03 AM

The image is a screenshot of my android live wallpaper: Mad Marbles. It renders multicolor marbles on your device home screen. Marbles move according to your device orientation and they can collide with each other. They are also interactive: you can select a marble with your finger and move it (or throw it) around the screen.

Physics is implemented using Box2D in C/C++ compiled for ARM and JNI. Marbles are rendered with an OpenGL ES 2.0 fragment shader.

I decided to develop for android because when my old phone stopped working I found a good deal for an android phone.
At the beginning I thought learning android programming would be nice so I developed an app for internal use checking a web service status.
After that I wanted to give a try to something I enjoy more: graphic programming.

Well.. Mad Marbles is the result. Posted Image

Some of the lessons I learned during this project are:
- how to write (and use) native code in android for CPU-intensive tasks
- how to implement a live wallpaper with OpenGL ES using custom preferences, reading orientation, etc.
- how to effectively use intents, create a shortcut, select (and scale) images from device, write code adapting to different resolutions
- how OpenGL ES works (I've been a Direct3D guy for years)

I also learned how hard it is to get visibility on google play!!! Posted Image

If you have an android device you can give a try to the free version:

https://play.google.....madmarbleslite  
I used Box2D, Android SDK, Android NDK, Eclipse, a few devices for testing (Galaxy S2, Galaxy Tab, Galaxy Tab 2, Evo 3D)... and Paint.net for awful programmer art. Posted Image


  • You cannot edit this iotd

Share:


2 Comments

This is really impressive! And it works perfectly on my SG S3 :)
How did you find OpenGL ES?
The app uses OpenGL ES 2.0 and being forced to use shaders conceptually it isn't so hard because I'm used to shaders since D3D9.

What is a little weird for a D3D dev is texture handling which is high level compared to pointers and double pointers we are used to work with when using D3D. Also setting states is a little different.

Also fragment and vertex program parameter binding is a little weird. I had the same inputs, same names and same position for vertex and fragment shaders params so I assumed they were shared or at least ordered the same way. When testing on a SG S2 it worked perfectly, but on a SG TAB 2 it didn't render anything unless I bind both parameters.

I'm glad you like it, thank you! Posted Image

PARTNERS