Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] [Update] Corecleanup_13 uploadeded to incoming
Home

[Freeciv-Dev] [Update] Corecleanup_13 uploadeded to incoming

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [Update] Corecleanup_13 uploadeded to incoming
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sun, 14 Apr 2002 14:49:44 -0400

                                                                  2002/04/13

                         ReadMe for Corecleanup13 

The corecleanup devpath is an experimental playground for new features
and bugfixes which have not yet been accepted into CVS. It has been
tracking CVS for over 9 months and the divergence is approaching 1Mb
in diff size (i.e. about half the size of the bool and iterator changes
that went into CVS in Feb and Mar).

This is an update of corecleanup12-cvs-Jan19 to cvs-Apr11 plus a number
of bugfixes and updates to the AI movement and resource handling.

Included in the corecleanups besides robustness and standardization fixes 
are features such as multiple topologies, improved map generation, the 
river estuary movement patch, dynamic warmap and AI updates,

Sample features
1)  Support play on standard and iso maps with all 4 wrapping conditions
    (Flat-Earth, Standard (E-W wrap), Neptune (N-S wrap), Donut World).
2)  Geographically sensible maps which support all topologies and
    generators. Includes extensive internal waterways (rivers and seas)
3)  Allow sea movement into river estuaries - allows for Norse-like 
    invasions before marines in additiona to Seaway access to inland
    waterways.
4)  Find a beachhead. Fix the search dist value so there is room to land.
5)  Unit health code and return-home-to-heal in ai_military/aiunit.c
6)  Homeland defence and urgency rework in advmilitary.c
7)  Homeland defence and low priority simple unit quotas in advdomestic.c.
8)  Reworked want calculations including bonus want for current tasks
    to prevent flip-flops.
9)  General touchups to code all through the above area (including boolish
    fixes of <blort> != 0 <blort> -> > 0 where appropriate).
10) Settler.c eval* changes including update and correct use of the routines
    in (e.g. can_settler_do_activity) common/unit.c
11) Settler founding site selection changes to remove/reduce smallpox biases.
12) Revised code flow and parameterization of improvements want calcs
    in advdomestic.c
13) GB's dynamic warmap subsystem
14) improved manage_explorer and manage_ferryboat
15) minor tweaks to enable attacks on undefended cities
16) set_activity() priorities and multi-turn memory (e.g. so a settler
    can be told go forth and plant thyself and it doesn't then ask the
    question "huh? what do I do here?" at goto destination point.
17) General changes to ACTIVITY_IDLE that for example keeps waking up
    FORTIFIED city defenders so they never get fully defended.
18) LOG_DEBUG format cleanups throughout the AI area to structure the
    output for easier comprehension (e.g. fixed width formats vs the
    packed flavour so common in both this and displays like city_dialog).
19) Waste in aicity.c (but there is a whole GUI part that needs doing).
20) various and sundry one liners like
    the expand personality tweak in server/srv_main.c:
      pplayer->ai.expand +=
        (myrand(pplayer->ai.expand)-myrand(pplayer-ai.expand))/5;
    Savegame at start end end in savegame.c. 
    srv_main.c:
      if(game.is_new_game) {
        init_new_game();
        save_game_auto();
      }
        ...
      gamelog(GAMELOG_NORMAL, "The game is over!");
      save_game_auto();

Testing

This has undergone several days of client and server autogames plus
manual play. There are underlying instabilities in the CVS base code
including a number of assert conditions when compiled in DEBUG mode,
but it is generally usable and playable.

Enjoy,
RossW
=====


This patch updates the corecleanup sets of changes to Apr 11, 2002,
i.e. it merges CVS changes to that point and should be applied to
the freeciv-cvs-Apr-11 snapshot.


Subject:  [Update] Corecleanup_13 patch
Date:     Apr 13, 2002
Author:   Ross Wetmore
Status:   Tested, fully functional and playable 
State:    Development snapshot

Description
  This patch upgrades the corecleanup patch set to CVS-Apr-11, plus
recent AI movement and resource handling fixes. It features improved
map handling, core and GUI coordinate handling for multiple wrap map 
topologies for both standarad and native isometric maps, plus various
updates to the core AI processing.

Dependencies
  none

Recommended Use
  Apply the patch to a clean Apr 11 CVS snapshot in an alternate build
location. `sh configure` and `make` to build. Run either server autogame
or autogame with one or more client observers to get a feel for the
system changes. Compare code with current CVS using side-by-side editors
or side-by-side diff program (that ignores whitespace if possible). 

Components
    779    4754  214192 corecleanup13-cvs-Apr11.dif.gz
    177     725    6483 corecleanup13.ReadMe

