mIRC Home    About    Download    Register    News    Help

Print Thread
#128528 26/08/05 08:26 PM
Joined: Oct 2004
Posts: 8,061
R
Riamus2 Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Has anyone here made any form of random map (dungeon) generator? I need one for a RPG I'm writing and I'm not entirely sure where to start with it in order to create rooms and halls that are at least somewhat realistic (not turning every which way and such).

I don't want someone else's script for this and I don't want to rip code from another script. I'd just be interested in pointers or ideas in how to accomplish this (not an entire script).

For example, would it make sense to randomly cerate the rooms themselves and then create paths from the door on one to the door on another? And then make interconnecting paths somehow?

Or is it better to create a room and start from one door and just start making a path and randomly add a room as I go along that path?

Or something else?

I have the item generator completed (tho I want to add to it and improve it a bit... it does have hundreds of thousands of possibilities, though), basic character creation with randomly (realistically) generated age, heigh, weight for the character completed, basic battle system (non magic so far) done and some various other things done.

#128529 27/08/05 04:05 AM
Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
well, you could make it generate rooms, like you said, (i.e assigning them names (room.1, room.2,ect), and have dimentions for them (i.e the board is 1000 by 1000 by 50, x by y by z), and give the positions of the room, and then make doors for them, but the dimentions is only usefull if you are making a simulation, so you can just link them randomly.

i think this would posibly be the best way to do it, as i can't think of any other good way to do it :tongue:

#128530 29/08/05 01:38 PM
Joined: Oct 2004
Posts: 8,061
R
Riamus2 Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Do you think I should try just having the paths generate by just randomly going straight, right, or left? And, if I'm doing many rooms, I might not want to always say that room a connects to room b.

I think this is going to take a lot of work to figure out. I can do a temporary thing without using maps, but it's not as interesting that way.

Any other ideas are appreciated. There are so many map generators for games out there that there should be some easy way to generate a valid map... just not really sure how. smile

#128531 30/08/05 10:31 AM
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
I haven't lookd at randomly generating paths in a very long time - but (as an alternative approach), what if you generated walls instead of rooms? i.e. start off with an empty space, and put walls (and "doors") in there.

CHeers,

DK

#128532 30/08/05 12:43 PM
Joined: Oct 2004
Posts: 8,061
R
Riamus2 Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
That might be a possibility. I'm not sure which would be easier. I'm going to need to try different things until I manage to come up with something that works well. I don't feel like creating hundreds of maps on my own. laugh


Link Copied to Clipboard