Try my pong clone

This is a discussion on Try my pong clone within the Game Programming forums, part of the General Programming Boards category; Here's my pong clone. The game object colors can be changed and sound disabled through a right-click menu. I would ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    380

    Try my pong clone

    Here's my pong clone. The game object colors can be changed and sound disabled through a right-click menu. I would like to know if there are any game speed problems with it.
    Attached Files Attached Files
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Maybe a bit slow, but nice. I would rather use the arrow keys than the mouse though
    Away.

  3. #3
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    game speed is a little slow for me (1.4 Athlon, 256 RAM, GF 2 64mb). and it pauses when it tries to play a sound (when the ball hits the paddle)

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    380
    It is possible to use the arrow keys to control the game.

    Perspective, are the pauses noticable? I don't get any.
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  5. #5
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    >>It is possible to use the arrow keys to control the game.
    hmm... so it is. But they're slow.

    The delay is noticable. The other paddle doesn't refresh its position until after the sound has finished playing.
    Away.

  6. #6
    Registered User
    Join Date
    Aug 2001
    Posts
    380
    Anyone have any suggestion on how to improve my update function or to fix the speed issue?
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  7. #7
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Originally posted by lambs4
    Anyone have any suggestion on how to improve my update function or to fix the speed issue?
    i belive a good approach to playing a sound without delaying game play is to use multi-threading. if the sound runs on a seperate thread it will not conflict with game/rendering processes. im not sure about implementation details for threads in c++ though.

  8. #8
    Registered User
    Join Date
    Aug 2001
    Posts
    380
    Sorry, for bringing this back up , but I still want to fix the pausing problem. If you disable the sound does the delay stop? Right-Click->Sound->Off. I think the problem isn't really with the sound, but with how the AI is written.

  9. #9
    ___
    Join Date
    Jun 2003
    Posts
    806
    can I add that the ball speed is too slow too since you brought it back up. You need to increase it a bunch.
    "When I die I want to pass peacefully in my sleep like my grandfather did, not screaming and yelling like the passengers in his car."

  10. #10
    Registered User moonwalker's Avatar
    Join Date
    Jul 2002
    Posts
    282
    Not bad. But yes it is slow sometimes.. it pauses a bit after you press the arrow key and then continues to move (i guess it is due to keyboard repeat rate in windows). try to make it independent of the repeat rate, if possible (even i dont know how to do this).
    i have been searching for it online for months now, but no luck
    so far.

    try my pong clone, by the way
    it is all written in TEXT
    Attached Files Attached Files

  11. #11
    Registered User harryP's Avatar
    Join Date
    Sep 2002
    Posts
    124

    Nice!

    Hey, I liked both pong clones. The text one was nice, I made a similar one when I was working out collision detection stuff. I really liked the graphical one, though. In fact, I found it far easier to use the mouse than to use the arrow keys. And while it did seem slow at first, I realised that the longer the ball is bouncing without someone scoring, the faster it goes. It ended up going pretty darn fast for me . I didn't have any weird pauses during sounds or anything, either. It all worked perfectly dandy for me. So nice job, to both of you!

    Brendan
    Draco dormiens nunquam titallandus.
    Console Graphics Library: http://www.geocities.com/steve_alberto/cgl.html

  12. #12
    Registered User
    Join Date
    Aug 2001
    Posts
    380
    Thanks for the comments.

    Moonwalker, I had fun trying your pong clone.
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  13. #13
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    both games were o.k.

    The first game was very slow (run it on 2.66 Ghz)

    The other text pong was better..... (You get the real fealing playing a very old game )

  14. #14
    Registered User
    Join Date
    Mar 2002
    Posts
    249
    The first pong was...boring. The text pong was wicked sweet, though!
    Well, there are a few things wrong with your code:

    1) It does not work.
    2) It does not work.
    3) It does not work.

    Hope this helps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pong Clone Collision Allegro
    By gillypie in forum C++ Programming
    Replies: 1
    Last Post: 12-29-2007, 02:42 AM
  2. Space Pong (Debug) Release
    By Jeremy G in forum Game Programming
    Replies: 6
    Last Post: 10-02-2005, 08:14 PM
  3. The Story Of Pong (my game cookie)
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 05-17-2005, 12:14 AM
  4. Clone function
    By gustavosserra in forum C++ Programming
    Replies: 6
    Last Post: 01-03-2004, 05:57 PM
  5. pong
    By lambs4 in forum Game Programming
    Replies: 2
    Last Post: 06-02-2003, 05:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21