Gridlock

v2.1 Copyright (c) 2009 Brian Nenninger

Gridlock is free, but your support is welcome.
Gridlock source code is available at http://www.dozingcatsoftware.com/Gridlock.

Overview

Gridlock is a collection of many grid-based strategy games. They are individually described in the "Games" section.

After launching the application, the game window will appear. Select the game you want to play from the "Game" popup menu in the upper right. Some games have different variations (different rules, board size, etc), which you can select from the "Variations" popup menu.

The "Players" section on the right displays the color and status of the two players. The player whose turn it is will have a bolded label. For games in which players have a score, the scores are shown next to the player labels. Popup windows underneath each player's label allow you to specify whether each player is human or computer-controlled, and the difficulty of computer players. (Note that "Hard" and "Very Hard" computer opponents may take several seconds to make each move).

The rest of the window contains the game board. The board can be rotated by right-clicking or control-clicking and dragging the mouse. To make a move, click on the cell where you wish to place a piece. Some games require that you move from one cell to another; to do this first click on the cell you wish to move from, then click on the cell you wish to move to. (In some games such as Checkers you may be able to make a move containing several jumps; to do this click on each cell you wish to jump to in sequence). For all games, cells that are legal moves will become highlighted when you move the mouse over them. If you are unable to make a move, you can pass by clicking the "Pass" button on the right. The "Restart" button will restart the game, requiring confirmation if a game is in progress.

The "Preferences..." menu item in the main Gridlock menu opens the Preferences window, which allows you to change your player name, set board and piece colors, and enable/disable move animations and automatic update checking.

Games can be saved and restored using the "Save" and "Open" commands in the Game menu. Games are saved with their full move history, so you can save a game after it is finished, open it later, and undo moves back to the beginning.

The Edit menu contains Undo and Redo commands. Selecting Undo will back the game up to the last time it was a human player's turn. There is no limit to how many moves can be undone. Selecting Redo will redo a move that was previously undone, but only if no new moves were made after the undo.

Games

Click a link for instructions for that game. Additional information for many of these games is available at The World of Abstract Games.
2-Player Games
Ataxx Reversi Dominion Checkers Think Ahead Gomoku
Connect Four Pentago Chess Cephalopod Diagonals Tonga
Hexapawn Breakthrough Amazons Lines of Action Zonesh Symbio
Abande 3-6-9 Forms Pente
Solitaire Games
Peg Jump Concentration Sets Lines Same Game Lights Out

3d Boards

Some game variations use a 3d board where pieces are placed and move in three dimensions. It can be difficult to see the entire board and select cells in 3d; the following keys can be used to aid in viewing the board:
qShift a layer of cells in the "x" direction (to the left in the initial orientation)
aUnshift a layer of cells in the "x" direction
zCycle between showing shifted, unshifted, and all cells in the "x" direction
wShift a layer of cells in the "y" direction (down in the initial orientation)
sUnshift a layer of cells in the "y" direction
xCycle between showing shifted, unshifted, and all cells in the "y" direction
eShift a layer of cells in the "z" direction (back in the initial orientation)
dUnshift a layer of cells in the "z" direction
cCycle between showing shifted, unshifted, and all cells in the "z" direction
rRevert to the initial orientation and visibility

Network Play

To host a network game, select "Host Network Game" from the Game menu. The "Port" field specifies the TCP port to listen on; the default value of 27500 is usually fine. To begin hosting, click the "Host" button. The game will automatically begin when someone connects to your computer. Close the window to stop waiting for connections.

To join a network game, select "Join Network Game" from the Game menu. Enter the hostname or IP address of the computer you wish to connect to in the "Address" field, and change the port number if the other computer is not using the default of 27500. Once you have entered an address, click the "Connect" button to connect to the selected machine. If the connection is successfully established, the game will begin immediately.

When playing a network game, moves are made in the same way as when playing against a computer opponent. Either player may restart the game or start a different game and/or variation. The player who initially hosted the game is always player 1, and the player who connected is player 2. When playing against a network opponents, the popup menu next to their player labels will have "Network" selected. Changing either player's type will end the network game and disconnect.

Donations

Gridlock is completely free, but if you enjoy it you can support its development by donating via PayPal.

Feedback

Contact me with any bug reports, comments, or suggestions at brian@dozingcatsoftware.com.

License

Click here for license and copyright details. Gridlock is released under version 3 of the GNU GPL. If you would like to use the code under a different license, contact me and we should be able to work something out.

Gridlock comes with ABSOLUTELY NO WARRANTY.

Version History

2.1, Apr 5 2009

2.0, Feb 17 2009: initial release

Technical Information

Gridlock is written in 100% Python. It uses wxPython for the user interface, PyOpenGL for OpenGL graphics, and Numpy for representing the game state as a multidimensional array. It is primaily developed under Mac OS X, and is tested on Windows (Vista) and Linux (Ubuntu 8.10). In theory it should work on any platform which supports Python and the above libraries.