[Freeciv-Dev] Re: (PR#725) Production upgrade of newly-researched units
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Jan 17, 2003 at 11:05:55AM -0800, Jason Short via RT wrote:
> This patch looks good (although it doesn't fix PR#725, naturally). I
> now see that the populate_city and city_build_stuff updates are not
> atomic - they should be split into two steps, as Thomas has done.
>
> Doing that allows us to reorder the updates with a lot of flexibility.
> Combining Pille's ideas with my original patch gives me a new patch with
> the updates all reordered. This should solve both the settlers bug and
> the upgrade bug without introducing any new problems that I can see.
>
> The basic idea is that the order should be:
>
> * Count up all resources for this turn (trade, food, shields).
> * Update science for the civilization.
> * Update the city populations (based on granary size).
> * Update the city productions (upgrades & finished production).
> * Update the city morale (rapture & disorder).
> * Do misc. updates.
>
> although this differs slightly in the code (as explained in comments).
>
> I think the most important thing we need to do is make sure to comment
> all the dependencies in the ordering. It's quite possible there are
> still some we've missed - but we don't want to have to figure it out
> from scratch every time this code is changed.
We need to first define what order we want. It has to be
documented. Your enumeration above is a good start.
The card game "Magic: The gathering" has a rather complex (compared to
a normal non-computer game) rules. It consists of 5 phases and some of
them have under-phases (called steps). However they have a nice
overview for beginners
(http://www.wizards.com/magic/advanced/7e/7e_rulebook_en.zip, page
21-23) and also a more formal definition for advanced players
(http://www.crystalkeep.com/magic/rules/sixth/magic-rules-021007.pdf,
page 16-20). I would like to see some similar for the freeciv
turn-done. Also note that the second document explained quite good the
timing constrains such as "Then, simultaneously,".
IMHO can we only start with the implementation after we have such a
document.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
Microsoft does have a year 2000 problem. I'm part of it. I'm running Linux.
|
|