09.12.2004 - written by Josef Spillner
GGZ has offered board games as long as the project is in existance.
But all of these used their own methods of displaying the board, receiving
user input and evaluating the moves.
With GGZBoard, it has never been easier to develop board games.
The GGZBoard program is written in Python, and on startup it dynamically loads
all the information it needs. For instance, if no game has yet been selected
(that's what the command line option --game is for), a game selection screen
appears, offering all the possible games.
As of now, Chess, Reversi, Hnefatafl, Go and Checkers have been implemented.
But other board games will surely follow.
(Beside, Chinese Checkers and Escape are already available, but were written
before GGZBoard was invented.)
Using a lot of Python magic, the actual game implementation just takes a few
lines. Basically, three parts have to be written: the game information (board
size, pieces, initial placements), the move verification (either how to place
pieces or how to move them), and the AI (find a move which leads to the best
results in the long run).
Additionally, a network module can be written, to enable GGZ support. The games
will still be playable in single-player mode! This module only needs to list
the network messages, and process incoming and outgoing messages.
The rest of the work is all done by GGZBoard. This includes the visual appearance
such as window size (or fullscreen mode), background image, highlighting selected
pieces, giving status information and so on. Also, GGZ initialization happens
automatically when using a network module.
If using GGZ, statistics will be handled globally, so players can see how they
match internationally. When running in single-player mode, a traditional local
highscore file is used instead.
Due to the modular nature of the games, adding new pieces is also a breeze:
With SDLNewStuff, all games can provide a menu for easy selection, download and
installation of themes.