[CF-Devel] Random map problems

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Mon Mar 3 02:14:23 CST 2003


Preston Crow wrote:
 > Two issues with random maps.
 >
 > First, I've noticed that recently when going through a series of maps,
 > they're almost all the same style.  A day or two ago on Metalforge, I went
 > through /random/gorokh# and level after level was a spiral into the center.
 > There were slight variations, but often even a latter to a special level was
 > in the same place.  Today, I had a similar situation, only it was a blocky
 > spiral or rectangular rooms.

this should now be fixed.  The fact that the random seed was being preserved was
the problem - some aspects of the map, like the style, are determined very early
on in the map process, and given the same random seed, the same style would
always be chosen.

  Before I modified the code, I think think the random seed was even preserved,
adn rather it just took current time each time for random seed.  However, there
was also code that when it stored the random seed in the buffer, it stored it as
seed + 1 - that is enough to get very different maps, and I put that back in. I
'll just have to remember that if there are more disconnected maps, to decrement
the random seed that is displayed by one to really get the same map out.


 >
 > Second, I ran into another disconnected map:

  Ok - I was able to reproduce it with those parameters.

  IT appears that the problem is taht if the layout is a square spiral, that
layout only works if the map is a mininmum size (that may seem odd given the
map, but that is because the map was doubled after the original layout was
done).  the square spiral basically starts as a 2 layer onion - however, if the
map is too small, the inner layer touches the outer layer, and thus where it
wants to put a door, it can't.


  This I think is now fixed by just saying minimum map size is 10x10.  The min
map size is non optimal - it basically does a min map size for any random map, 
and it could be much more refined (eg, if this layout, min map size is 10x10, if 
this layout, min size is 7x7, or whatever) - I think this bug may have been 
introduced to fix the treasure level problems where you'd periodically get 
massive treasure levels.



_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list