Finally, prefabs are working properly! Here are some examples:
In these examples, the layout is as follows:
Generate the outdoors area, depending on the biome
Generate the indoors area as a dungeon using a set of prefab rooms
Generate a boss area, which is a prefab zone
For the prefab rooms, I made a few quickly, but still they can demonstrate what’s possible. The rooms can use explicit tilesets or the “dungeon default” whatever that is. They support explicit placement of creatures, objects or decals/decoration (e.g. cobwebs or carpet). They might allow additional procedurally placed sparse features (encounters, objects) or not: for example in a pretty packed boss room, we might not want to randomly spawn a bookshelf. Same apply to “zones” (via sharing much of the code) which are larger versions of rooms and they can be instantiated only once in a level, for example 3 zones being “outdoors”, “dungeon” and “boss lair”. Some zone type that I still want to add is “open” zones, for example an outdoors clearing with some ruins, treasures and monsters, that is well integrated with the rest of the map.
Prefab rooms can be configured so some are rarer than others, and some can be spawned just once or multiple times in the same level. What’s not implemented yet is context-specific room choices: for example, if we have a “crypt” map of sorts, we want lots of grave-related areas and rooms, but we shouldn’t find those in a wizard’s tower. Next step is to add such info to zones/rooms so that the created maps look more cohesive and can showcase certain styles.
Here’s a video showing a dungeon run like the above, only problem is that I forgot the boss room door open and it was empty by the time I got there…
A couple things this week. The prefab work is still going slowly, due to some days off, some IRL deadlines (it’s deadline season!) and finding a new thing to “distract” myself, which is the website/blog.
I plan to change the name of the game, as the current name reflects some outdated game design goals that I’m no longer after, ergo “irrelevant”. A new story-framework has been crafted (read here if you fancy) and a new name needs to be developed to reflect that change in direction. So, the complication is that I’ve bought a domain name which expires this July, and instead of renewing to something else that is similarly prone to whatever the future has in store, I thought I’d use Github Pages instead, which allows such changes more effortlessly. Github Pages and WordPress do not seem to mix well, so after a bit of research I decided to go with Jekyll, which is a popular static site generator. This has the added bonus that everything looks more like code, rather than the very GUI-driven interface of WordPress which I’m not a fan of. Since I don’t know much about web development, this transition takes a bit of time, and importing the blog into Jekyll is non-trivial as I have to fix embeds, links, images etc, and I’ve got a couple of months to do that before the other domain dies.
Regarding prefabs, I did get room prefabs to work (see figure above), where you can see the room placed everywhere in the dungeon, and sparse features like bookshelves or encounters are placed appropriately in there. But there are some more things to be done, because it’s never that easy. Room prefabs should also be able to include content besides just the shape. For example you could make a library room and place the bookshelves yourself, rather than rely on the placement algorithm. So, to support both procedural placement and fixed placement, is slightly tricky.