Dynamic Rooms?
pjonesdotca
10 May 2018, 15:15I'm looking at making a roguelike and while reviewing the documentation and tutorial videos I can't seem to understand how one could either generate a random world or create one dynamically as the game progresses.
The Pixie
10 May 2018, 16:34Use this to create rooms and objects:
http://docs.textadventures.co.uk/quest/scripts/create.html
... or build prototypes in the editor and clone them:
http://docs.textadventures.co.uk/quest/functions/corelibrary/cloneobject.html
... and this for exits:
http://docs.textadventures.co.uk/quest/scripts/create_exit.html
pjonesdotca
10 May 2018, 16:37Thanks so much!
hegemonkhan
10 May 2018, 16:48jay (jaynabonne) (sadly he's gone now) made some random dungeon coding/libraries:
(err, I thought he had a random room generator, but can't find it now... only could find his stuff on the grid-map feature)
https://textadventures.co.uk/forum/samples/topic/3214/path-library
https://textadventures.co.uk/forum/samples/topic/3546/map-generation-demo
https://textadventures.co.uk/forum/samples/topic/3886/grid-map-fun
and there's Pixie's 'deeper' game too:
http://textadventures.co.uk/games/view/em15b32xd0o-y-ysvgrtcg/deeper
https://textadventures.co.uk/forum/games/topic/5901/deeper-released
https://textadventures.co.uk/forum/games/topic/ygqnnjir8eo2rcmjpm1atw/looking-for-testers-for-deeper-2-0
(these links might be old... what I could find in my quick search/browsing for his thread on his 'deeper' game)
and other resources from other people too:
https://textadventures.co.uk/forum/samples/topic/5529/infinite-world-generation-alpha

DarkLizerd
10 May 2018, 18:17I'm an old Basic programmer.... In Basic, there were no objects or rooms.
I made Wumpus as a "1 room" game.
http://textadventures.co.uk/games/view/g4jaujz2ceipk6vi3cfx0a/wumpus-3-0
Basically, when the player would exit the room, you just update the room description and put the player back in the same room.
All you would need would be a list of rooms, each exit, and room descriptions.
If the room has an object, just add it to the room before the player enters.
I also have a random maze program, in Basic, that I am breaking down to figure out how it generates the map.
It generates a map with just one path from entrance to exit.
That as a base would work for a Rogue based game.
mrangel
10 May 2018, 21:59It generates a map with just one path from entrance to exit.
Edit: Sorry, thought my thoughts might be helpful

DarkLizerd
11 May 2018, 02:20If you want bottlenecks... just divide up the map...
Section 1: random map with 3 keys, one will open the exit door
Section 2: random map with 2 keys needed to exit, A monster has one, the other one is hidden.
Section 3: same as before...
This would prevent the key needed to open the door from 1 to 2 from being in area 2 or 3.
But, you could have the key to get out of 3 in area 1 or 2...
The Pixie
11 May 2018, 08:26I'm an old Basic programmer.... In Basic, there were no objects or rooms.
Back in the early 80s I made a Pacman game with a random map in BASIC, on the BBC micro. It was a bit different to Deeper. In Pacman, you have a specific area, and that area needs to be filled. For Deeper, each level could sprawl across quite a large area, with bits with nothing at all. That said, for both there was a second step that checks all areas are accessible, and adds exits if required.