Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2000:
[Freeciv-Dev] Re: [patch] make sure that the happiness of a city shown i
Home

[Freeciv-Dev] Re: [patch] make sure that the happiness of a city shown i

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [patch] make sure that the happiness of a city shown in the client is current
From: Thue Janus Kristensen <thue@xxxxxxx>
Date: Wed, 12 Apr 2000 11:23:38 +0200

> > I assume the extra server CPU time will not matter much
> > _during_ a turn (since players won't be able to move units 
> > fast enough to cause problems), but will this leed to longer
> > time when the AI is moving units etc?  (That is, there are
> > quite a few calculations to recalc the full unhappiness, I
> > think.)  That wouldn't be so nice :-(
> 
> You could argue that the ai should also have updated information
> available (and I do). But the extra calculations isn't so bad,
> considering it is basically only done when a unit enters or leaves a
> city. And with a little extra programming it should be possible to only
> update when it in fact causes a change. Or perhaps make a new function
> that only updates the happyness But I think the benefits allready
> outweights the extra CPU for this patch.
> 
> -Thue

Or as the basic rules of computer science says: it doesn't matter how
fast it is if it isn't correct. This fixes a (pretty bad) bug and does not
have to be restructured to be optimized later.

-Thue
(sorry for replying to myself)



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