This is the mail archive of the 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]

New Xconq Features

I sent the new code for scientific advances etc. to Stan today. So far, it
works only on the Mac, but hopefully there will be a Unix interface soon.
For those of you who are interested in game design, I am enclosing some
notes on the new features below. I think most Xconq modules easily could be
modified to take advantage of them.

Hans R

P.S. If you think I was inspired by an existing game you are probably right. ;-)


The new code has two major components which are really independent of each
other. The first is the new data type stype for scientific advances. The
parameter side->science[s] stores the number of research points a side has
accumulated for a science. When it reaches the predefine value s_rp[s] it
is set to (-1) to indicate that the goal has been achieved. The available
sciences for a side determine both what new sciences can be researched, and
what type of units can be built. See tables ss_needed_to_research and

The second new component is the advanced units. The utype property
u_advanced determines if a given unit type is advanced in a specific game.
An advanced unit is usually a city but can also be mobile. It has the
ability to collect newly produced materials from nearby cells that it
controls. A given cell is always controlled by one specific unit (or no
unit at all). A pointer to the controlling unit for each cell is stored in
the new area layer **user. A unit loses control of a cell that is entered
by a hostile unit.

An advanced unit can grow in size, and the number of cells that it can
control, unit->maxcells, equals the size. Growth in size is usually
achieved by accumulating key materials (food), which are defined by
um_consumption_per_size (size maintenance) and um_consumption_to_grow (size

Each advanced unit has a dialog which is brought up by control-clicking on
the unit. In this dialog, there is a clickable map of the area near the
advanced unit, where the cells currently used by the unit can be selected.
The terrain-specific supply of materials for the chosen cells is displayed
on the map as small icons. Two popup menus can be used to choose
construction task and current research (unit->curscience) for the advanced
unit. The accumulated supply of each defined material type is also shown in
the dialog.

Research occurs by accumulating research points for the current science.
This occurs in proportion to the supply of limiting materials as defined by
sm_consumption_per_rp. When a certain scientific advance has been achieved,
dialogs prompt the user to choose a new science to research for the units
involved in the old project. Several research projects can run at the same
time, provided that there are enough advanced units.

Advanced units also differ from normal units in that their action points
are proportional to the supply of certain other key materials as defined in
um_consumption_per_cp. This means that a large advanced unit (which
controls many cells) can build new units much faster than a small advanced

Since different limiting materials can be defined for growth, research and
construction, and since different terrain types may produce different
materials (as defined by tm_production) the choice of currently used cells
for each advanced unit is very important. A good long term strategy is to
make size increase a high priority. For independent units and units
controlled by an AI, there is therefore an algorithm that allocates used
cells in order to optimize unit growth at the expense of research and
construction. The same algorithm is also used for human units, but the
allocation can be overridden manually.

The new code is 100% backwards compatible with existing games. The advanced
unit features are invoked by the GDL command (add unit advanced true) and
all other unit types behave just as before. It is therefore easy to take an
existing game and add e.g. advanced cities provided that the required new
GDL tables also are supplied. The new science properties and tables all
default to zero, so there is no effect at all in existing games where
scientific advances are not defined.

Hans Ronne

Department of Medical Biochemistry and Microbiology
Uppsala University
Uppsala Biomedical Center
Box 582
S-751 23 Uppsala

Tel: + 46-18-4714239
Fax: + 46-18-509876

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