Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Ruleset Development - improvements
Home

[Freeciv-Dev] Re: Ruleset Development - improvements

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andrew Sutton <ansutton@xxxxxxx>
Cc: Petr Baudis <pasky@xxxxxxxxxxx>, <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Ruleset Development - improvements
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 Dec 2001 21:35:23 +0000 (GMT)

On Tue, 4 Dec 2001, Andrew Sutton wrote:

> i'm not suggesting anything, i'm just trying to clarify it for my own benefit 
> (or maybe somebody elses).
> 
> for a general improvement framework, it seems like there's a couple different 
> things that should be taken into account.
>       1) actual effect
>       2) uniqueness
>       3) obsoletion effect
>       4) redundancy effect

Take a look at 
http://www.freeciv.org/lxr/source/data/default/buildings.ruleset

        The current impr-gen ruleset is explained in the header; the 
fields "effect", "equiv_range", "obsolete_by" and "equiv_repl/equiv_dupl", 
respectively, seem to roughly match your four points.

> something interesting to consider: each of these buildings adds an effect to 
> a city, civ, continent, world. anyway, i don't know if the current 
> implementation does this, but it might be worthwhile to consider 
> encapsulating these effects in some code structure and maintaining the within 
> the relative structures they affect. for example, a city's just a city. 
> however, it has current effects on it (granary, etc.). each affect can resond 
> to certain input from game. a city grows - the granary cuts the food 
> depletion in half.

        The current impr-gen patch maintains lists of active effects for 
each city, player, island and the game as a whole, and defines a 
Freeciv-style iterator for accessing them. The effects don't currently 
have attached methods or anything even vaguely OO though, as this doesn't 
really fit with current Freeciv code.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"I don't like it, and I'm sorry I ever had anything to do with it."
        - Erwin Schrodinger talking about quantum mechanics



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