Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2003:
[Freeciv-Dev] Re: (PR#5122) Building requirement for techs
Home

[Freeciv-Dev] Re: (PR#5122) Building requirement for techs

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: remi.bonnet@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#5122) Building requirement for techs
From: "Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx>
Date: Mon, 18 Aug 2003 15:00:19 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Per I. Mathisen wrote:

>On Sun, 17 Aug 2003, Marko Lindqvist wrote:
>  
>
>> You might want to look at my req_gen (requirement generalization)
>>patches. They implement this and much more. Only problem is that they
>>are very old. I'm considering updating them. In the meantime those old
>>versions can be found from
>>ftp://ftp.freeciv.org/freeciv/contrib/development/misc/.
>>    
>>
>
>How much customizability do we really need? As a general rule, when we
>make the game more customizable we lose both speed and AI capability to
>understand the rules. Unless we add complete server scripting, and we have
>already ruled that out, Freeciv will remain a Civ-like game, and then any
>further customizability beyond gen effects and what we already have will
>have marginally diminishing utility.
>
 First, it's worth noting that reqgen patches were originally written at 
summer 2000 and freeciv have changed a lot since. Most important goal 
was to make it possible to add buildings as requirements for units, 
which is since implemented to freeciv diferent way. Second reason was 
limiting Fanatics unit to Fundamentalism only at civ2 ruleset and this 
also is since implemented. I just wanted to implement these behind one 
general interface and to gain some extra flexibility for ruleset format 
as a bonus. Of course, once I had written couple of patches implementing 
basic interface, I continued to extend the idea. That's why I split 
patches the way I did. You can take as much of it (from the beginning) 
as you like and no more.
 If we are not going to add new requirement types for 
units/buildings/techs/etc, we are probably better forgetting reqgen 
altogether. If we are going to add some new requirement types, it might 
be worth considering putting them behind such a common interface instead 
of implementing each requirement type for each of 
units/buildings/techs/etc separately.

>I think I would put my foot down for the 'or' part of the req_gen patches,
>at least. As to the rest, I only looked at it quickly, but the code looks
>
 IIRC (I have not looked reqgen code since Jan -01 myself at all), rest 
of  'or', 'not' and 'and' were almost trivial to impolement once there 
was support for one of them. Without any of them code could be made much 
less complex, but this would require quite total rewrite (even very 
frist patch makes things such a way that it's easier for later patches 
to add 'not', 'or' and 'and' support.)

>pretty complex, and as I said above, I am worried what this would do to
>speed and the AI. Put my concern about those two areas at rest, and I have
>no further objections.
>
 For rules 'we can already have with current ruleset format' slowdown 
was quite acceptable, though I don't remember exactly how much. Of 
course, what I consider as acceptable is not necessarily acceptable for 
someone else. Only way to really know how much slower reqgen would be 
than current design, is to update it against current codebase and test. 
With new kind of rules one can implement only by using reqgen, game can 
get rather slow.
 For rules 'we can already have with current ruleset format' AI behavior 
was unchanged. I used quite a lot time to run autogames with different 
rulesets to make sure that this was true. It is definitely possible to 
lose AI by making rules that use reqgen provided possibilities, but I'm 
sure AI can't handle too well some rules possible with current ruleset 
format either.
 It should be relatively easy to add some reqgen support to AI (can't 
remember what I already implemented). In fact, I found out that it's 
harder to make reqgen support for help system than it is to tech AI some 
reqgen basics. It gets rather complicated when one tries to make good 
looking interfaces with so many independently changing factors (how to 
display that unit requires two different buildings and either republic 
or democracy as government)


 Anyway, it would be quite a big job to update those patches and, since 
buildings can already be requirements for units, quite pointless too. 
Only if we found some consensus that new requirement types should be 
added to game and that we need common interface for requirement 
handling, I will look into updating this code. Otherwise my time is 
probably better used somewhere elese.


 - Caz






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