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: David Pfitzner <dwp@xxxxxxxxxxxxxx>, 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:13:02 +0200

On Wed, 12 Apr 2000, David Pfitzner wrote:
> Thue Janus Kristensen <thue@xxxxxxx> wrote:
> 
> > To see what I am talking about: take a city under republic, without
> > police station. Build 2 attack units. move them out of the city in one
> > turn. Now they should cause disorder in the city, but you don't see any
> > change. You first see it when the city is updated between turns.
> 
> Right.  I've developed the habit of opening the city and 
> converting a worker to elvis and back, to refresh the city 
> and see if it is still happy.  (Or refresh all cities before
> end-of-turn to see if any have become unhappy.)  But having
> the display kept up-to-date would be ever nicer ;-)
> 
> 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



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