![]() |
OO Game Programming tutorial - Part 1 |
OO Game Programming tutorial: Pong
Introduction If you want to follow along with the source code you will need to know a bit about using Visual C++ and OpenGL, there are some great tutorials at NeHe’s site to help you out. We are going to be Object Orientated in this game so I’ll assume you know basically what a class is. The OO won't be getting too heavy for this game. Our game will be a simple 2-player pong game. I’ll show you how to create a really basic one, I mean basic as in without lots of bells and whistles. (you can check out the other one on the webpage if you can want to see my creation here). This pong will be more than easy to convert to 3D though most of it will look 2D for now. Since we want get into the interesting stuff as soon as possible we can make use of Trent Polak’s game framework also from Nehe’s. This saves the trouble of having to worry about setting up OpenGL, DirectInput, Fonts, all that important, but boring stuff. Okay so let’s get things up and running. We’ll create a new win32 application in VC and add our source files. We can change the line: #define TITLE “ShiningKnight” in Shining3D.h to “Pong” to customise it for our needs Here is our basecode ready to go.
|