Help creating a randomly generated world!

lightwriter
I need help on creating a randomly generated world (to a certain extent). It will be infinite
Things I have come up with on as to how this have to work:
A coordinate system (x, y, and z)
The player intially starts at 0,0,0
Each exit will have to have a unique id, presumably using a coordinate system to define it somehow like 8_6_23_from and 8_7_23_to
Each room will have to be defined to prevent overriding of rooms already generated.
Will need at least 4 different functions for each direction (Only using North, South, West, and East for now but will have z there for the future)

lightwriter
What's wrong with this code:

x = currentroom.x
y = currentroom.y + 1
z = currentroom.z
nextroom = "a" + x + "_" + y + "_" + z
create (nextroom, "editor_room")
nextroom_exits = GetObject(nextroom)
create exit ("north", currentroom, nextroom)
create exit ("south", nextroom, currentroom)
MoveObject ("player", nextroom)

HegemonKhan
Jay has some good threads on this stuff:

viewtopic.php?f=18&t=3546
viewtopic.php?f=18&t=3886
viewtopic.php?f=18&t=4280

viewtopic.php?f=18&t=3214

lightwriter
HegemonKhan wrote:Jay has some good threads on this stuff:

viewtopic.php?f=18&t=3546
viewtopic.php?f=18&t=3886
viewtopic.php?f=18&t=4280

viewtopic.php?f=18&t=3214

This helps but I'm looking to take it a step further and make it infinite

lightwriter
UPDATE: I'm actually making some progress... Nabged to get 1 direction (north) and the other directions will follow a similar format

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

Support

Forums