Thursday 13 December 2007

Who needs physics when we have graphics?

Planning a physics engine is very hard without a way of testing it, so I decided that while I put off coming up with an idea I would build the pre-alpha demo level. And it's actually working as far as it goes; there's a background image, area bounds, blocks and proper movement. The player-wall collisions are in place and working perfectly; thanks to a bit of fiddling.

However, the block collisions are not. You can still pass straight over the blocks here; HOWEVER they will re-draw themselves as you move over them! This means the blocks are successfully updating themselves, which is a step to
wards this engine actually working (albeit a small one). Sadly, I've encountered problems with the wall collisions - the ball leaves a mark on the wall every time it hits it, as shown in the screengrab on the right. I'm still working on a way of fixing this; updating the entire screen would be far too wasteful and would slow the game down by a lot. I've tried increasing the area updated around the ball, but the tests have resulted in very odd things happening.
Many sprites were killed gruesomely.

No comments:

Post a Comment