by gramps » Wed May 15, 2019 1:21 am
I've managed to link up prefab areas using an approach similar to
Wang tiles, where portals on each edge of an area define an edge of a tile. I've built a small zscript library to help with this; it handles generating the dungeon at runtime, linking up the portals, rotating map geometry, actors, floor and ceiling flats, and so on. It's somewhat configurable, as far as tile size, required number of areas for a valid dungeon, etc. The configuration file uses the same syntax as mapinfo.
There are a few issues with this currently. Savegames don't work well in the current gzdoom version, because the part of the gzdoom that allows level manipulation at map init time doesn't have access to anything in the savegame. This could be mitigated on the modder's end by carefully managing savegames, by using hubs and teleporting the player to a static, safe map to save the game, and back into the dungeon on loading. But this can be foiled by players saving the game manually, or autosaves, which there are currently no way to disable on a per-map basis (or at all).
Also, the level manipulation currently available in gzdoom is limited. You can move map geometry around, but you can't add new geometry. This means the tiles themselves need to be placed, they can't be used as templates to create copies of. But that's not a huge problem, it's easy enough to create multiple copies in the editor. Hopefully support for this kind of thing will improve as the need arises.
If you're interested in using the library or getting ideas from it, create an account and send me a private message and I'll send you a link to the github repo and help you get started with it.
I've managed to link up prefab areas using an approach similar to [url=http://www.cr31.co.uk/stagecast/wang/intro.html]Wang tiles[/url], where portals on each edge of an area define an edge of a tile. I've built a small zscript library to help with this; it handles generating the dungeon at runtime, linking up the portals, rotating map geometry, actors, floor and ceiling flats, and so on. It's somewhat configurable, as far as tile size, required number of areas for a valid dungeon, etc. The configuration file uses the same syntax as mapinfo.
There are a few issues with this currently. Savegames don't work well in the current gzdoom version, because the part of the gzdoom that allows level manipulation at map init time doesn't have access to anything in the savegame. This could be mitigated on the modder's end by carefully managing savegames, by using hubs and teleporting the player to a static, safe map to save the game, and back into the dungeon on loading. But this can be foiled by players saving the game manually, or autosaves, which there are currently no way to disable on a per-map basis (or at all).
Also, the level manipulation currently available in gzdoom is limited. You can move map geometry around, but you can't add new geometry. This means the tiles themselves need to be placed, they can't be used as templates to create copies of. But that's not a huge problem, it's easy enough to create multiple copies in the editor. Hopefully support for this kind of thing will improve as the need arises.
If you're interested in using the library or getting ideas from it, create an account and send me a private message and I'll send you a link to the github repo and help you get started with it.