Complete.Org: Mailing Lists: Archives: freeciv: April 2000:
[Freeciv] Re: how do i find out about the techs, units, terrain types et
Home

[Freeciv] Re: how do i find out about the techs, units, terrain types et

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mike_jing@xxxxxxxxx
Cc: freeciv@xxxxxxxxxxx
Subject: [Freeciv] Re: how do i find out about the techs, units, terrain types etc.? (was: Question ?)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Fri, 21 Apr 2000 13:22:49 +1000 (EST)

"Mike Jing" <miky40@xxxxxxxxxxx> wrote:

> For techs, you should get David Pfitzner's "techtree" at 
> http://msowww.anu.edu.au/~dwp/freeciv/techtree/ .

> P.S.  Note to David: maybe it's time to update the techtree program to use 
> the new ruleset format?  ;-)

Yeah, I've been meaning to do so ... :-7

One issue I've been concerned about is how (and how much) to share 
code from Freeciv, for parsing the ruleset files etc.  (Freeciv and 
techtree are both under GPL, so no problem there, just issues of 
programming convenience etc.)

The current (old) techtree program uses quite a few source files 
copied from Freeciv, edited to remove some extraneous parts.  
This is convenient in that it makes techtree independent and easy 
to build etc, but becomes tedious when things change.

One option would be to make some (minor) changes to Freeciv, 
such as moving ruleset.c from server/ to common/ (doesn't use
any other server stuff, so straightforward); then techtree could
require that freeciv be built, and link to freeciv's libcivcommon.a
(similar to what civworld did?)  This does still involve fairly
tight dependence between techtree and freeciv, such that would
typically have to use specific versions with each other.

Another appealing option would be to decouple the ruleset-specific
information handling from the "graph generation" parts of techtree.
Eg, a "preprocessor" which reads and parses ruleset files, and 
outputs a single easy-to-parse file of the tech nodes, their
connections, and the text information which goes with them.
Of course the issue of parsing/reading rulesets is then just 
pushed to the preprocessor, but a fun (not necessarily practical)
idea might be to try to do this part in, eg, perl...

Or maybe I'll wait until the buildings.ruleset generalization
is finished... :-}

-- David





[Prev in Thread] Current Thread [Next in Thread]