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

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



Peter Mardahl on  wrote...
| 
| Hello,
| 
|   For random maps, I'd like to be able to link to human-defined
| maps, and have the human-defined maps lead back to the random maps.
| 
|   Can anyone suggest anything which isn't an ugly hack, for doing
| this?
| 
|   This is my idea of an ugly hack:
| 
|   1)  Copy the human-defined map to some new name.  (Allows the
| re-use of human maps in several random maps, like re-use of some
| small chapels, little shops, etc.)
| 
|   2)  Load the just-copied map, and insert an exit at the maps
| startx/starty location, which leads back to the random map.
| 
|   The ugliness of this technique offends me, can anyone come up
| with something more elegant?
| 

Howabout in your random dungeon defination file you have an array
The first exit definition would have had to be defined anyway.

(Format to be determined...)
Exit   level=1  map=../city x=20 y=30
Exit   level=10 map=quest  x=5 y=3
Exit   level=3  map="/!random side_quest -level 5"


Where the first to are the only exits at the top and bottom of the map
respectivally. (random towers would enter on the bottom)

The exit of 3rd level would be a second exit (as it is in the middle of
the random map set, somewhere on that level.

The arguments to this map tells the random generator that this entry is
to the random map defined by ``side_quest'' map definition file.  The
-level option that the entry is another `special Exit' that was declared
for the side adventure on its level 5.

EG; That is these two random maps are connected, You can go half way
down one, cross over to the other and go back up (or if its defination
allows) continue down in that different random dungeon.

This way you could have a couple random maps which posibily randomly
connect to each other, or have random quest levels on the side of the
map. (Fort Nox in Nethack?)

It also means that you could enter a random map dungeon in the middle of
the sequence (a tower that continues down into the earth) which may or
may not have special maps at either end (dead ends?).

Also one random map dungeon could lead directly to a different random
map dungeon,  EG: after 10 levels of nethack maps, the next level is the
first of 10 levels of mazes) without the need for special level
inbetween.

This also means that the exit at the top and bottom of the random map
(default if no level is given is 1) are also just `extra' exits, there
being no other exits.

It will also solve how special levels declare where they `return to',
Especially if the map resets since the adventurer went down.
or he reached the special level by another route.

The exits between each floor of the random maps can also be defined as
calls to the random map generator, though maybe with a flag to say they
are the NORMAL up/down progression and NOT a special declared `extra'
exit.

  Anthony Thyssen ( System Programmer )    http://www.sct.gu.edu.au/~anthony/
- --------------------------------------------------------------------------- -
  The maze was so small the people got lost, looking for it.
                                    -- Terry Pratchett - ``Men At Arms'' 
- --------------------------------------------------------------------------- -
     PGP Public Key available -- finger -l anthony@lyrch.cit.gu.edu.au
-
[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]