So I got bored tonight and figured I'd write a game...
I'm genuinely not sure whether I've seen this concept before, or came up with it myself. I suspect the former. I know that I sat down with the intention of coding this game and knew how it would play and what the mechanics would be.
Having said that though I cannot think of a similar game I've played - though parts are obviously derivitive.
Anyway the aim of the game:
- A (single currently) ball bounces around the screen.
- You draw lines upon the screen, using the mouse, to influence the movement of the ball.
- The level (game) is over when the ball lands in the "exit box".
Thus far the game exists only in the skelital form with the minimum required functionality. There are two modes currently: "easy" & "hard". The hard mode was primarily added to prove to myself that the "leveling" system could work in a fun way.
Feedback welcome. Especially if it can tell me where I'm going wrong with the collision detection - but even if it is to critique my hacked-up SDL coding.
(The only other SDL coding I've done was in C, and was the mousetrap game.)
Obviously the game is written in perl, and I admit nasty perl at that. To play it you'll only need:
apt-get install libsdl-perl
Code:
ObQuote: The Chronicles of Riddick
/* Steinar */
It's a game provided with Windows Vista, called InkBall
http://en.wikipedia.org/wiki/InkBall
I think you've all told me that it's the Vista game, Inkball.
I swear I've never played it, but I guess I've seen it around on TV/adverts or something!
I'll have to see if I can tidy up the collision detection Steinar. For me it seems to be correct a lot of the time, but not entirely..
/* Steinar */
That could well be the case. I've tried it on two machines and both cases it was acceptible.
I guess we could change the heartbeat() function to slow things down, but I'm not too sure how that would affect things.
Anyway my current plan is :
No strong preference yet. For completeness I'd like to make it "perfect", but I'm stumped.