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
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