Files Changed:

freeciv/ai/advdomestic.c
freeciv/ai/advmilitary.c
freeciv/ai/aicity.c
freeciv/ai/aihand.c
freeciv/ai/aitech.c
freeciv/ai/aitools.c
freeciv/ai/aitools.h
freeciv/ai/aiunit.c
freeciv/client/agents/cma_core.c
freeciv/client/citydlg_common.c
freeciv/client/citydlg_common.h
freeciv/client/climisc.c
freeciv/client/control.c
freeciv/client/goto.c
freeciv/client/gui-gtk/citydlg.c
freeciv/client/gui-gtk/mapctrl.c
freeciv/client/gui-gtk/mapview.c
freeciv/client/gui-gtk/mapview.h
freeciv/client/gui-mui/graphics.c
freeciv/client/gui-mui/mapclass.c
freeciv/client/gui-mui/mapview.c
freeciv/client/gui-mui/overviewclass.c
freeciv/client/gui-win32/citydlg.c
freeciv/client/gui-win32/mapview.c
freeciv/client/gui-xaw/citydlg.c
freeciv/client/gui-xaw/mapctrl.c
freeciv/client/gui-xaw/mapview.c
freeciv/client/mapview_common.c
freeciv/client/mapview_common.h
freeciv/client/packhand.c
freeciv/client/tilespec.c
freeciv/client/tilespec.h
freeciv/common/city.c
freeciv/common/city.h
freeciv/common/game.c
freeciv/common/improvement.c
freeciv/common/map.c
freeciv/common/map.h
freeciv/common/packets.c
freeciv/common/player.c
freeciv/common/shared.h
freeciv/common/unit.c
freeciv/common/unit.h
freeciv/common/unittype.c
freeciv/common/unittype.h
freeciv/server/autoattack.c
freeciv/server/barbarian.c
freeciv/server/citytools.c
freeciv/server/cityturn.c
freeciv/server/gamehand.c
freeciv/server/gamelog.c
freeciv/server/gotohand.c
freeciv/server/gotohand.h
freeciv/server/mapgen.c
freeciv/server/mapgen.h
freeciv/server/maphand.c
freeciv/server/maphand.h
freeciv/server/plrhand.c
freeciv/server/sanitycheck.c
freeciv/server/savegame.c
freeciv/server/settlers.c
freeciv/server/srv_main.c
freeciv/server/stdinhand.c
freeciv/server/unithand.c
freeciv/server/unithand.h
freeciv/server/unittools.c


