Customization

Preferences

To change the game's settings, select Settings->Preferences.... This opens the Preferences dialog.

The properties in the Player Selection tab are:

Player One and Player Two

These options tell Gnect who's playing. To play against a friend, select Human for both Player One and Player Two. You can set up computer vs computer games, too.

When starting a new game, who moves first?

This menu lets you select which player starts when a new game begins.

The properties in the Appearance tab are:

Theme

The theme menu lists available themes and lets you choose between them. Below it, two text boxes show player counter descriptions for the currently selected theme.

Enable animation

This option toggles all animation.

Enable animated wipes

This option toggles the way the game board is cleared between games. If enabled, Gnect will pick a wipe effect at random. If disabled, the board will clear instantly.

The properties in the Miscellaneous tab are:

Sound

Gnect can make sounds when certain events occur. If you choose the Speaker beep option, Gnect will beep when a game ends or when an illegal move is tried. If you choose the GNOME sound events option, Gnect will play a range of audio files. These audio files must first be set up using the GNOME Control Center.

Keyboard

These options let you arrange keyboard play to your liking. Select an action, then press the key you'd like to perform it.

Enable verification dialogues

If this checkbox is set, the program will ask for verification before ending an unfinished game.

After you have made all the changes you want, select OK to apply the changes and close the Preferences dialog. To cancel the changes and return to previous values, select the Close button.

Custom Themes

This section is included in case you'd like to make your own themes for Gnect. It assumes you're familiar with basic text editing, graphics software and the command line.

Images

Gnect's tilesets contain six tiles of equal size, lined up horizontally. From left to right:

  1. Player One's counter as it'll appear on the main board

  2. Player Two's counter as it'll appear on the main board

  3. Main board background

  4. Top row background

  5. Player One's counter as it'll appear on the top row

  6. Player Two's counter as it'll appear on the top row

Figure 1. An example tileset

TipTIP
 

PNG format is recommended for tilesets. They should usually contain transparency in tiles 1, 2, 5 and 6. Tiles 3 and 4 should be solid, with no transparency, even if you'll be supplying a full window background image.

Gnect automatically calculates the tile dimensions:

tile height = tileset height
tile width  = tileset width / 6

That is, your tiles can be square or rectangular - and any size you like. Most of the tilesets that come with Gnect use square tiles measuring either 40x40 pixels ("small") or 50x50 ("large").

So, what if you want a full-window background image, rather than repeating tiles 3 and 4 over the game board? For that, you'll need to make a separate image. Say each tile in your set measures 50 by 50 pixels. The game board measures 7 by 7 tiles, including the top row, so the ideal background for your tileset measures 350 by 350 pixels. But if your background doesn't fit, Gnect will scale it for you.

Before you can try your new tileset and background image, you'll need to create a theme file.

Theme Files

Here's an example theme file, showing all possible keywords. Lines starting with a hash (#) are ignored.

#
# buttons_50x50.gnect (an example theme file)
#

# This theme's title (required)
Title = Button Shop (large)

# Tileset filename (required)
Tileset = tileset_50x50_buttonshop.png

# Full-window background image (optional)
Background = bg_buttonshop.jpg

# Description of player one's counter (required)
Player1 = Green

# Description of player two's counter (required)
Player2 = Yellow

# Grid colour (optional, defaults to black)
GridRGB = RGB:/FF/FF/FF

# Disable the grid for this theme (optional)
NoGrid

# Details (optional)
Tooltip = artwork credits or whatever you like

Legal values for the Player1 and Player2 keywords are as follows: Light, Dark, Black, White, Grey, Yellow, Red, Blue, Green, Orange, Purple, Pink, Violet, Brown.

Putting it all together

So, you've made a tileset, a theme file and maybe a background image. Now what?

Make a ~/.gnect directory, a ~/.gnect/pixmaps directory and a ~/.gnect/themes directory. Copy the image(s) into the pixmaps directory and the theme file into the themes directory. Make sure the theme file has .gnect as the suffix. Next time you start Gnect, you should find your new theme listed in the Preferences dialog.