TADS3 random map generation

I’m curious of the best way to create randomly generated maps. Mainly, how to dynamically attach rooms to an arbitrary direction. The best way I can think is to use room.(dir.dirprop) but that feels way too low level to be correct.

1 Like

No, that’s about it.

I previously presented a module for generating simple random maps that you might find useful if you’re just trying to get a handle on the underlying mechanics. I wrote the module to generate random maps for testing pathfinding, so what it produces probably isn’t something you’d want to stick directly into a game, but the nuts and bolts of how to connect rooms at runtime is the same.

You could also do something more elaborate with bespoke TravelConnectors—basically instead of tweaking the room’s connectors, putting logic on the connector to decide on the fly where it connects to.

1 Like