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

CF: Announcing beta release of the random map generator




Hello,

  I've pretty much completed the random map generator for Crossfire.
It can be used either standalone, to make maps editable in crossedit,
or you can generate random maps at runtime in the server by
putting
  "/!" in the slaying field of an exit,
  and putting some parameters in the msg field to tell the random
 map generator what styles to use.  (If you don't specify things,
it'll pick something random....)

It is available at:
ftp://langmuir.eecs.berkeley.edu/pub/incoming/peterm/random_maps_pkg.tar.gz

Examples of things you can specify now:

1)  Floor style
2)  Wall style
3)  Decor style  (decor is randomly placed)
4)  Door style
5)  Monster style
6)  Treasure style
7)  layout style (maze or onion)

A "style" is nothing else than a crossfire map with objects in it
belonging to that style.  It is easy to make styles, therefore.  it
is very similar to the editor pickmaps, except choice is done automatically
and randomly.

+ misc. other parameters, such as difficulty, amount of treasure, etc.
All this is documented in doc/RandomMap.doc.



Here is the README:



Contents:

crossfire.diffs:
  patches to incorporate random maps.
  The patch to server/main.c failed when I tried it, dunno why, so I've included
  the next file:

crossfire/server/main.c:
  which is my version of that file.

crossfire/random_maps/*
  Source code for the random map generator.

new_arcs/*
  Archetypes needed for the random map generator to work properly.

doc/RandomMaps.doc
  Documentation on how to use RandomMaps.

maps/styles
  The map style dir, with some style definitions.



Notes to Mark:  

  The random map generator will sometimes crash if the arcs are not installed:
the style map set and the arcs must be consistent.

  I've gotten it to compile on Digital UNIX and Linux, and when
the map set and arcs are consistent, it doesn't fail.  I've used
"dirent" and "scandir" from the C library:  it works for me, but 
I don't know if these are broadly portable.

  I haven't included any headers on the files except comments,
nor have I put a license on anything.  I'll leave it to you, I think,
to put whatever headers are appropriate on them.  The work should
have the same permissions, I think, as the rest of the code in
terms of licensing.

To do:

1)  Specials in the map, like:
	Doors with buttons/levers/passwords
	Special, human-designed maps included in random_maps at random
	Magic mouths which make comments
	Randomly generated altars and healing/fueling stations

2)  Recursive maps ending with a human-defined map

3)  Other layouts than maze and onions, such as:
	1) spiral maps
	2) room-and-cooridor maps
	3) nethack-style room-and-corridor maps
	4) caves using cave walls
	5) diagonal as opposed to rectangular mazes
	6) radially symmetric maps
	7) Freestanding mausoleum type maps
	8) Anything else anyone can dream up.

I'll eventually get to 1) and 2) myself.  I'd appreciate help with 3).

All that is needed to produce such layouts is a function:
char **layout_maker(int xsize,int ysize,int opts1, int opts2, int opts3)

it should calloc and return a char[xsize][ysize].
the parameters opts1 opts2 opts3 are integer parameters which the layout
author can use or not.  The function must, however, do something
sensible when given zero for opts1,opts2,opts3, preferably picking
random options when given 0.

Conventions for a layout entries:
'C'	a map "center".  Treasures and exits down get stuck on C's.
'*'	a door.  A door of type "doorstyle" is placed here.
'#'	a wall.  Walls are autojoined with each other.
'>'	stairs down (not yet used)
'<'	stairs up (not yet used)
0	nothing there.

A layout need not generate any 'C', '*', '>', '<': these are optional.
'#' and 0
are mandatory.



- --OAA05126.916006084/langmuir.EECS.Berkeley.EDU--


------- End of Forwarded Message

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