Random map or creating exits as the game progresses

puzzler7
I realize I'm asking for hell here but ... is it at all possible to a) randomize a map, keeping the same rooms but putting them in a different order, or b) create exits as the game goes on, so if the player explores north, I could pick a random room and attach to the room the player is in? (Sorry for the run-on)

I haven't tried this at all yet, I wanted to see if it was possible first. The order wouldn't need to make logical sense e.g. go north from bedroom to bathroom, then go north from bathroom to bedroom would be ok.

XanMag
a) certainly doable, but The Pixie will have to help you more with this. The maps of Deeper are entirely based on this randomization, but I do not know how to do it.

b) easy. Create exits as you normally would but name them and make the exit invisible. When a player does something that opens another exit, simply run the script 'make exit visible'.

The Pixie
It is possible, as XanMag says. I am going to pimp my game, but this shows it in action; the three rooms on the surface are normal Quest room, but everything after that is generated at random on the fly. It even maps each level for you, if you type MAP.
http://textadventures.co.uk/games/view/ ... tcg/deeper

Creating rooms and exits is pretty straightforward (use create and create exit, or alternatively set up prototypes, and clone them). The tricky bit is doing it so coherently, so if you go north, then east, then south, then west you are back where you started.

HegemonKhan
Also, on top of Pixie's work on this stuff, there's also Jay's work too, which can be found in the 'libraries and code samples' forum, too lazy to scan through it myself posting the links for you, as you can do that yourself.

this is a bit of advanced stuff, as just to make a mapping of rooms, requires math coordinate/grid/graph/graphing programming: giving your rooms 'x_coord', 'y_coord', and/or 'z_coord' Integer Attributes, which allows for you to compare those Attributes to each other, to determine their mapping to each other, ie: room_1 (0,0) to room_2 (0,1): room_2 is directly north of room_1

if you've forgotten your geometry, algrebra, trigometry, and above math, grid/graph/graphing work:

(x:horizontal/west-east/length, y:"vertical"/north-south/width), and (z:vertical:up-down/height)

......y
......|
-------- x
......|


(-1,1)...(0,1)...(1,1)
(-1,0)...(0,0)...(1,0)
(-1,-1).(0,-1).(1,-1)

NW-N-NE
W--C--E
SW-S--SE

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums