   My Pong Game
  Although I'm not a newbie to game programming (been doing it for about a year now and I have great knowledge of C++/C, SDL, and OpenGL) I realized I never made the all time classic - Pong. I started it about 6 days ago and I'm pretty much done with it. AI I can't beat so I'm happy, physics code is working well (I love programming physics for some reason), loading images and such is great, I haven't optimized yet but I've got about 80 FPS which I'm really happy with. But I think I might have used some things not needed, I'm not sure. Using the PLC from Whole Tomatoe software, here's my project stats:Total Files: 15Net Lines: 794 ---- 100%Code: 391 ---- 49%Comments 303 ---- 38%Mixed 39 ---- 4%Blank 139 ---- 17%Net Lines (no blanks) 655 ---- 82%I know the saying how it should be short enough to work well but long enough to have everything included (I don't have a menu yet) but it still seems I overworked myself.Any comments?   R.I.P. Mark OsbackSolo Pa Mi GenteVG-Force[edited by - Ekim_Gram on February 15, 2004 1:44:29 AM]
  It''s nice to see that 38% of your code is commented. ;  I'm one of those people who have to have a big portion of the source defining classes to explain what the function does. For example:/* *==================================================================== *CPaddle Overloaded constructor * * desc: Overloaded constructor for CPaddle. * @param: Takes two scalar values that are set to CPaddle's x and y  *    coordinates. If the paddle is controlled by AI, perform the *   AI as well. *==================================================================== */CPaddle::CPaddle(scalar xPos, scalar yPos){m_Position.vector_2d[0] = xPos;m_Position.vector_2d[1] = yPos;}   It makes the code look bloated and descriptive. 'sides, I am coding  Open Source so I like when people know what's going on in that function and can distinguish what's happening.   R.I.P. Mark OsbackSolo Pa Mi GenteVG-Force [edited by - Ekim_Gram on February 15, 2004 1:59:52 AM] [edited by - Ekim_Gram on February 15, 2004 2:00:16 AM];  At one time, I had on average more comments than code. It was nice, but it actually hindered my progress. Now I strive for 20% comments, but it''s not easy for a person who naturally wants to comment. ;  Yay i too made Pong not long ago. Good learning experience on Initializing DirectX. So far its pretty basic and i have been working on adding AI. Once im done i have some code cleaning to do. ;  AI is really simple for Pong. If you''d like, I''ll post mine.   R.I.P. Mark OsbackSolo Pa Mi GenteVG-Force;  With Pong, it is harder making AI that you can   beat. ;  I would like to see all of the code if that is at all possible if not i would love to at least see the code for the paddle and ball objects!! I am working on a Breakout game and i am lookin for a smoother implementation for those two important objects of the game.  I am currently in pseudocode but i will be going for real code soon.  I am also not a theif I learn best by example and it is hard to find code for breakout.  (at least that is worth looking at) I find many poor implements in the small amount i have found but nothing very slick. and your 80fps sounds like it must be at least semi slick.  Anyhow good work on near completion of your game and in your future endevours as well.-N ;  I''m gonna register my Pong game on SourceForge so people can access it. When I get it done, I''ll make sure you know.   R.I.P. Mark OsbackSolo Pa Mi GenteVG-Force;  ok awesoem thanks for your willingness to share your knowledge-N 