At 10:08 PM 02/01/20 -0500, Ross W. Wetmore wrote:
>                                                                  2002/01/20
>
>                         ReadMe for Corecleanup12 
>
>This is primarily an update of corecleanup11 to CVS-Jan19. There are a
>number of bugfixes and updates to the map generation for mapgenerator2-4
>plus the separate poles handling. It is also synced with the mapcleanup
>and citycleanup patches in the CVS queue.
>
>
>General Caveats
>
>While in many cases the code is cleaner and more general than the 
>generalized topology patch, the main goal of these changes was to complete 
>the client changes necessary to handle the standard and isometric wrapped 
>topology sets in the GUI-GTK case (which is complex enough, thank you :-).
>
>This should provide useful review discussion and a base for extending
>this to other windowing systems or more generalized topologies when this
>is required. In the meantime this provides a workable and useful Freeciv
>playing environment for all current needs, as well as some improvments 
>in documentation and algorithmic guidelines in code comments.
>
>Included in the corecleanups besides robustness and standardization fixes 
>are features such as multiple topologies, improved map generation, the 
>river estuary movement patch, warmap and AI updates,
>
>
>Native Isometric Maps
>
>Native rectangular isometric maps with X and/or Y wrap topologies viewable
>in trident (aka standard) or isometric GUI windows are possible with the
>corecleanup_11-Dec27 patch to CVS. There are thus 8 topologies in two views
>for 16 different flavours.
>
>A key concept is the introduction of "native" coordinates. Present gaming 
>coordinates use a standard map representation in which local operations 
>such as adjacent iteration and distance computations are both convenient 
>and hardcoded into Freeciv. Native isometric maps produce pi/4 rotated 
>isometric rectangles and other topologies produce similar odd shapes which 
>are not particularly intuitive or easy to work with in standard coordinates. 
>For example, global operations such as whole_map_iterate, savegame, or debug 
>printouts are more conveniently handled in a "native" 2-D rectangular
format. 
>Iterating in native coordinates avoids the need for complex loop conditions
>or grossly inefficient bounding box hacks to cover the iteration set. It
>also simplifies normalization in wrapping topologies.
>
>It should be noted, that for the forseeable future the Freeciv map is 2-D.
>Wrapping operations and global views are easiest to manage in a rectangular
>format composed of lines and rows. This is even true for "filtered" 
>topologies like ellipses, as there is still an underlying rectangular set
>of points, some of which are real and some unreal depending on the filter
>mask overlayed on this base representation.
>
>It is also the case that a strict native representation may not be the most
>economical format for storage or other purposes. For native isometric the
>strict native grid only occupies every other point, i.e. all points lie on
>a diagonal grid thus have indicies that are either all odd or all even. 
>Compressed native is a format in which the x-axis is compressed by a factor 
>of two. Uncompressing means doubling this value and adding the lowest y bit 
>(for even diagonal grid), or complement y bit (for odd diagonal grid).
>
>Thus all storage and global operations in corecleanup_11 are updated to use 
>or loop over compressed even native coordinates with transformation to 
>"standard" format where required.
>
>In addition, GUI views and native or game coordinate calculations are 
>completely separated and layered with conversion routines to move back and
>forth. In addition to simplifying the logic in various complex nested
>transformations this also means it is much easier to add a new GUI view
>or mix and match GUI views/perspectives with different underlying map
>topologies.
>
>As a final, point, "native" isometric is really just a specific case of
>pi/4 rotated topologies. Most of the native changes are suitable for use
>in other cases in the same way the standard set can be used for those
>that are "aligned" with the standard internal game coordinates.
>
>
>Key Features or changes
>
>Overview map
>
>The rectangular overview map has been converted to use native coordinates.
>If X-wrapping is present in the underlying map, the window will adjust to
>centre the view-rectangle representing the GUI window. While Y-wrap could
>also be used in the appropriate cases, this is not done as there is then 
>effectively no orientation cues in the overview. This can be changed.
>
>For code convenience, isometric is displayed in compressed native in the 
>overview. This is not really distinguishable from an expanded version,
>even though a fine eye might notice that the 2x2 pixel points were off
>slightly on every other row. 
>
>There is also no limit to overview scrolling in wrapped coordinates. One
>can effectively orbit in a given wrapped direction ad nauseum.
>
>GUI views
>
>There is a black-tile border around all GUI views, though in some cases
>it will be completely clipped by the canvas edges. In part this is to 
>allow for an EXTRA_BOTTOM_ROW (and actually righthand column) where 
>scrollbars eclipse some of the tiles. 
>
>It is also the case that iso-tiles do not have rectangular edges. Thus
>a little extra is required to manage the serrated effect, and fact that
>some sprites extend beyond the top of their tile. 
>
>In the worst case, where the tileset and the native map are not aligned,
>it is necessary to have the GUI window project into the black rather than
>just touch the edge tile, so that tiles along the edge can be viewed. In
>the corners this can become a problem. Should your current viewing window
>not allow you to see a corner tile, shrink its dimensions slightly so 
>that the diagonal edge is smaller and fits further into the corner space.
>
>Map generation
>
>Map generation can be set to produce standard or isometric maps. Trident
>tilesets are best used for viewing standard maps, as the "native" and
>GUI axes are aligned. Similarly, isometric tilesets are best used for
>isometric maps for the same reasons. 
>
>It is however possible to view either map shape in the alternate tileset
>which will cause the "N" direction to be rotated 45 degrees to lie along 
>a diagonal axis.
>
>Some additional cleanups have been added to the starting position selection
>to attempt to reduce the number of cases where insufficient starting points
>are found that match various "fairness" conditions. In particular, it is
>now more likely that starting positions will span more than one large 
>continent when there are two or more of roughly the same size, although
>not enough to put every player on a separate private continent with equal
>goodie richness.
>
>Polar continents and Polar Passages
>
>There is a control variable "separatepoles" which can be set prior to map
>generation which will cause standard Civ polar continents and a polar E-W
>passage to be created during map generation. The default is to do this.
>There are slight additions to Karen's version. For example, there is no
>icewall across the entire top/bottom of the map when this is turned off.
>
>Especially in Y-wrapped (including Torus) maps, it is usually desirable 
>to not produce a continental icewall across the map, but rather to let 
>the continents fall where they may. This can produce polar islands which 
>are split across the top and bottom of the map, but still permit ocean 
>passage in these directions as well.
>
>Note, without the forced icewall, Freeciv maps are quite temperate in
>composition :-).
>
>Civworld
>
>A compatible version of civworld is available. It is not extensively
>debugged, but was mostly used for map viewing in all the various flavours.
>For compatible updates to civworld, contact rwetmore@xxxxxxxxxxxx.
>
>Performance
>
>There is some slowdown, which is much more noticable in Torus-World
>maps. However, the corecleanup server is still faster than CVS in most
>cases. Partly this is due to more extensive use of macros for the key
>map functions (see map.h). Only unnormalize is typically called in its
>functional form, though these forms exist for all in map.c
>
>Testing
>
>This has undergone several days of final continuous server autogames in 
>all map flavours in addition to debug testing of feature functionality.
>Several days overall have been spent in client autogame testing with
>multiple windows running simultaneously showing different factions and 
>views. Several partial games have been played as well. While heavily
>laced with asserts, none appear to be triggered by any of the test runs
>at this point.
>
>Enjoy,
>RossW
>=====
>
>
>This patch updates the corecleanup sets of changes to Jan 19, 2002,
>i.e. it merges CVS changes to that point and should be applied to
>the freeciv-cvs-Jan-19 snapshot.
>
>
>Subject:  [Update] Corecleanup_12 patch
>Date:     Jan 20, 2002
>Author:   Ross Wetmore
>Status:   Tested, fully functional and playable 
>State:    Development snapshot
>
>Description
>  This patch upgrades the corecleanup patch set to CVS-Jan-19, plus
>completes core and GUI coordinate handling for multiple wrap map topologies
>for both standarad and native isometric maps.
>
>Dependencies
>  none
>
>Recommended Use
>  Apply the patch to a clean Jan 19 CVS snapshot in an alternate build
>location. `sh configure` and `make` to build. Run either server autogame
>or autogame with one or more client observers to get a feel for the
>system changes. Compare code with current CVS using side-by-side editors
>or side-by-side diff program (that ignores whitespace if possible). 
>
>Examine client/{citydlg_common.c,mapview_common.c,gui-gtk/mapview.c}
>for update_canvas, and map_to_canvas_pos() or canvas_to_map_pos()
>coordinate handling algorithms, plus common/{map.c, map.h) for native
>coordinate handling.
>
>Files Changed:
>
>freeciv/ai/advdomestic.c
>freeciv/ai/advmilitary.c
>freeciv/ai/aicity.c
>freeciv/ai/aihand.c
>freeciv/ai/aitech.c
>freeciv/ai/aitools.c
>freeciv/ai/aitools.h
>freeciv/ai/aiunit.c
>freeciv/client/citydlg_common.c
>freeciv/client/citydlg_common.h
>freeciv/client/climisc.c
>freeciv/client/control.c
>freeciv/client/goto.c
>freeciv/client/gui-gtk/citydlg.c
>freeciv/client/gui-gtk/mapctrl.c
>freeciv/client/gui-gtk/mapview.c
>freeciv/client/gui-gtk/mapview.h
>freeciv/client/gui-mui/graphics.c
>freeciv/client/gui-mui/mapclass.c
>freeciv/client/gui-mui/mapview.c
>freeciv/client/gui-mui/overviewclass.c
>freeciv/client/gui-win32/citydlg.c
>freeciv/client/gui-win32/mapview.c
>freeciv/client/gui-xaw/citydlg.c
>freeciv/client/gui-xaw/mapctrl.c
>freeciv/client/gui-xaw/mapview.c
>freeciv/client/mapview_common.c
>freeciv/client/mapview_common.h
>freeciv/client/packhand.c
>freeciv/client/tilespec.c
>freeciv/client/tilespec.h
>freeciv/common/city.c
>freeciv/common/city.h
>freeciv/common/game.c
>freeciv/common/improvement.c
>freeciv/common/map.c
>freeciv/common/map.h
>freeciv/common/packets.c
>freeciv/common/player.c
>freeciv/common/shared.h
>freeciv/common/tech.c
>freeciv/common/unit.c
>freeciv/common/unit.h
>freeciv/common/unittype.c
>freeciv/server/autoattack.c
>freeciv/server/citytools.c
>freeciv/server/cityturn.c
>freeciv/server/gamehand.c
>freeciv/server/gamelog.c
>freeciv/server/gotohand.c
>freeciv/server/gotohand.h
>freeciv/server/mapgen.c
>freeciv/server/mapgen.h
>freeciv/server/maphand.c
>freeciv/server/maphand.h
>freeciv/server/plrhand.c
>freeciv/server/ruleset.c
>freeciv/server/sanitycheck.c
>freeciv/server/savegame.c
>freeciv/server/settlers.c
>freeciv/server/srv_main.c
>freeciv/server/stdinhand.c
>freeciv/server/unithand.c
>freeciv/server/unithand.h
>freeciv/server/unittools.c
>




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