Friday 24 February 2012

Another screenshot

Busy again, so just another screenshot. This maybe gives a better sense of some of the things in yesterday's screen shot. Lots of fun figuring out how to do [dozens of] smooth, multicoloured particle trails without killing a 60fps frame rate.

Thursday 23 February 2012

New screenshot

Another screenshot from the work in progress, currently called "Rings".

One distinguishing feature so far is there's very little art: it's almost all procedural, and what art there is may be dropped eventually. The lack of colour is temporary: because it's all code I can add colour by just changing a line. The black and white is mostly for contrast so I can see what's going on.

Wednesday 22 February 2012

Collision theory

My last two posts have shown how to do basic collisions without explaining why they work. In many cases it's not important to know why, and a lot can be done with just bouncing balls off walls and the floor. But the theory shows where the results come from, how they fit together and most important how to use it to solve other collision problems.

Tuesday 21 February 2012

More ball-wall collisions

The observant among you might have noticed that the ball in my last test app was only bouncing off the floor not the wall. I've fixed this in a new version of the app, which improves on the previous version in another significant way.

It now bounces off both both walls as well as the floor, using essentially the same code, which is compact enough to reproduce in full:

Monday 20 February 2012

ball-wall collisions

Collisions between a ball (in two or three dimensions) are perhaps the simplest to code. This is one consequence of the mathematical simplicity of ball physics, as discussed in my last post. As long as certain assumptions are made the code for such collisions is only a couple of very simple lines.