Wednesday 1 March 2017

Unlimited level size

I've worked on level theme content and kind of frustrated about the rectangular level shape or space that you have to work with. I think it's limiting the way level generation is made, because you have to choose cavern sizes etc. to match the level size, but it should be the other way around. Level size should adapt to whatever is created in the level.

The big question is how to implement that kind of level map, because you still need a 2D grid to contain the level. One idea that could work is create a ridiculously big empty level and when the creation is done then remove areas "outside" the level that don't contain any features. If it's difficult to resize the grid then copy the content to another level that matches the size.

The way level is generated would change a lot, because everything would be created in relation to other features. With this kind of creation it would be possible to start from several "points" and create different kind of content until they meet. This is a problem I have now with themes that have more than one style of features such as a town level surrounded by generic cave-corridor -style. When you create the town you are limited by the outer edges of the level plus those extra caves. Without edges you could create the town of random size, add some caves to extend it and that's it. Not only that, even simple level themes sometimes position caves on the edges of the level which can be seen, because they are cut off by the edges, even the edge routine is including some random tiles to make it less obvious.

I think it's not too late to use an "unlimited" level size when creating the level, because the way levels are created in this game are not limited to any kind of grid. Yet this is not something I want to try now. Not until I have programmed all important features of level generation.

2 comments:

  1. Instead of a 2D grid of (x,y) to tile, how about a map of (x,y) to tile?

    In C#, instead of a `Tile[,]`, a `Dictionary`?

    With a dictionary/map/associative-array you are only bound by what is defined. Anything not defined is OutOfBounds.

    ReplyDelete
    Replies
    1. I think that solves only a small part of the whole thing, because the concept is so different.

      Delete