Archived

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

quant

My first game - pong!

Recommended Posts

quant    100
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 this post


Link to post
Share on other sites
XDarkScar    122
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 this post


Link to post
Share on other sites
quant    100
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 this post


Link to post
Share on other sites
AndreTheGiant    329
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 this post


Link to post
Share on other sites
powerblazer    122
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 this post


Link to post
Share on other sites
Waverider    169
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 this post


Link to post
Share on other sites
quant    100
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 this post


Link to post
Share on other sites
Tooko    100
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 this post


Link to post
Share on other sites
SG_voc    122
Its good i wish i could do sumthin like tht but im broke and all the tutorials and stuff i find on google are just way over my head and i dont know what to do. if anyone has any suggestions plz help me thank you. sencerily the kid who only wishes he was a noob

Share this post


Link to post
Share on other sites