Public Group

#### Archived

This topic is now archived and is closed to further replies.

# My first game - pong!

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

## Recommended Posts

Finally finished my first game, a remake of pong If anyone wants to try it http://www.timthrelfall.com/projects/pong.exe Its a hard game, should be impossible to score against the computer if all is working well One problem i have with it though, is that the speed of the ball depends on how many fps the game is running at, because all the movement calculations are done in the message loop. Is there an easy way to make it independant of the fps rate? [edited by - quant on August 11, 2003 12:56:04 PM]

##### Share on other sites
Hmm, Good game.. It is imposible to score though if the computer knows were the ball is going right when you hit it.

Easy way of programming: Code, Graphics, Swearing....

##### Share on other sites
Theres a small bug that lets you score, if the ball is moving fast enough it can go through the computers bat

Gonna try and add some levels of difficulty, maybe change the point at which it knows where the ball is going.

##### Share on other sites
You should add a little bit of a human touch to make it more fun/real.

The average person''s reaction time is about .5 second. You should make the computer have something like this where it doesnt quite know where to place its paddle for the first .5 sec (approximately, you could make it a random number between .35 and .65 for more fun!) after you hit the ball back to it. Of course, even a human can tell approximately where the ball is going to go by watching what angle the ball is going towards the opponents paddle before he hits it. You might want to account for this too. For the difficulty settings, you might simulate a better player by lowering the computer''s reaction time. I think its a surprisingly complicated problem to make a realistic and fun opponent even for such a simple game as pong.

Good luck and keep us posted!

##### Share on other sites
Okay, I''m new to game programming, not C++, I know c++, but I was wondering how you make games like these. I have absolutly no clue, and I was wondering is I could see a little bit of your source code, or all of it. I promise not to steal it or anything, but I want to see the main design for 2d games like yours. And don''t start yellin at me for being dumb, I''m an 12 year old.

##### Share on other sites
It might be a good idea to have the computer not play so well against the walls at high speed, almost like the ball changes direction in a way it doesn''t expect.

##### Share on other sites
check out my first pong game at www.crowsoft.net

##### Share on other sites
Hi again everyone

Thanks for the advice, ive added 4 difficulty levels to the game if anyone wants to try it . Same url as last time

http://www.timthrelfall.com/projects/pong.exe

Ive changed the reaction time for the different levels as AndreTheGiant suggested, so the paddle only reacts to the ball when the ball is at a certain distance, its hard to find the right balance though, any comments would be nice

Also added an option to change the horizontal ball speed, which makes it easier to score against the computer, if you can take the pace that is . Plus the ball now starts from random places instead of the same place every time.

[edited by - quant on August 12, 2003 7:06:16 AM]

##### Share on other sites
Yes, but I''m playing it now with a ball speed of five and impossible. I haven''t movfed and my score is... 80 (to 113) i''m not saying it''s good, but if I''m not moving the impossible AI isn''t impossible.

Just a thought!

##### Share on other sites
Its impossible on ball speed 1, and 2, but yes it is possible on higher levels

1. 1
2. 2
3. 3
4. 4
Rutin
11
5. 5

• 12
• 19
• 10
• 14
• 10
• ### Forum Statistics

• Total Topics
632665
• Total Posts
3007711
• ### Who's Online (See full list)

There are no registered users currently online

×