We recommend that all artists read this chapter as it applies to all areas of creating graphics.
The Adonthell engine uses the PNG format to store gfx and an accompanying XML file to keep additional image properties. While PNG supports indexed and grayscale as well as truecolor images, Adonthell will only read latter. More specifically, only PNGs in RGB (24bit) or RGBA (24bit + alpha channel) format can be used with Adonthell.
Graphic files for the Adonthell engine may be any size you want. However, bear in mind that the game's resolution can be anywhere between 512x360 and 720x512, depending on the aspect ratio of the display. So, if you are making a scene that has to be entirely visible on the screen you would need to make it smaller than 512x360. Also, smaller gfx will mean smaller files and thus load faster in the game!
For now we will only concentrate on transparency. Graphics can only be stored as rectangular files, so if you want to â€™cut outâ€™ a shape within an image you must make all other pixels transparent. To do this you ust make these pixles exactly magenta (thatâ€™s Red: 255, Green: 0 and Blue: 255, or FF00FF in hex notation) and turn masking on in the conversion utility. Therefore images with transparency cannot have any visible true magenta pixels (youâ€™ll have to settle for 255,0,254 or something like that).
Avoiding Pink Noise
As transparent pixles must have exactly the colour FF00FF you often get pink noise around the edges of your image since many gfx apps will use anti-aliasing which creates several not-quite magenta pixels. Here are a few ways to avoid this:
- When creating the gfx do them on a transparent background (or layer). When you are done convert the colour depth to â€™indexedâ€™. This only allows for transparent or non-transparent pixels and therefore removes any anti-aliasing at the edges. Then convert back to RGB and flatten the image using a magenta background.
Sometimes you will want gfx to be animated. For example a mapobject (or a part of it) like a flame may be animated. Adonthellâ€™s own gfx format supports animations (also like GIFs!). You can create them by making each frame as a seperate PNG (if some frames get repeated you only need to make them once). The frames can then be added to a sprite. You can then put the frames into the desired order and set the duration for which each frame should be displayed. You can create animations that loop for ever and ones that just play once and then stop.
Once created the complete animation can be loaded by Adonthellâ€™s other editors to be included into mapobjects or cutscenes.
The Adonthell data CVS
We use a CVS to store all of Adonthellâ€™s gfx centrally. Basically there is an online copy of everything we have. With the appropriate utilities you can then download a copy to your computer with which you can then work offline (this is known as â€™checking out the CVSâ€™). Any new gfx you make you can mark to be added to the central CVS. You may then do a â€™CVS updateâ€™ which uploads your new work and downloads any changes other people have made. That way all developers can stay in-sync with each other. CVS also allows us to undo changes incase someone has made a mistake and various other maintenance features.
To use this you will need a CVS client program (they are available for most Operating Systems) and you must also be registered as a developer with our Savannah project. You can then checkout the graphics tree from our CVS with the following details:
export CVS_RSH=ssh cvs -z3 -d <username>@cvs.savannah.nongnu.org:/sources/adonthell co gfx
Later on, if you want to update your working copy, issue the following command in the gfx/ directory:
cvs -z3 update -d
To add new files and to commit changes to the CVS repository, do the following:
cvs -z3 add <file1> <file2> ... cvs -z3 commit -m <log message>