Thread: Space Pong (Debug) Release

  1. #1
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704

    Space Pong (Debug) Release

    Tonight I was surfing through my backed up files on cd and found this project I completly forgot I was working on. Its a pong clone, thats obvious but ads some really unimpressive features.


    The thing is I found it and it was still in the menu development phase no game code was actually implemented so I pounded it out tonight in a couple hours. The problem is that I didnt implement any of the graphic improvments from the menu in the actual game and the code for the game is pretty horrendus. The source is being included to encourage who ever is crazy enough to rummage through it to make improvements or heaven forbid *learn from it.


    Screen shot of the only impressive thing: http://www.jeremygiberson.com/images/spacepongshot.jpg


    The download is an astonishing size for a pong clone, but its because of the texture files. The direct download is here http://www.jeremygiberson.com/downloads/SpacePong.zip


    There is the cookie, if you wait long enough after either yourself or teh computer wins. You could cheat and veiw the texture in a graphic editor as well. edit: or view this old thread http://cboard.cprogramming.com/showthread.php?t=65597


    Things I wanted to improve:
    All around code, half way through the project I stopped trying to be object oriented and just started "making it work". Theres a lot of functionality if handled better could be completly independent of everything else.

    AI is as basic as possible, the only way to win is not lose long enough for the ball to start moving faster then the computers paddle can move. I would have liked to do a kind of timed "look", where a more human like visual aquity could be emulated. Every few seconds (similar to a humans visual recognition time) look where the ball is, and move accordingly. Also, add in random miscalculation in the balls location or paddle moving to simmulate human error.

    I wanted to add shaders to the paddle and balls to make them more visually impressive. Kind of plasma / eletrical like effects.

    I wanted to add powerups for the paddles, and ball.

    I wanted to add network code for online play with other players.

    Currently, theres a bit of debug info being printed to the screen, I need to remove it.
    Theres some other stuff too.



    Many thanks do go out to the tutorial sites like nehe, and gameprogrammingtutorials, thats where I learned all the opengl specific stuff. This game canabalizes the template code from several of their tutorials. Generally I never copy/paste code, but this project was meant to be a quick one when I started. I'll have to suffer the title of hypocrit on this project I guess lol. It would have came out a lot prettier and easier to understand for others If I hadn't been so disconcerned about propper programming ettiqite(how do you spell this word).

    Any way, i'll be more then happy to answer to any criticisms or questions you have about the game.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  2. #2
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    bump
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Oh come on, surely you should know the rules by now....
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4

    Join Date
    May 2005
    Posts
    1,042
    I don't really know what to comment/criticize you on, I'm not sure what you wrote. I recognize the vecmath library from ID software, and as you mentioned there's a lot of stuff that appears to be written by jeff molofee (nehe).

    For a beginner level game it's pretty good, the physics seems to work as it's supposed to.

    BTW, I really don't blame you for not wanting to write the windowing OpenGL code. I even read an article by Carmack in which he said how disgusted he was with how much arcane code it takes just to be able to get a renderable window up and running, but it seems like only 20% of this entire project was written by you.

    I wouldn't worry about shaders, not judging the current functionality that's implemented in the game (start just by adding textures, maybe fiddle with some built-in lighting, but going from basic graphics to using shaders seems unreasonable to me). There's a lot of hype with the magical shaders, but you really don't absolutely need them to get decent graphics. People seem to mindlessly over-hype them without having the experience to actually know when they're truly useful. Also, they aren't *that* hard to work with, so writing a vertex or fragment shader doesn't automatically make you some sort of graphics programming guru (I just don't want you to believe that the only way for you to get respect is to write everything with shaders because it seems like 'the right thing to do').
    I'm not immature, I'm refined in the opposite direction.

  5. #5
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    The point of the whole project really was to see/show how easy it is to put together a game using the tutorials that are available.

    As you say, the shaders are over kill--it is just pong after all. The only reason I had intended to use them at all was for the hell of it.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  6. #6
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Yeah shaders are pretty easy, but it doesn't hurt to learn them. I used this site to learn OpenGL shaders. I found it to be excellent. Now if only they had a tutorial on loading models it'd be perfect.

  7. #7

    Join Date
    May 2005
    Posts
    1,042
    >>As you say, the shaders are over kill--it is just pong after all. The only reason I had intended to use them at all was for the hell of it.

    Cool, well you certainly did show that.

    I'm guessing you are already familiar with this, but in case you aren't have a look at this:

    http://www.gamedev.net/reference/bus...s/gameinaweek/
    I'm not immature, I'm refined in the opposite direction.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. dumpbin with debug and release version
    By George2 in forum C Programming
    Replies: 5
    Last Post: 11-12-2007, 03:10 AM
  2. Debug Mode Vs. Release Mode
    By incognito in forum Tech Board
    Replies: 5
    Last Post: 12-18-2003, 04:06 PM
  3. 2min in debug mode, 3sec in release!
    By glUser3f in forum C++ Programming
    Replies: 9
    Last Post: 10-03-2003, 01:00 PM
  4. Release and Debug builds dont work
    By garethmaguire in forum C# Programming
    Replies: 3
    Last Post: 04-10-2003, 01:58 PM
  5. debug to release modes
    By DavidP in forum Game Programming
    Replies: 5
    Last Post: 03-20-2003, 03:01 PM