Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2001:
[Freeciv-Dev] Re: cityname patch
Home

[Freeciv-Dev] Re: cityname patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: cityname patch
From: Erik Sigra <sigra@xxxxxxx>
Date: Sat, 24 Feb 2001 20:10:31 +0100
Reply-to: sigra@xxxxxxx

torsdagen den 22 februari 2001 23:03 skrev Vasco Alexandre Da Silva Costa:
> Well i've had a really hard time with this patch.  The Lisp parser is
> particularly obscure.  I haven't even understood what grammar it's
> parsing! :-)

It has only been 19 hours from you said you were going to "butcher" the patch 
until you kinda give it up. And you probably didn't even spend all 19 hours 
nonstop. This thing is complex and requires a litte more patience.

It will be easier when Stan has added the comments he promised to add. And 
that will probably be any day now, since he has returned from Antarctica. 
Maybe you could even hint him about what to comment.

> From the author's comments i guess he didn't mean it to be used for
> purposes other than XConq so i guess we'll have to do this in a different
> way.

We don't "have to do this in a different way" if the author says that. Its 
GPL! We only have to consider technical reasons. The fact that the patch 
actually works seems like a darn good technical reason to me. Besides, I 
didn't get the impression that the author has something against that code 
is used outside Xconq. He just didn't believe it would happen.

> IMO we should start thinking of this in a different way.  I know people
> have wanted scripting in Freeciv for some time so we probably should
> decide what kind of language we're going to use.  But i guess it's kind of
> overkill to add a Lisp parser just for cityname generation.

If adding a Lisp parser gives really good and flexible cityname generation, I 
definitely think it's worth it. We should not be counting every byte and bit 
of RAM too carefully. Have you actually checked if the patch really makes 
civserver use more memory? Maybe it even uses less, because it doesn't have 
to read in all thoose city names for every nation that is not going to be 
used.

Then I can think of many more uses for GDL (Game Design Language) in Freeciv. 
Take for example the tables for how things interact with each other. The 
damage table is much more flexible than the Freeciv rulesets. You can define 
how much damage every unit type should cause when hitting every unit type. 
You can specify the hit chance for every unit type against every unit type. 
Instead of hardcoding a flag "mounted" and add it to every unit in a ruleset 
file, you can define such a thing in GDL:

(define mounted (cavalry dragoons elephants horsemen knights))

Then there seems to be a start-with table. Adding something like this:
(add settlers start-with 2)
(add explorers start-with 1)
to a game definition file would give the normal Freeciv behaviour. A player 
could then do something like:
(add settlers start-with 0)
(add explorers start-with 48)
(add howitzer start-with 24)
on the server command line before he starts the game. [*] This is obviously 
not possible with the current server options.

If you need more reasons to justify adding a Lisp parser to Freeciv, read the 
manual at <http://sources.redhat.com/xconq/manual/xcdesign_toc.html>. You 
will plenty.

[*] Or use the shorter syntax:
(add (settlers explorers howitzer) start-with (0 48 24))



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