Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] (PR#725) Order of end/new-turn activities
Home

[Freeciv-Dev] (PR#725) Order of end/new-turn activities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ChrisK@xxxxxxxx
Subject: [Freeciv-Dev] (PR#725) Order of end/new-turn activities
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 2 Jul 2003 15:17:40 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[rfalke - Wed Mar 26 14:03:11 2003]:

> We won't need such a long list like the URL above. Lets try to start
> one:
>  1) unit actions (goto, pillage,...)
>  2) revolution update (choose preselected government)
>  3) city refreshing (this is an internal step)
>  4) city production1 (adding the food, shield surplus to the stocks)
>  5) update city size from food stock (increase, decrease)
>  6) tech update1 (science of all cities to the player's pool, new tech)
>  7) great library
>  8) gold update (gold of all cities to the player's pool)
>  9) city upkeep (pay buildings, sell ones when not enough resources)
> 10) unit upkeep (pay units, destroy ones when not enough resources)
> 11) city production2 (build new units, buildings)
> 12) city refreshing (this is an internal step)
> 13) rapture grow
> 14) leonardo
> 15) refuel planes
> 17) destroy out of fuel planes
> 18) heal units
> 19) decrease helicopter hp
> 20) destroy trireme
> 21) refresh the movements points of the units
> ...
> 97) reset values in units (moved, paradropped,...)
> 98) reset values in cities (did_sell,...)
> 99) save some values in the changed_from fields (city production and
> player research)
> 
> Uhhh it did got longer than I expected. And it is possible that this
> list will double its size.
> 
> The is only the core phase. Other actions are game related but not
> player related:
>  - handle pollution and fallout
>  - summon barbarians
>  - spaceship traveling
>  - check for end conditions
>  - update diplomacy reputation values
> 
> In addition to these are the non-game related technical actions:
>  - inform client about new state
>  - save game
> 
> This list is by no means complete and also doesn't reflect the current
> behavior.
> 
> > Is making it a true turn based game a priority then? As i understand
> > it, making it one would eliminate a variety of problems...
> 
> Formalizing the new-turn activities is a priority. Removing/disabling
> the real time aspects during a turn isn't afaik.

I mentioned earlier in this discussion that there are different types of
dependencies in the end-of-turn actions.  I'd like to add that since
inter-civilization dependencies are definitely possible (even without
gen-impr the obsoletion of wonders is such a dependency) I think rather
than doing all events in order for each civilization, we should do all
events in strict order.

You've given a pretty full list of events.  But I hope we may be able to
divide these up into categories so that each category has no conflicting
dependencies.  The order could then be something like:

* Pre-turn events
  - savegame
  - gameover check
* Game events
  - pollution
  - fallout
  - barbarians
  - spaceships (?)
  - reputation
* City update
  - city stock (food+production)
  - rapture update
  - city growth (rapture/granary check)
* Tech update
  - research addition
  - great library check, etc
* Upkeep update
  - tax income
  - "potential gold" calculation
  - improvement upkeep (up to potential gold amount)
  - unit upkeep (up to potential gold amount)
  - building sales (as needed)
* Production update
  - Upgrade production
  - Build units/buildings
* Unit update
  - Leonardo
  - Heal units
  - Away-from-base checks:
    - Destroy out-of-fuel planes
    - Decrease helicopter HP
    - Destroy trireme
* Reset events:
  - Reset movement points
  - Refuel planes
  - Reset unit flags (moved, paradropped, ...)
  - Reset city flags (did_sell, ...)
  - Reset city values (city production)
  - Reset research values

However this is not a rigorous list.

jason



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