Computer Science Canada

first SDL game

Author:  saltpro15 [ Mon May 04, 2009 5:39 pm ]
Post subject:  first SDL game

Hey guys,

I've been learning graphics in C++ with SDL, I made pong for my first game (original, I know) and it sucks, so please give me some constructive criticism. I decided to make the physics so it would bounce the ball back at a semi-random speed, I think it makes it a little more exciting than the usual back-forth of pong.

controls are w and s for the left paddle, up and down arrows for the right paddle
space resets the ball
r key launches the ball

linux only at the moment

I'm adding fonts for the score, the update will be posted soon

Author:  zero-impact [ Mon May 04, 2009 8:40 pm ]
Post subject:  RE:first SDL game

Is there any chance you could post the source?

Author:  saltpro15 [ Tue May 05, 2009 2:38 pm ]
Post subject:  RE:first SDL game

I'd rather not actually...

I'm just basically testing to see if anyone found glitches while running it. and you've already seen the source Wink

Author:  zero-impact [ Tue May 05, 2009 3:07 pm ]
Post subject:  RE:first SDL game

No, I saw the old source that didn't even work.

Author:  saltpro15 [ Tue May 05, 2009 3:08 pm ]
Post subject:  RE:first SDL game

oh right, can I PM it to you? I still don't want to post it

Author:  zero-impact [ Tue May 05, 2009 3:38 pm ]
Post subject:  RE:first SDL game

Just post it. I wont laugh.

Author:  Homer_simpson [ Wed May 06, 2009 9:54 am ]
Post subject:  Re: first SDL game

i cant find the executable file...

Author:  zero-impact [ Wed May 06, 2009 2:02 pm ]
Post subject:  RE:first SDL game

It's a linux executeable.

Author:  Homer_simpson [ Wed May 06, 2009 8:08 pm ]
Post subject:  Re: first SDL game

oh... at the risk of sounding absolutely newbish, is there such thing as linux emulator or something of sort?

Author:  zero-impact [ Thu May 07, 2009 8:29 pm ]
Post subject:  RE:first SDL game

Yes, but I think if you really want to try it that bad, I would just boot up and ubuntu live session.

Author:  saltpro15 [ Wed May 27, 2009 12:25 pm ]
Post subject:  Re: first SDL game

got around to setting up SDL on Dev-C++ today, here's the windows version if anyone's interested. Keep in mind, this was my first SDL game, everyone's got to start somewhere :p

Author:  Al_ [ Wed Jun 24, 2009 11:20 am ]
Post subject:  RE:first SDL game

very nice : ) a point system would have been nice but thats for a later time. I have but one question: why is the ball a box : P
Other than that very good job! Smile

Author:  Silinter [ Wed Jun 24, 2009 2:01 pm ]
Post subject:  RE:first SDL game

Great stuff, ball's not moving, even when I compile it. Seems like you followed Lazy Foo's tutorials Very Happy (they're good tutorials)
More importantly, where'd you get your avatar pic? It would look damn cool as my wallpaper.

Author:  andrew. [ Fri Jul 03, 2009 9:17 pm ]
Post subject:  Re: first SDL game

saltpro15 @ Wed May 27, 2009 12:25 pm wrote:
got around to setting up SDL on Dev-C++ today, here's the windows version if anyone's interested. Keep in mind, this was my first SDL game, everyone's got to start somewhere :p
What about the Mac version? Sad jk.

You should post the source though because I don't have Linux installed and I don't want to boot up with Windows. Plus, I'd rather see your code and learn from it because I'd like to learn how to use SDL.

Author:  saltpro15 [ Sun Jul 05, 2009 5:53 pm ]
Post subject:  RE:first SDL game

my bad guys, haven't been on the forum in a bit.

1.) The ball is a box because I have no idea, it was the easiest shape to make in 5 seconds in Paint Very Happy.

2.) I don't know why it doesn't work, this game is crap so that's your problem most likely. My avatar can be found by google imaging fractal art wallpaper, and it's on the first page and of course is also my wallpaper :p.

3.) Sorry andrew, I don't even have the source anymore Sad lazyfoo.net has some great SDL tutorials though!

Author:  andrew. [ Sun Jul 05, 2009 6:23 pm ]
Post subject:  Re: RE:first SDL game

saltpro15 @ Sun Jul 05, 2009 5:53 pm wrote:

2.) I don't know why it doesn't work, this game is crap so that's your problem most likely. My avatar can be found by google imaging fractal art wallpaper, and it's on the first page and of course is also my wallpaper :p.

3.) Sorry andrew, I don't even have the source anymore Sad lazyfoo.net has some great SDL tutorials though!


@2: Your avatar/wallpaper is also available on InterfaceLift in a variety of resolutions.
@3: That's okay, I was just joking. And thanks for the SDL tutorial website.

Author:  saltpro15 [ Sun Jul 05, 2009 7:58 pm ]
Post subject:  RE:first SDL game

No problem! Good luck, SDL is the first step to major game development Smile

Author:  andrew. [ Sun Jul 05, 2009 11:20 pm ]
Post subject:  RE:first SDL game

Haha yeah. This is a bit off-topic, but I've been playing around with pygame recently, does that use some sort of wrapper for SDL or do I have it totally wrong?

Author:  saltpro15 [ Fri Jul 17, 2009 6:59 pm ]
Post subject:  RE:first SDL game

I believe so. There's also a Ruby wrapper for SDL if I'm not mistaken Very Happy


: