PDA

View Full Version : [APP][14/04/09] BallPhysics - GSensor thing 0.7


l3v5y
12th April 2009, 02:07 PM
I was playing around with class based programming stuff, and the Diamond GSensor, and some physics (I'll pretend it's relevant to my A levels :D) and wrote a little game to experiment...
http://forum.xda-developers.com/attachment.php?attachmentid=175479&stc=1&d=1239537964

What it is is a field of balls that are affected by gravity. If they collide, they should bounce off each other in a vaguely realistic way.

The number of balls can be adjusted via the up/down keys up to a maximum of 100 (the performance isn't great with that many though...)

The size of balls can be adjusted using the left/right buttons - there's no minimum or maximum size.

Hitting the centre button will pause everything.

You can click and drag the balls, and sometimes a "flick" makes them move, I need to fix that though.

Tilting the device will accelerate all the balls.

The colour and position of each ball is random.

Should work on Diamond, Raphael, Blackstone, Rhodium and Topaz.

This isn't meant to have a real reason, it's just something fun and physicsy! :)

Changelog:
0.7 - fixes a touch screen related bug...
0.6 - reduces sensor polling time making it more reliable, some graphical speed ups as well.
0.5 Initial public release

cool_dhamz
12th April 2009, 02:14 PM
Looks good.. Let me try this.. :)

gobmonster
12th April 2009, 03:05 PM
This is a pretty fun and simple game! Would u consider open sourcing it?

l3v5y
12th April 2009, 03:32 PM
This is a pretty fun and simple game! Would u consider open sourcing it?

I probably will when I've cleaned up the code and tried to make it faster...

l3v5y
14th April 2009, 07:06 PM
New release fixes a few things...

Get it from the first post.

DavidTiger
8th February 2010, 03:36 AM
hey i was wondering if you still have the source code for this?
I'm looking for something to get of started on programming apps for my diamond and its sensors... and this seems to be a pretty cool place to start as i have a few ideas of how this could be improved..

Thanks,
-David

DavidTiger
17th February 2010, 08:23 PM
Seems to have got lost *kicks to the top* :)