• 9
• 16
• 15
• 12
• 9

I got my first game to beta stage!

This topic is 4590 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

It took a few months, and a ton of hours browsing the SDL wiki, but I finally got pong to a beta stage, I know there are a bunch of little bugs, and I'm cleaning them up, but I just thought I'd post this and see if any of my methods are completely nuts or done wrong or something. This game was coded by using only the SDL wiki, and blind guessing :-P Anyway here's the link, feel free to ridicule my poor coding style in any way you see fit.

Share on other sites
Hi there fella. I tried your game, nice for your first game. :) I was in the text game world for a very long time before I did something like that. However, a couple of things to comment on:

The game runs extremely slow, I mean I sat and waited for the ball to reach my paddle too see if it did work. :P You should set the gamespeed to a variable so the player can change it. Hi speed pong is fun. ;)

I see no numbers to keep track of the score, that would be nice.

Make the ball start in a random direction instead of always to the left.

Two player support maybe?

Im sorry if youve already thought of these, you said its only beta, but thats a couple of things to work on if you dont know what to do next.

Good work. :)

Share on other sites
Pretty good game. One bug though is that if you hit the ball with the side of the paddle the ball will go right through it. Like this:
   _  / \   \_/   +--+  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +--+Next:   _  / \   \_/+  |  |  |  |  |  |  |  |  |  |  |  |  |  |  +--+Next:     _ / \-+ \_/ |  |  |  |  |  |  |  |  |  |  |  |  |  +--+

Some suggestions for improvements:
- Create text, this could be used for a simple menu, showing score, showing winner. Typing name etc.
- UI(Menu), for this you'ld have to get some text first(unless you use textures as buttons)
- Multiplayer
- Mouse control
- Faster ball, you could add a little to the ball speed everytime it's hit.
- AI, your current oponnent just approach the ball's y coordinate with top speed when the ball is on its half of the window. It looks a little weird that after it have hit the ball it still try to match the ball's y location, but when the ball enter the players window half it just stops. You could either let it try to match the ball's y-location the whole way through or only do it when the ball is approaching the computer.

If you want to do more about the AI you could try to make the computer estimate where the ball will hit, this should of course not be precise and the estimated point should be updated all the time the ball is approaching. The estimated point will of course be more and more precise. The computer could then try to match the estimated point's y coordinate.

Also when a human play (s)he quickly approach the ball when the paddle is long away from the target point, but slower when getting closer to the target point. You might want to make the enemy approaching at full speed when it's long away from the ball's y location, but at a slower speed when it's close to the ball's y location.

Share on other sites
Thanks for all the tips, most of what you mentioned I've had in mind, what I'm really wondering about is my coding practices I'm I doing anything thats going to cripple me later? As in learning something the wrong way or using bad methods?