Most of this week was spent on getting the basic infrastructure for the zone generation up and going. Exciting tasks such as “create a new zone in the direction of this zone”, “make sure there’s actually enough space there”, and “create a link when two zones touch”. Presently it’s operating on the very first step of generation, creating the 3 “continent” zones- the land masses that the level structure zones will get placed within. Each “continent” represents a different level range of the game.
I’ve actually had some debate of whether the level design zones should define the shape of the landmass or if the landmass should be generated first. For the time being I’m generating the landmasses first since it makes for a good test case of zones. More than likely I’ll have to switch to having the level design dictate the continent shape. When the landmass dictates available area it makes it much harder for the level design to say, “okay I want a 3 zone long corridor in this direction” since there might not be enough space available there.
Another problem of note is how to define zone edges. You can either have zones share edge tiles (above picture), or you can have zones get their own unique edge tiles (first picture). The problem with the shared edge technique is that it results in situations such as above where the center edge is the only way for the top zone to connect to the bottom zone. But if it opens up that edge, it ends up inadvertently creating a connection to the left and right zones. Double edges fix this problem, but also end up creating significantly more bulky zones which is problematic given the tight space restrictions of the game. For the time being I’ll see how bad double edges are, but if it comes down to it I might have to make the generator a lot smarter when it comes to edges (doesn’t count as a connection unless there’s an unshared edge that can be used as an opening, etc).
In the coming week I’ll get to start working on creating actual level patterns, and fixing my currently broken edge detection.