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]

Re: Civ game


On Fri, 2002-09-13 at 19:31, Jim Kingdon wrote:
> > For instance, I'd like to see the stuff listed as "Required Advances", 
> > "Prerequisite advances", and "Enables" to be clickable
> 
> Yes, the same thing has occurred to me too.
> 
> Patches are being accepted...

There are some GUI toolkits I know of that have HTML engines either
built-in or as a (standard) accessory.  I've seen this in GTK+ and in
Qt, but I don't know about tcltk or SDL.

As I see it, not only would this make it possible to click on advances,
units, terrain, etc. to jump to them, it could also make the help screen
much more readable.  Besides being able to display headers in larger
type and such, a game designer could insert HTML tags into the "help"
and "notes" fields; for example, in galaxy.g, the notes for
stormtroopers could say, "Stormtroopers suffocate in outer space, so
<b>don't put them there</b>."

In the standard game, for example, the help screen for infantry might be
sent to an HTML engine as follows (the anchor tags assume that other
help pages are named starting with their type [unit, terrain, material,
advance], followed by a colon, followed by their internal name):

<html><head>
<title>infantry</title>
</head><body>
<h1><img src="infantry">infantry</h1>
<quote>marches around and captures things</quote><br />
(point value 1)<br />

<h2>Notes:</h2>
<p>The infantry army is the slowest of units, but it can go almost
anywhere.  It is also quick to produce.  Infantry is the staple of
campaigns - no special features, but essential to success.</p>

Possible sides in this game: human, robot.<br />
Gets 1 action point (ACP) each turn.<br />
MP to enter cell: 1 by default, 99 for <a href="t:sea">sea</a>, <a
href="t:shallows">shallows</a>, <a href="t:ice">ice</a>, 0 for <a
href="t:river">river</a>.<br />
MP to leave cell: 0 by default, 99 for <a href="t:sea">sea</a>, <a
href="t:shallows">shallows</a>.<br />
MP to enter unit: 1 for all unit types.<br />
Gets up to 1 free MP if needed to move.<br />
Hit points (HP): 1<br />
Vanishes if in: false by default, true for <a href="t:sea">sea</a>, <a
href="t:shallows">shallows</a>, <a href="t:ice">ice</a>. <br />
Construction points (CP): 4.<br />

<h2>Construction:</h2>
ACP to create: 0 by default, 1 for <a href="u:base">base</a>.<br />
ACP to build: 0 by default, 1 for <a href="u:base">base</a>.<br />
Can build at own location.<br />

<h2>Combat:</h2>
Can attack (ACP 1 vs all unit types).<br />
Hit chances are 20% vs <a href="u:fighter">fighter</a>, <a
href="u:destroyer">destroyer</a>, <a href="u:submarine">submarine</a>,
<a href="u:carrier">carrier</a>, 40% vs <a href="u:armor">armor</a>, <a
href="u:nuke">nuclear bomb</a>, <a href="u:city">city</a>, 50% vs <a
href="u:infantry">infantry</a>, 80% vs <a href="u:base">base</a>, 60% vs
<a href="u:town">town</a>, 30% vs <a href="u:transport">troop
transport</a>, 15% vs <a href="u:bomber">bomber</a>, 9% vs <a
href="u:battleship">battleship</a>.<br />
Damage is 1 vs all unit types.<br />
Ammo needed to hit unit: 0 by default, 1 vs <a
href="m:ammo">ammo</a>.<br />
Can capture (ACP 0 vs all unit types).<br />
Chance to capture: 0% by default, 70% vs <a href="u:base">base</a>, 50%
vs <a href="u:town">town</a>, 30% vs <a href="u:city">city</a>.<br />
Protection of occupants/transport is *1.00 by default, *0.80 for <a
href="u:town">town</a>, <a href="u:city">city</a>, *0.50 for <a
href="u:base">base</a>.<br />

<h2>Other actions:</h2>
Can be disbanded (1 ACP).<br />
ACP for explicit repair is 0 by default, 1 for <a
href="u:base">base</a>, <a href="u:town">town</a>, <a
href="u:city">city</a>.<br />
Explicit repair performance is 0 by default, 500 for <a
href="u:town">town</a>, <a href="u:city">city</a>, 200 for <a
href="u:base">base</a>.<br />
Min HP to repair is 1 for all unit types.<br />

<h2>Vision:</h2>
0% chance to be seen at outset of game.<br />
0% chance to be seen at outset of game if independent.<br />
Not always seen even if terrain has been seen.<br />
Occupants not seen even if unit has been seen.<br />
Chance to see if adjacent is 100% by default, 10% for <a
href="u:submarine">submarine</a>, <a href="u:nuke">nuclear bomb</a>.<br
/>

<h2>Material Handling:</h2>
<a href="m:fuel">fuel</a>, 1 basic production, 6 storage (6 at start of
game), 1 basic consumption, needs 1 to move, 1 consumed per move,
receive from up to 3 cells away<br />
<a href="m:ammo">ammo</a>, 6 storage (6 at start of game), 1 (ammo)
consumed per attack, receive from up to 3 cells away<br />
Productivity adjustment for terrain is *1.00 by default, *0.00 in <a
href="t:swamp">swamp</a>, <a href="t:desert">desert</a>, <a
href="t:mountains">mountains</a>.<br />

<hr />

Fate if side loses: 100% chance to vanish.<br />

</body></html>

(you can cut and paste this code into a text editor, save it as an HTML
file, and open it in a web browser if you want to see what it would look
like.  The only missing part will be the image of soldiers.)

I imagine that writing code to generate this kind of HTML output would
not be too difficult, but I don't know what it would require to make
Xconq display an HTML-formatted help screen.


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