Summary: Problems in Problems in server/generator/mapgen.c:
part 2, size limits in make_island().
                 Project: Freeciv
            Submitted by: mss_8734
            Submitted on: Fri May 17 17:59:26 2013
                Category: general
                Severity: 2 - Minor
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 2.6
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 



Problem 2>
On lines 2197 - 2200 we have:
    if (islemass > lastplaced + 1 + lastplaced / 50) {
      /* don't create big isles we can't place */
      islemass = lastplaced + 1 + lastplaced / 50;

First, it seems odd to just assume an increase > 2% would always fail,
regardless of available map space and landmass. For small islands even an
attempted increment by 2 will be thwarted by this; attempting to create
several islands with a random size in even such a small range as [2,10] will
be seriously affected.
  Second, this check is then followed by tests against the map size and size
<= 0, but not against available landmass. This looks particularly odd.
  Third, the function keeps decreasing the size until an island can be created
or it reaches a lower limit supplied by the caller, which seems to make at
least some of the above tests seem redundant.
  Last and quite possibly least, I think this ought to be mentioned in the
function summary; currently it only says one has to ‘create big islands
first’, which would be logical even without the 2% hard limit.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to