Jump to content
  • Advertisement
Sign in to follow this  
jrmiller84

Rate my first game anyone (DX8 Pong)?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone, I finally finished my first game of pong using C++ and DirectX 8.0. Took me about a month of solid work , but I struggled through it and triumphed with this simple pong game. I welcome all constructive criticism. BTW, this is my first game ever. I have zipped the source and the exe in this zip. I know there are a few problems with the angle of reflection based on angle of impact on the paddle and if anyone can point it out that'd be awesome. I guess my next project will be the vertical style pong with the blocks you can take out, I can't seem to think of the name of that style of pong. Thanks everyone for all of your help while I struggled through some of the snaffus. I've never been a member of a more helpful and positive forum. Anyways, let me know what you guys think! Here's the zip file: http://www.p0wn3d.net/DXP.zip Sorry guys, forgot to say, the controls are W and S for the left paddle and Up and Down for the right paddle.

Share this post


Link to post
Share on other sites
Advertisement
Hey,

Are you using any timing to control the speed of the ball? When I tried it, the ball was to the other side in the blink of an eye.

If you don't know what I mean, different computers have different speeds. The game may run at a certain speed on your computer, but on someone's with a different speed, the ball will go much faster. By using a timer, you can control the update speed and the speed of the ball on any computer. (If you already knew this or are using a timer, sorry. I don't have time to look into your source code).

Slaru

Share this post


Link to post
Share on other sites
No, I havent used any timers at all. The ball seems to flow normally on my computer. I'm going to try it on my other computer and see how it runs. Anyone else experiencing this?

Share this post


Link to post
Share on other sites
Since you aren't using timers (I just looked at your source...), others will undoubtedly encounter this.

Here's an article on using a timer to control game rate. Article

Share this post


Link to post
Share on other sites
Alright, after reading that article I'm trying to implement a timer for the code really quick. I have a question though, which clock are you guys using to control the timer? I've noticed that the timeGetTime function is readily available and returns the time in milliseconds, is that a valid function to use?

Share this post


Link to post
Share on other sites
Yes, timeGetTime() will be just fine.

But, there are more accurate timers such as RDTSC and QueryPerformanceCounter(). For your purposes though, timeGetTime should be just fine. There seems to be a debate as to whether the supposedly more accurate timers I mentioned above are actually worth it.

For now, use timeGetTime(). When you finish your current project, you can look into creating timer classes. Do some research on RDTSC and QueryPerformanceCounter() then.

If you need some more explaining on how to use the timing to control game rate, just ask.

Slaru

Share this post


Link to post
Share on other sites
Ok awesome, I added a timer but it made the game pretty slow, so I made a few changes to the code to speed it up. Hope I did it correctly. I reuploaded the source and exe to the same link above. Hope it runs this time, heh. Thanks for your help on this.

http://www.p0wn3d.net/DXP.zip

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually, the ideal forum to post this thread is in "Your Announcements". You would obtain better replies there.

Share this post


Link to post
Share on other sites
Hey,

I see you have added the timer in there... but, sorry to say this, it does nothing. Your use of the timer does absolutely nothing to help the game rate. I don't want to put you down.

I need to get some sleep now, so I can't help you anymore. Hopefully someone else on this forum will help you. (I know many people should be able to help as this is actually a basic thing) It is getting late here, and so I wish you luck in getting the timing right. If know one picks up on the thread and helps you, PM me and a day from now I should be able to help you out.

Slaru

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!