Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: Advice requested on implementation of maps in crossfire



On Jan 18, 10:17am, Peter Mardahl wrote:

> >  But lets assume that is the case - the random map that calls the static
> > map will be called first.  Then the map load function (or some portion)
> > can see the % in the field and know that the static map needs to be
updated.
> > IF we are loading the original static map from disk, we go through and
> > update the appropriate exits.  When this static map is swapped out as
> > a temp map, are exits are OK.
> >
> >  For updating the exits, we can probably examing the coordinates around
> > whre the exit from the random map to the static map goes (ie, the 9 spaces)
-
> > and use those exits.
>
> My thought was to have static maps not have an exit back at all, but rather
> have a sensible start_x start_y.  My idea was to load the static map, rename
it,
> and insert an exit back to the random map at start_x and start_y.

 This works fine.  So what would seem to work is something like:

 random map leads to static map with meaningfull x,y coordinates (I will let
you handle the logic of what static maps might be available for linking in.)
 The random map creates a special exit so that the program knows this is a
static map that needs some extra processing (something in the path or
something.)  When the player actually enters that exit, we load it into memory
and insert the appropriate exit leading back to the random map.

> >
> >  I wonder if it might be better to expanded the random map generator to
> > incorporate pre made map segments.
>
> Oh, I'm working on that now, but I was going to have these little sub-maps
> included at random.  I see what you're saying though, I could re-used this
> code to simply create a level, and then overwrite it--But I'd need to know
> the dimensions of the human defined map, so I'd have to load it.
> If I need to load it I may as well put an exit in it, it'd be simpler.
> Alternately, these dimensions could be given, but I'd rather Keep It Simple,
> for the person making random maps.

 My thought and including them was for style reasons.  For example, if the
random maps all have wall style cwall, it would be nice if that static map
walls could also get updated to a matching style so the static map appears to
fit in better.


-- 

-- Mark Wedel
mark@pyramid.com
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]