We've been making lots of progress on the level editor, and although things haven't always taken the most obvious path, it's been coming along nicely. I figured it'd be fun to demonstrate some of these plodding advances by creating a small, abstract map and dressing it up. The scene below is colour-coded using our old annotation fills:
First let's do some basic texturing.
Based on the in-game camera view, each "tile" is a 128x128 PNG as we found that it displayed enough detail given the overall size and scope of the geometry. These tiles can be painted directly on the scene, or used to flood fill a selection. Here's a quick demonstration of painting the map with three textures: grass, stucco, and rock.
It's easy to see that even though the textures tile seamlessly, the end result is quite uniform and repetitive:
The most obvious way to solve this is to create a bunch of 128x128 tiles that can all connect to each other, but this is very time-consuming. Worse yet, it prevents larger details from being an option as any tile must connect to any other tile, from any side, removing the possibility of larger details flowing from one to another. To compensate for this, we first tried using Wang Tiles
While these were quicker to produce than 16 individual grass tiles, there were still issues that only became evident once the tiles were randomly laid out. There were no obvious hard seams, but the changes in brightness around the tile-edges created straight-line patterns when viewed as a whole. These were difficult to accommodate for ahead of time, but looking at the distribution-image we had an idea: what if we just created a giant texture that could tile seamlessly?
Since we were not bound by the same memory limitations, we decided to try this out by providing support for a large texture -- 4 times the size of the original -- to be painted over the scene one tile at a time.
This allowed us to give the texture more organic details, and its large size prevented any patterns from becoming too visible. Here's a comparison of the original map and the large-tile approach:
Finally, to make the scene start looking less abstract, we wanted to give the house a slate roof. While this was easy enough to do with a single tile, we quickly realized another problem: all the textures "flowed" in one direction. This meant that all the rooftops were covered with the exact same pattern despite being perpendicular to each other:
We didn't want to create numerous versions of each texture rotated to a specific angle as that'd take more prep work and demand more space for textures in terms of both memory and file-size. Instead, we added the ability to select and rotate individual texture-pieces without altering the geometry:
And that about covers our first steps. Next up: layering!