Final Project: Laser Chess
by James Patterson
Laser chess is a chess-like video game which uses lasers and mirrors. Laser Chess was originally written by Mike Duppong, and since then people have created many versions and variants of this game. One of the most popular is available for download at http://www.laserchess.org. Their version is 2-dimensional. The version that I have created plays identically to their online version but is 3-dimensional and allows the camera to be rotated.
|Original Laser Chess||3D Laser Chess|
The pieces in laser chess are king, laser, block, triangle, straight mirror, diagonal mirror, splitter, and hypercube. All pieces can move one space in any direction. Only the king and the block can destroy pieces by moving into the same square. The king is the most important piece. Like standard chess, a player loses if his/her king is destroyed. The laser can shoot a laser beam that destroys a piece if it hits a non-mirrored side. The block and triangle have mirrors on one side that reflect the laser, and the splitter will divide one beam into two if hit directly. In the center of the board is the hyperhole (blue transparent piece) which like the hypercubes (red or green transparent pieces) redirect the laser beam in a random direction. If a hypercube takes an object, it gets teleported to a random location.
In addition to the basic elements of laser chess, this version adds some interesting graphical elements. To begin with, the floor is reflective. Originally, I was planning on making the pieces reflective but the challenge of adding 40 reflective elements in the scene proved to be a daunting task. After attempting 4 different reflection algorithms and spending almost 30 hours on that part alone, I decided to cut my losses. To demonstrate reflectivity, I made the floor reflective. This dramatically improved the overall look of the game. Also, the hypercubes and hyperholes are semi-transparent adding extra graphical nuance. The laser beams bounce around the scene, reflecting off the mirror surfaces (rendered as a shiny metal) and by redirected by the hypercubes and the hyperhole. The pieces being destroyed by the laser beam glow white as the are superheated.
Each player has two stages to their turn. A stage consists of either moving a piece, rotating a piece, or shooting the laser. Pieces can be taken with the block or the king. The hypercube (transparent piece) can teleport other pieces to a random location by taking them. Pieces moving into the hyperhole (blue transparent thing in the center) get teleported to a random location. If your king dies, you lose the game.
Press '5' to select/deselect an object.
Use '8','2','4','6' to move the selection tile up, down, left, and right respectively.
Press '0' to rotate a selected object.
Press 'l' to fire the laser.
Use the left mouse button to change the camera angle.
Press 'r' to restart the game.
Press 'q' to quit.
OpenGL Programmers Guide (2nd edition)
http://www.laserchess.org (Of course)