Messing around with some collision detection. Up and down modify gravity, left and right push the ball in the corresponding direction.
Code is a mess, read at your own risk. Currently only handles static obstacles -- shouldn't be too hard to add once you know the contact point but didn't really feel the need, I've already had my fun with it :)
[Please log in to post a comment]