Randy Merkel
3D Knights and Castles

Game Description

Knights and Castles is a Go like board game where two to four players can compete for control of the board. The board itself is a hexagonal grid made up of thirty-seven hexagonal tiles with seven tiles going across the middle and diagonals of the board.

On each players turn, that player can either place a knight or a castle on the board. Eight castles are available in a two player game where as nine are available in a three or four player game. Each knight contributes its strength to the surrounding tiles for its owner. A knight’s base strength is six, but each adjacent castle subtracts one from its strength. To control a castle, a player must have a combined total strength of at least five and have the highest strength on that tile.

The game ends when either a player owns at least four castles and is not tied with another player, or when the board has been completely filled. When the board is completely filled, the player with the most castles wins. If there is a tie, the player with the most knights on the board wins. If there is a tie in the number of castles and in the number of knights, the overall game is a draw.

 

Instructions

Starting a Game

Start a game via command line, supplying it with the number of players, the names of the .m model files to use for the knight and the castle, and the texture to use on the board.

finalproject.exe <number-of-players> <knight-filename> <castle-filename> <texture-filename>

Gameplay

The color of the knight model to the side of the board (a bunny by default) indicates which players turn it is. On each players turn, that player can click on the knight model or the castle model and the click on the tile where the piece is to be placed. All game events are stated in console window such as selecting a piece, trying to make an invalid move, or the game being over.

When a piece is placed, the ownership of every castle on the board is checked. If a castle changes ownership, the current castle will "explode", leaving a new castle with the new owners color.

Look and Feel

By default, clicking and dragging on the screen with the left mous button will rotate the camera and clicking with the middle mouse button will move the camera towards or away from the board. The keyboard arrow keys can also be used to rotate the camera.

The light in the scene can be moved by pressing the 'l' (el) key. The light can be moved in exactly the same way as the camera. Return to camera moving mode by pressing the 'c' key.

The material used for the board, the board tiles, and the pieces can all be changed via menus accessed by right clicking. The board has a special texture toggle in its materials menu. Selecting texture will turn on/off textures which will be applied in conjunction with the material selected for the board. The texture can be displayed unaltered by selecting the "FlatWhite" material from the Board material submenu.

 

Concepts

  • Animation - moving pieces when they are placed
  • Explosion - faces of castles are moved along their normals when they change ownership
  • Display Lists - drawing up to 37 models with 500 - 1000 faces each made playing very slow without display lists to optimize drawing the models.

 

Screenshots

Default, empty board.


Move sequence that results in the Blue Castle changing owner to Green.


During and after moving a Blue Knight (bunny) onto the board.


Different look with varying materials and background.