[Freeciv-Dev] Re: (PR#2521) general effects framework
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Dec 09, 2002 at 09:26:11AM -0800, Raimar Falke via RT wrote:
> On Mon, Dec 09, 2002 at 08:24:30AM -0800, Mike Kaufman via RT wrote:
> So there are non-immediate effects (persistent) which stay and effect
> other objects. And there are immediate effects which are one-shot and
> get removed immediately.
A point of comparison: impr-gen has no notion of immediate effects. They
stay for as long as the improvement exists, just like ordinary effects;
it's just that they are only iterated over when the improvement is
constructed. Personally, I think Mike's implementation sounds better in
this regard though.
> > If EFR_NONE is used, then the effect is not added to any lists. This is
> > needed (I think) for equiv_range not for effects.
> Can you explain it more?
I'd be interested to hear this too. ;)
> Isn't it possible to design something like this:
> effect A depends that no effect B is active
> effect B depends on A
As far as I can see, no, because there is no "not cond_eff" so you can't
construct effect A.
> > To put this in perspective, city_updates _will_ take longer since we have
> > to iterate through an undetermined number of effects to determine
> > trade/science/happiness/etc bonuses. The looping will have some overhead,
> > but for the default ruleset, we'll be adding just the same number of
> > bonuses (and the nice part is that all the bonuses (?) will be in the same
> > place --- the effects lists).
> It is possible that Ben's implementation was faster here because it
> cached the per city bonuses? I can remember Ben wrote this.
The city bonuses are cached every time you update the effects. But this
cuts down on the number of effect iterations required, not the number of
effect updates, just to make this clear. I'd be surprised if this wasn't
a _lot_ faster, since you want to calculate city bonuses far more
frequently than you update effects. The evaluation of the bonuses
themselves should actually be faster with impr-gen than with current
CVS, in fact, since you're not having to check for the existence of
a load of improvements, but I doubt the difference is measurable! This
does of course come at the expense of memory, though.
Ben
--
ben@xxxxxxxxxxxxxxxxxxxxxx http://bellatrix.pcl.ox.ac.uk/~ben/
"And you'll never gain weight from a doughnut hole"
- [Freeciv-Dev] (PR#2521) general effects framework, Mike Kaufman via RT, 2002/12/08
- Message not available
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Raimar Falke via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Ben Webb via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Raimar Falke via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework,
Ben Webb via RT <=
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Raimar Falke via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Raimar Falke via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman via RT, 2002/12/09
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Raimar Falke via RT, 2002/12/10
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Mike Kaufman via RT, 2002/12/10
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Raimar Falke via RT, 2002/12/11
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Ross W. Wetmore, 2002/12/11
- [Freeciv-Dev] Re: (PR#2521) general effects framework, Ross W. Wetmore, 2002/12/11
|
|