Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: myPong

  1. #1
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default myPong

    First game I created. I used some code from other sources and added alot of my own. I think my version runs better and doesn't crash\lag.

    Credits, aside from myself, I owe wargamer a BIG thank you for helping me out with the rendering.

    Known issue (seems the collision isn't accurate. It seems it's a bit off the top of the paddle in comp & player).
    Trying to figure out how to make it more accurate, but I'm a bit stuck.

    Feel free to try it out for yourself. I'd like to hear feedback and if you want to make any changes or show improvements, feel free to do so. I will post the full source as well.

    Version 1:
    http://www.x-null.net/James/myPong/myPong1.zip


    Version 2:
    http://www.x-null.net/James/myPong/myPong2.zip


    Version 3:
    http://www.x-null.net/James/myPong/myPong3.zip


    Version 4:
    http://www.x-null.net/James/myPong/myPong4.zip


    Version 5:
    http://www.x-null.net/James/myPong/myPong5.zip

  2. #2

    Default

    i had a game kept winning lol seems the collision issue is only on the blue computer side. GG

  3. #3
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    v.cool , good work, I am playing with games myself at the moment actually!

    just going to reinstall pc, cos have so many sdks installed, nothing will compile!

  4. #4
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    I think my ultimate goal (once I get this working perfectly) is to make a bad ass "raptor" game if you guys remember that.

    Actually what would be cool is when you're playing a obj in MOHAA, if you die early, you can toggle this pong game within MOHAA to keep you busy. until you respawn.

  5. #5
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    v2 is released. Updated first post. Please let me know what you think:

    What's different:

    Better AI
    Optimized some things
    Interpolated transitioning background (kinda pointless I know, but I wanted to try something different)


    As always, please give me feedback and feel free to dabble through the source if you wish.

    Future additions
    Score
    Menu with options
    advancing levels
    Timer
    optimize background transitioning so it's smoother

  6. #6
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    that's really cool, all coded or using libraries?

  7. #7
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    All coded. The source code is available

  8. #8

    Default

    Played version 2 for a bit and it seemed to work pretty good
    Could not beat the computer. But that might say more about my Pong skillz than it says about the game.
    It did go "blank" at some point though, after about 10 minutes. Everything just became white but the game kept on going.
    And I'm glad I could help.
    =|UWS|=|SA|Vince - Head Serveradmin - mohaa.uwsclan.us (MOH:AA - FT)

  9. #9
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    I did notice that after I debugged it more. wargamer, would you by any chance know what the problem could be?
    I made a thread on GD here: http://www.gamedeception.net/threads...065#post159065
    and I posted some pastebin links with the source. I'm not sure why it blanks after several minuts, but I'm also trying to figure out the transitioning errr.

    Thanks again for your help!

  10. #10

    Default

    Figured out the blank error. In your "randColor" function you have the following:
    PHP Code:
    HBRUSH color CreateSolidBrush(RGB(rand() % 255rand() % 255rand() % 255));
    HBRUSH color2 CreateSolidBrush(RGB(rand() % 255 ,rand() % 255,rand() % 255)); 
    However, you don't delete those brushes after you're done with them thus you'll eventually get an overflow of sorts.
    Adding this before the return of that function seems to fix it:
    PHP Code:
    DeleteObject(color);
    DeleteObject(color2); 
    =|UWS|=|SA|Vince - Head Serveradmin - mohaa.uwsclan.us (MOH:AA - FT)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •