Game Development Reference
In-Depth Information
Set up a 3D scene and draw a cube using OpenGL's immediate mode and
GL_QUADS .
Write out the vertices of the box to a file and then load them in. This is your
first simple file format.
Update the code so that it uses vertex buffers and not immediate mode.
Research index buffers and update the code and your file format to use these
index buffers.
Research the .obj file format. It's a plain text format. Write a simple pro-
gram to load .obj files into a set of index and vertex buffers. Ignore the
materials and parametric surface information. (Tip: Remember that
OpenGL expects surfaces to come in clockwise order.)
Those steps are enough to get started with 3D game programming. Once you can
load simple .obj files then you can move and transform them using the existing
matrix class.
When you are ready to move on to animating 3D models, start with the
.MD2 file format. This is the file format used by Quake II to store its enemies
and characters. There are hundreds of free test files available to download from
the internet that can be used to test your loader. Once you get to this stage, you
will probably have a much better idea of what part of 3D graphics programming
you want to learn next.
Types of Games
Games come in many different shapes and sizes, which can be roughly categor-
ized into genres. Games in the same genre will generally need to be programmed
in a similar way.
Text Games
Text games are some of the simplest games to get started with as no graphics
are required. The programmer can focus entirely on the story. There are a
large variety of different text games but the most common are interactive
fiction games. Here is a sample of an interaction with a simple interactive
fiction game.
 
 
Search WWH ::




Custom Search