G
Guest
Guest
Archived from groups: rec.games.roguelike.development (More info?)
I've been reading the conversations about this in other threads and I
had an idea. I just want to get some feedback on it and see if anyone
else thinks this is reasonable or if I overlooked some glaring defect.
I read somewhere (either roguebasin or roguelikedevelopment) about
having a theme for dungeon levels (a list of room templates that are
used up as the dungeon is generated) and was thinking that a
generalization of this might work well. Make a big graph of room
template connections (including empty rooms of various descriptions).
I would assume you would store this a some template along with a list
of what rooms can be connected to this.
After you have that, start by generating the dungeon as a bunch of
blank rooms and hallways. (Probably all rectangular if that makes
things easier.) During this you have to make a second graph that shows
what rooms are connected to what. (If you were doing this for a town,
you could use proximity instead of actual connectivity.)
Finally, apply a random template to a random room. Then for each of
the neighboring rooms apply a template from the list of possible room
templates connected to the first one, making sure that it doesn't
violate the room template graph WRT the other rooms around it. (I
didn't say that right, did I?)
Anyway, once all this is done, the dungeon is finished...
I do see a problem myself (and I'm sure other people will see other
problems). It would be very likely that you could have a room that
couldn't have any of the templates applied to it. (It could happen
with as few as three rooms. If TemplateA can connect to either
TemplateB or TemplateC and TemplateB and TemplateC can only connect to
TemplateA, then a ring of three rooms can't be filled out. You could
say that it's alright for a room to connect to a copy of itself but
that only makes it slightly less likely to occur. [You need four
rooms.])
One other thing... The templates would have to be very detailed to make
this interesting. They would need atleast a list of prerequisites
(such as room size and number of doors) and a list of objects to place
in the room. Just a list of objects would probably be boring though.
This is one place scripting (atleast some weak scripting) would be
helpful. That way, you could say place the throne on the far side of
the room with a double row of columns leading to it. (I can't think of
how you'd do that in a data-driven system when you don't know the
layout of the empty room.)
Well, that's all for now. (In case anyone is wondering, I am in the
process of writing a roguelike but I'm only doing it for my own
amusement. If it every gets to a playable state I'll release it but
right now it's just a white @, a green g and some #s.)
I've been reading the conversations about this in other threads and I
had an idea. I just want to get some feedback on it and see if anyone
else thinks this is reasonable or if I overlooked some glaring defect.
I read somewhere (either roguebasin or roguelikedevelopment) about
having a theme for dungeon levels (a list of room templates that are
used up as the dungeon is generated) and was thinking that a
generalization of this might work well. Make a big graph of room
template connections (including empty rooms of various descriptions).
I would assume you would store this a some template along with a list
of what rooms can be connected to this.
After you have that, start by generating the dungeon as a bunch of
blank rooms and hallways. (Probably all rectangular if that makes
things easier.) During this you have to make a second graph that shows
what rooms are connected to what. (If you were doing this for a town,
you could use proximity instead of actual connectivity.)
Finally, apply a random template to a random room. Then for each of
the neighboring rooms apply a template from the list of possible room
templates connected to the first one, making sure that it doesn't
violate the room template graph WRT the other rooms around it. (I
didn't say that right, did I?)
Anyway, once all this is done, the dungeon is finished...
I do see a problem myself (and I'm sure other people will see other
problems). It would be very likely that you could have a room that
couldn't have any of the templates applied to it. (It could happen
with as few as three rooms. If TemplateA can connect to either
TemplateB or TemplateC and TemplateB and TemplateC can only connect to
TemplateA, then a ring of three rooms can't be filled out. You could
say that it's alright for a room to connect to a copy of itself but
that only makes it slightly less likely to occur. [You need four
rooms.])
One other thing... The templates would have to be very detailed to make
this interesting. They would need atleast a list of prerequisites
(such as room size and number of doors) and a list of objects to place
in the room. Just a list of objects would probably be boring though.
This is one place scripting (atleast some weak scripting) would be
helpful. That way, you could say place the throne on the far side of
the room with a double row of columns leading to it. (I can't think of
how you'd do that in a data-driven system when you don't know the
layout of the empty room.)
Well, that's all for now. (In case anyone is wondering, I am in the
process of writing a roguelike but I'm only doing it for my own
amusement. If it every gets to a playable state I'll release it but
right now it's just a white @, a green g and some #s.)