This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

More flexible unit image use


I have checked in two major changes to how Xconq handles unit images.

1.  Every unit can now have it own image, which is unique for that unit and
its associated views. To define a specific image for a given unit, just
include the image-name in the unit definition. For example, in the Intro
game, change the definition for Jinod to:

(town 12 10 1 (n "Jinod")(image-name "ancient-city"))

This will cause Jinod, but no other towns in the game, to use the town
image from the Advances game.

This is particularly useful if you have a number of units of similar type
that you want to distinguish from each other. For example, the Lord of the
Rings game defines a unique unit type for each hobbit in order to provide
them with unique images. It is now possible to use only one unit type for
all hobbits and still give them their own images.

2. The second change is that it is now possible to define a list of images
that should be used for a particular unit type. The game will then pick an
image at random from that list each time a new unit is created. Thus, to
use more town images in the Intro game, add this line:

(add town image-name ("ancient-blue-city" "ancient-green-city"
"ancient-small-city"))

The first image in the list (ancient-blue-city) is the default image, which
is the image that is shown in the unit list and the help window. Units that
have their own images defined (e.g. Jinod) are still drawn using those
unique images instead.

This is useful in games where you have a large number of similar units and
want to provide some variety for the eye. It may also help the player to
keep track of units if they have somewhat different images.

Hans



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]