Steve Kemp's Blog

Debian & Free Software

About This Site

This is a simple blog relating to Debian & Free Software issues.

Archive

He could eat the whole colony
27th August 2008

I've updated my simple Simple SDL based perl game, so that:

  • It has a name.
  • It has an intro screen which uses that name!
  • It has multiple balls.
  • It gets harder, ie. more balls are added.
  • The collision detection is much improved.

I still need to work on the rebound-angle but otherwise it is as complete as it will probably ever become. It would also be nice if the balls could collide with each other, and be different colours..

Regardless it was a fun diversion for a few hours, and probably tells me that I shouldn't attempt to waste more time doing gamy things, and that maths is too hard for me these days.

ObQuote: Interview with the vampire

Comments On This Entry

Steve,
I know you know that the rebound angle thing is messed up but I don't know if you are aware that the current implementation allows every level to be beaten with a single line.
Just draw a line left to right that slightly slopes downward to the exit box. If the balls hit the top of the line, they fall through the line and continue to the right. If they hit the bottom of the line, instead of bouncing to the left, they also bounce to the right :)
Richard Edward Horner Submitted at 16:19:52 on 27 August 2008

Agh that's a pretty severe issue bug!

I guess this is all caused by the bad collision, where I essentially try to invert the direction, and reset the velocity. I'm clearly doing something wrong, but having tried a couple of approaches I'm not sure what the best solution is.

Still, that aside I'm actually quite pleased with the ease at which the game was possible. The animation is nice and smooth, and the menu looks reasonably OK!

Steve Kemp Submitted at 16:27:01 on 27 August 2008
Heh, I actually enjoyed this game!
leorockway Submitted at 13:44:20 on 28 August 2008

Tags

Created by Chronicle v3.4