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

CF: Comments about random map generator



>From the comments that I saw on this list about the random maps stuff,
it looks like very few people have actually tried the patch.  ;-)  Here
is my personal experience, maybe it can encourage others to try it...

After applying the patch and copying server/main.c as explained in the
README, I had to modify two things in order to be able to compile the
new code:
- In configure.in, I added random_maps/Makefile at the end of the
  AC_OUTPUT line in order to ensure that the Makefile is correctly
  generated when the configure script is run.  After that, I ran
  "autoconf" to create the new configure script.  Those who do not
  have autoconf can try modifying the current configure script
  directly and add random_maps/Makefile in the CONFIG_FILES line.
- In random_maps/Makefile.in, I had to replace random_map.a by
  librandom_map.a.
After that, I ran "configure", "make" and everything worked fine
(that's on a three years old Linux system).  Good!  Well, it crashed
the first time I tried to use the standalone map generator, but that
was because I forgot to install the maps/styles files in the maps
directory.  With the maps in the right place, it worked better.

Hmmm...  I also had to update the archetypes file in order to get
the correct wall types.  For the lazy ones who do not want to unpack
the whole archetype distribution and rebuild it, here is an eazy way
to do it:
  cd /usr/local/crossfire/lib
  mv archetypes archetypes.old
  cat archetypes.old ~/random_maps_pkg/new_arcs/*.arc > archetypes
This allows the random map generator to create correct maps instead of
maps without any walls...

I tried "random_map inputfile1 test" and I started crossedit to look
at the result.  By the way, I was a bit surprised that the map was
saved in the maps directory instead of the current dir, but I see that
it is because of new_save_map().

My first reaction when I looked at the test map was: "Wow!".  I was
really impressed by the results.  Then I tried the same command again
and reloaded the map in the editor.  Wow again!  After a dozen more
Wow's, I was convinced that the random map generator is a truly GREAT
addition to CrossFire.  Mark, this MUST be included in the next
release!

I found lots of nice tricks in the random maps.  For example, some
symetrical onion maps give nice results.  Also, I was pleased to see a
magic mouth saying "You have just entered a random map."  Well, except
that the magic mouth was only triggered on exit, not when entering the
map.  :-)

Creating maps with the standalone map generator worked fine, and this
looks like an excellent way to create a set of maps that can be edited
by hand later and used as part of a quest.  Using the map generator
from within the server (generating maps on-the-fly) worked after I
created the directory maps/random (IMHO there should be a better way
to store the info for the automatically generated maps).  But sometimes
the server crashed and said that it could not load the map, although I
did not know why.  Re-starting the server and entering the map again
solved the problem.

A nice feature is that the code can generate multi-level random
dungeons, getting tougher and tougher the deeper you go.  However,
I found that only the monsterstyle "humanoid" gives a good progression
for players who are below level 15 or so.  Other styles will quickly
get much too hard, although this could be a nice feature for high-level
characters.  Try generating random maps with "dungeondepth 50" and that
should keep a player busy for quite a while.  By the way, all these
styles are an amazing piece of work and appear to be very easy to extend
and maintain.  Thanks and congratulations, Peter!

I have some suggestions for Peter or for others who are planning to
extend the map generator (I might start working on some of these issues
myself, although it will probably not be before a couple of weeks):

- In some cases, the treasures or decorations are put on top of each
  other.  This is not a big problem since the player can still get the
  stuff, but it would look nicer if the code could avoid stacking
  items if there is some free space around (I know that it is not always
  possible to find a free spot next to an object).  I haven't checked
  the code to see how easy or difficult this would be.

- Also, in one case I saw a monster on top of a locked door.  This
  should be avoided if possible, especially if that monster could hold
  a key.

- If a symetric map is created and dungeon_level < dungeon_depth, then
  the xsize and/or ysize will increase in the next level.  I think that
  it could cause some problems for deep dungeons.

- Instead of using "/!" for the path of the random map and the message
  field in the exit for the parameters of the random map generator,
  you could use something similar to the URL of a CGI script.  For
  example, you could have a pseudo path like this:
  /random?xsize=30&ysize=30&dungeon_depth=2&layoutstyle=maze&wallstyle=cave
  This would give more info to a server admin looking at the list of
  loaded maps, although the path could get a bit long...  This would
  also prevent some exits (teleporters) from displaying the map
  parameters as a message to the user.

- You could add the three parameters dest_x, dest_y and dest_map.
  These would be added to the parameters of all exits leading to
  deeper dungeons (so that they are propagated correctly, but
  otherwise not used), and they would set the destination of the last
  exit (when dungeon_level >= dungeon_depth).  This would be an easy
  way to have a recursive random dungeon with a final exit leading to
  some pre-existing map, although I am sure that you have thought
  about that already.

- If an entrance to a random map contains the parameters "difficulty"
  and "dungeon_level" set to different values and dungeon_depth greater
  than dungeon_level (so that a multi-level dungeon is created), then
  maybe you could keep the difficulty as a constant from level to
  level, while dungeon_level is incremented.  This would allow deep
  dungeons of constant difficulty, which would avoid the problem
  described above with maps becoming quickly too hard.

Finally, a map created with the decorstyle not set (i.e. random) could
lead to a level 1 map with the decorstyle "readables", which is a very
easy way to get a lot of valuable stuff easily (dozens of skill scrolls
and improvement scrolls).  Even "alchemy" and "minerals" give too much
good stuff for low-level maps.  Maybe these decorstyles would be more
appropriate for treasurestyle?

But I must say, the random map generator is an excellent work!

-Raphael
-
[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]