Thursday, 22 December 2016

Scalable level themes

I'm working on level themes now that levels can be resized. Detailed version: Each level is created as an empty version (not yet randomly constructed) in the world structure. At first I thought remaking level would be as simple as deleting an instance of level class and creating a new one. However that was not an option, because stairs structure (connections) are stored per level when the world structure is created. So, I had two ways to handle remake. Either tweak world structure or create routines to clean the level class and then remake it. Cleaning the level class was easier than I thought and also I was able to use cleaning and reset routines in constructor and destructor safely.

First and obvious test for the scalable themes was the island where the player first lands when starting the game. I went for conservative 60 to 100 tiles size which seems scale quite nicely, although bigger levels start to reveal the primitiveness of the island creation routine. The island is constructed from couple of ellipses randomly on top of each other to make them look less "ellipsy". Then I had an idea to really test the creation and punched in 500 tiles size. This is what happened:

The main island is still working as a structure, but the north island goes bananas. I have no idea why it does that, maybe I could take a closer look at the routine. It is a bug that doesn't appear on smaller map sizes. Also, 60 tiles seems to be a minimum size to fit everything required on both of the islands. It would also break in smaller sizes than that. I guess it will be an interesting journey to check out all different themes to see how they work on both ends of the scale. I'm a friend of small levels, because from tactical and navigation point it doesn't bring anything useful when you make bigger levels. If anything they can look boring and become tedious to explore.

No comments: