Go to the first, previous, next, last section, table of contents.

Designing the Graphics

Xconq is fundamentally a graphical game; but fortunately, you don't have to do gnarly graphics hacking to get the pretty pictures! The basic graphics handling is built into the interface subroutines of Xconq. What you do have to do is to choose or design the basic images.

Xconq will always attempt to generate some sort of default display for your new game design, but it's likely to be pretty ugly. So your goal here is just to make the display look good. First off you should decide about the overall appearance. Do you want things to be generally light or dark? Garish or subtle? Conventional or exotic? This is a good time to cruise the image libraries and to look at the graphics of other games. Sometimes the theme decides a lot for you - how could you display anything other than a red star on a Soviet tank? You also need to think about whether you want to concentrate on b/w or color displays, although again Xconq will try to do something reasonable for both.

You have to choose three sets of images: terrain patterns or images, unit icons, and side emblems. The terrain patterns have to tile properly, since they may be used to fill in large areas, while both unit icons and side emblems are single icons. You can optionally choose solid colors for terrain, and to "colorize" unit icons and side emblems.

Once you have chosen and specified a set of images, you have to try them out in various combinations in real games. What you'll most likely discover is that they don't always mix like you imagined. That cool-looking emblem for a side disappears against the background of space, or two unit icons are nearly indistinguishable on the map. At this point, you have to start making some choices. Either substitute some different images, or design new ones of your own.

Color choices are tricky. Again, the total effect can be quite different from what you imagined, plus you should be careful about the variety of displays that your game runs on, or you may be getting complaints about how your "olive" more closely resembles "puke gray"!

Here is an example of unit icons:

(add (infantry town city) image-name ("soldiers" "town20" "city20"))

In general, an icon name should describe the literal appearance of the image, instead of the type that you want it to represent. The "soldiers" icon, for instance, just shows a row of soldiers; in one game the icon can be used to represent infantry, in another, armies in general, and in another, the national guard. There is an "infantry" image also, but it is the standard "crossed bandoliers" symbol, and is really only sensible for specialized military games.

Here is an example of a terrain pattern:

(terrain-type plains
  (color "green") (image-name "plains") (char "+")
  )

The "plains" is defined in terrain.imf, as basically a blank 8x8 tile with two pixels turned on, which textures things somewhat:

(imf "plains" ((8 8 tile)
  (color (pixel-size 1) (row-bytes 1)
   (palette (0 7969 46995 5169) (1 0 25775 4528))
   "00/40/00/00/00/04/00/00")
  (mono "00/40/00/00/00/04/00/00")))

For extra fine control on color displays, you can also set the colors of unseen terrain and the grid separating cells, via the globals grid-color and unseen-color.

Note that some display systems (such as the X Window System) allow users to customize most or all of their colors, so individuals may override your choices. Not much you can do about that though!

Image Format

(imf "example" ((8 8) (mono "0011223344556677")))

[describe when fleshed out]

It may happen that you will want to add an image that is similar to an existing image. While you can replace the existing image, you may alter the appearance of some other game for the worse (perhaps its image colors have been designed to work together).

The first rule of image naming is to choose the name to describe the image literally. For instance, you may have designed an anchor image that is to represent a port. However, you should name the image "anchor" and not "port", so that it may be used in other games. Second, if the image should have a difference appearance in different eras or contexts, you should append that as a qualifier to the basic image name; so a soldier image from the American Civil War era (1861-1865) would be "soldier-acw".

Some images are more symbolic than pictorial, such as standard military symbology. In those cases the order should be function-size-individual, so as to get images with names like inf-bn for an infantry battalion or armor-div-7th for an image representing the 7th Armored Division specifically.

If you want your image to be specific to a particular game, and not to share with any other games (or be affected by image changes to accommodate them), prefix your image with the name or abbreviation for the game.

To summarize, here are the recommended name formats:

[<game>-]<picture>[-<era>]
[<game>-]<function>[-<size>][-<era>][-<side/individual>]

Finally, if your image has no obvious way to distinguish it, then you must append a distinguishing number. So multiple generic dragon images are "dragon", "dragon-2", "dragon-3", and so forth.

None of these naming rules are enforced by the software; they exist to bring some semblance of order to a large and complicated image library.

Image Design Tools

Whether you use platform-specific paint/draw programs, or you collect images in other formats, you will need to translate these into imf format, and then integrate into the existing library. Typically, each platform includes a tools to help with this; for instance, the Unix program x2imf reads X11 bitmap files and produces imf files, while the Mac program IMFApp allows both previewing of images and translation between imf files and Mac resources.

As an additional aid, the program imf2imf is a Unix program that transforms a single imf file with many images into a set of files each with one image, and vice versa. This is useful when merging sets of images together:

imf2imf foo.imf --explode -o tmp

<copy other files into tmp dir>

imf2imf tmp/*.imf >newfoo.imf

Image Design Hints

The design of each graphical image can and should be somewhat independent of the basic game design; this allows for reuse of pictures.

The first thing you should do is to check the image library on your machine. The image you're looking for may already be there, but perhaps under a different name. Even if you don't find it, you may notice an image that is close enough to be a good starting point. The Xconq image library presently includes hundreds of images, so the chances are pretty good that you'll find something useful.

The second thing to do is to look around for images in some other format, and to massage them into a usable form.

Designing images from scratch should be your last resort. Designing good images and patterns is a specialized and demanding category of artwork that I'm not going to go into here. My best advice is to learn from the pros, and don't be afraid to experiment.


Go to the first, previous, next, last section, table of contents.