Last week I moved 700 miles across the country, so have had some time to think about how to proceed with development.
I’ve decided to reevaluate my terrain tileforms. In my last iteration I was having lots of problems with lizard-scale type surface textures on diagonally sloping terrain, which is not what I wanted to see. My work right now is to essentially turn an isometric game board into a height-varying terrain board that more closely approximates natural landscapes, saving myself the task of having to design faux hill and cliff artwork, and speeding up art creation later on, as well as adding an interesting strategic element to the game.
I want to strike a balance between simulation and game. In a strategic game such as one I’m imagining, the terrain is one of the most important features, and perhaps the single greatest factor in strategic decision making. So, getting terrain right is crucial to the success of the project. Building a system that has inherent variety, mutability (via terraforming or other more violent types of deformation) has to be balanced against complexity. Not just complexity in programming, but also in player perception of terrain.
On a game board, the terrain is simple and easy to wrap one’s mind around. It’s a square or hex, potentially of several different types. Settlers of Catan is a good example of this. There are different terrain types, each represented by configurable hex tiles. From the simple arrangements of the terrain, strategies are born. Different terrain types have different resources, and affect movement in different ways.
In my current design (no screenshots yet, sorry!) any given square terrain tile can take 175 different tileforms. This number isn’t actually complete either, since certain tileforms can be drawn in two different ways. Consider the tetrahedral die, which, like a tile surface, has 4 vertices:

Two of the vertices are “low” and the other two are “high”, and as a result of this, there are two possible ways to draw the two triangles that connect the four corner vertices. In the “valley” configuration, the shared edge that connects the two triangles runs between the low vertices (left to right on the image above). In the “ridge” configuration, the shared edge runs between the two high vertices (top to bottom in this image). So, from 4 vertices we can get 2 different surface configurations.
I haven’t done the analysis on this to figure out how many of these dual-surface cases there are in the 175 legal tileforms, but I imagine the number’s close to 100. Tonight I’ll isolate the exact conditions and survey the tileforms to find the number. Once I know, I’ll have to decide whether there’s a clean way to guarantee “all ridges” or “all valleys” in my tileform set, or whether it is advantageous to permit both conformations.
Unlike in my Java implementation, I’m not starting from the assumption of having a predefined set of tiles and then interpolating vertex information from their relative heights, then figuring out which one of my tileforms to shim into that spot. Instead, I’m going to treat every corner where 4 tiles meet as a distinct puzzle, and search to find out whether there’s a vertex location for each of the 4 vertices that share that corner that lets them make a legal tileform. If there’s not, I’ll likely aim for the greatest number of solutions, and assume that any unsolvable vertices will be force a “cliff” into the terrain. This is desirable, because I want cliffs to form.
Tileforms will take up (11 * 22 * 175) * 4 bytes = 165.42Kb of VRAM if I want to store them all as Vertex Buffer Objects. (3 position, 3 normal, 3 color, 2 texture floats for each of the 22 vertices in a tileform). More if I include both ridges and valleys. That’s not a completely insignificant amount, and more than my previous implementation, but it might be worth the tradeoff for improved surface quality and the boost in FPS.
Once I have some visuals to compare to previous renders I’ll have to get serious about deciding whether to continue down this road, to make simplifications in the range of possible surface geometries, or to press forward.
**** UPDATE: There are 38 “saddle” cases, where either a valley or a ridge could be employed. That’s not as many as I feared. Will have to think about how to choose between the two cases.