OpenGL Checkers


by Scott Daniel


Fun for the whole family!

Description:
OpenGL Checkers was my attempt to incorporate different OpenGL techniques into one project. Although it is incomplete in many ways I was able to add features such as picking, display lists, and texture mapping. Picking is one of many ways to select objects in a 3D world but the added benefit of picking is that OpenGL does most of the work for you. Without display lists trying to play with the models would cause OpenGL to render each vertex of each models every frame. That adds up pretty quickly so using display lists allowed me to "compile" the models so that they render much faster. And texture mapping is just cool, 'nuff said.

How do you play?
There are 5 different mouse modes.
The first and default is 'Selection' which allows you to click on the squares of the checkers pieces you want to move. If you want to make a jump click on the sequence of squares that you want to jump to. Every square that is part of the jump or single move sequence will be highlighted yellow. If you need to use a square more than once click it again and it will change a different color. When you are ready to move press the 'm' key.
Rotate/Translate/Scale allow you to manipulate the board.
Light allows you to click in the window and drag you mouse to move the light in different directions.

There are also 3 draw modes. Normal uses standard coloring without lighting or texture mapping. Lighting uses the OpenGL lighting feature. Texture uses texture mapping.

Piece mode allows you to pick how to draw the models. Normal draw mode draws the standard checkers pieces. Model draws a tyranasaurus rex for black and a dragon for white.

In view mode you can choose between Orthographic view and Projection.

Screen shots:


Initial setup

Jumping piece

Dinosaurs vs. Dragons

Resources:
You can get the app here
I got my texture bitmaps from Infinity Fish
Nehe Game Tutorials have over 30 tutorials on different aspects of 3D programming. Very useful.