February 4th, 2017


#1

A big challenge with world generation is determining the way the different regions connect up, what they contain, and how that affects a particular game. For the beta we’re going to have a few different templates for how a world may be structured, and the ‘world solver’ will use that structure to determine the obstacles and mechanisms between the regions. Last fortnight I had written a solver prototype in Python, then last week I started to add high-level interfaces to the different regions. This week I connected those two pieces. Now I have a working prototype of that system. In the image below you can see how a structural description written in Python (on the right) is used to generate an actually-running-in-game region on the left.

With this approach I can prototype faster; however, it requires a lot of code duplication between the c++ engine and the python solver. Ideally I’d like to use the solver at run-time, but for this release I’ve decided to pre-generate a set of world structures. To get them into the game I generate c++ code from the python structure, using a bunch of simple templates like this:

Part of the work of the planner involves specifying parameters of areas – to support this I started to implement some of these parameters. For instance, here is the “tunnel” subregion – a generic area connecting two doors. Some of the parameters of the tunnel are: length, height, and base material. Additional tunnels support pockets of ores, natural obstructions, npcs, flooding with lava or water, and different kinds of entrance types. Here’s two examples of tunnels that vary only in their parameters and generation seed. We’ve got some interesting ideas for more connector and dead-end types, and I think the world will start to feel way more intricate with enough variations.

To step back from dev-talk a second, I’ve got a lot going on right now but I’m holding it together. Alex and I are keeping focused on our goal, but it seems like it is always receding into the distance. Besides the development we’re also working on promotional images and starting to organise the assets for steam and itch and the website. Alex will be attending GDC in late February, so if you’re there you should drop him a line on twitter and say hi. I’ll be staying home this time, but I hope to make it next year.

P.S. Soon after launch-time I’ll be moving this forum to another domain. I’m not sure what that involves but there’ll probably be a redirect or message on this old domain. I hope I don’t break it, but please follow me on twitter to keep up-to-date with Moonman and me.