Monday, October 20, 2014
This was just annoying me so I fixed it. There are no longer beaches along the shores of floating pack ice!

This was just annoying me so I fixed it. There are no longer beaches along the shores of floating pack ice!

Here’s an update for the space game, though there’s not much visual difference today other than a number of new glitches.
I’ve mostly been doing inside baseball stuff, reworking the way surface point data gets stored and sent to the shader. An array of information about surface types is now sent to the shader in a large array, and points just index into the array rather than containing all the info about their surface type over and over again. Some more data was added to that array to define beach color and size for particular surface types, although it’s not fully shaken out yet.
I also fooled around with animated waves on the beaches. They look totally wrong due to my lack of research, but they do animate. It’s nice to at least have a little dynamism in the scene. I’d like to have regular waves on the whole ocean too, but I haven’t figured out how to do that over the whole globe without artifacts showing up someplace.

Here’s an update for the space game, though there’s not much visual difference today other than a number of new glitches.

I’ve mostly been doing inside baseball stuff, reworking the way surface point data gets stored and sent to the shader. An array of information about surface types is now sent to the shader in a large array, and points just index into the array rather than containing all the info about their surface type over and over again. Some more data was added to that array to define beach color and size for particular surface types, although it’s not fully shaken out yet.

I also fooled around with animated waves on the beaches. They look totally wrong due to my lack of research, but they do animate. It’s nice to at least have a little dynamism in the scene. I’d like to have regular waves on the whole ocean too, but I haven’t figured out how to do that over the whole globe without artifacts showing up someplace.

Monday, October 13, 2014
It took forever to get the beach/water transition thing working, thanks for asking. And it’ll probably take another forever to get all the awful hacks out of the code and implement it for real. But it was worth it.
Also, Brian Eno’s “An Ascent (Ending)” came on iTunes just as I was snapping this photo. Fits nicely!

It took forever to get the beach/water transition thing working, thanks for asking. And it’ll probably take another forever to get all the awful hacks out of the code and implement it for real. But it was worth it.

Also, Brian Eno’s “An Ascent (Ending)” came on iTunes just as I was snapping this photo. Fits nicely!

Sunday, October 12, 2014
I’ve backed off from the subdivision strategy I was trying previously, as it wasn’t really sustainable, and am instead trying some different techniques. I’ve got one layer of triangle subdivision so far, which is generating new points to be transitions between climate zones which don’t quite make sense. For example, there’s now (almost) always a rock layer between vegetation and high mountain snow, and a beach of some sort between vegetation and water. I had some stuff in there to start randomizing the in-between points and flattening areas near the water, but it isn’t consistent between adjacent triangles yet so it’s not turned on. Ultimately I’ll want more subdivision layers purely for landscape roughness.
Behind the scenes I’ve also started cleaning up object lifetimes and ownership. Before, the space scene and surface scene were more or less distinct and there was hacky code to move objects and information between them; among other things, this meant I couldn’t start a game session on the planet’s surface but always had to fly there from space. That’s at least sorted enough that I can start the game on any planet I want, so iteration should be a little faster.
Outside of coding, I am actually now putting things together for the game’s story. Since it would be a pure exploration game where the story is mostly told through found data fragments, I’m using a wiki site to organize all the details and ideas and other bits and pieces. It’s kind of fun, actually, and I’m pleased how many elements have been falling into place.
(Oh, right, I should have mentioned that I know what the game is going to be now! …Boy, I hope I didn’t just jinx it by saying that. Well, I don’t have a title yet, so maybe that’ll keep the curse at bay.)
Side note - I apologize for not being very good at responding to notes. I bad at Tumblr :(

I’ve backed off from the subdivision strategy I was trying previously, as it wasn’t really sustainable, and am instead trying some different techniques. I’ve got one layer of triangle subdivision so far, which is generating new points to be transitions between climate zones which don’t quite make sense. For example, there’s now (almost) always a rock layer between vegetation and high mountain snow, and a beach of some sort between vegetation and water. I had some stuff in there to start randomizing the in-between points and flattening areas near the water, but it isn’t consistent between adjacent triangles yet so it’s not turned on. Ultimately I’ll want more subdivision layers purely for landscape roughness.

Behind the scenes I’ve also started cleaning up object lifetimes and ownership. Before, the space scene and surface scene were more or less distinct and there was hacky code to move objects and information between them; among other things, this meant I couldn’t start a game session on the planet’s surface but always had to fly there from space. That’s at least sorted enough that I can start the game on any planet I want, so iteration should be a little faster.

Outside of coding, I am actually now putting things together for the game’s story. Since it would be a pure exploration game where the story is mostly told through found data fragments, I’m using a wiki site to organize all the details and ideas and other bits and pieces. It’s kind of fun, actually, and I’m pleased how many elements have been falling into place.

(Oh, right, I should have mentioned that I know what the game is going to be now! …Boy, I hope I didn’t just jinx it by saying that. Well, I don’t have a title yet, so maybe that’ll keep the curse at bay.)

Side note - I apologize for not being very good at responding to notes. I bad at Tumblr :(

Thursday, October 9, 2014
Well, that’s certainly more consistent with the look of the planets from outside…
What’s going on here is that each triangle on the planet’s surface has three points that might be from three different climate zones: say, light vegetation, dark vegetation, and rock. In order to decide what color each pixel in the triangle will be, I’m using barycentric coordinates — a three-dimensional coordinate system where the three points of the triangle are represented as (1,0,0), (0,1,0), and (0,0,1). As we blend across the triangle, one of those three components is going to be higher than the other two. That component “wins” and the pixel will be considered to be in that point’s climate zone. By adding a 3D texture to vary the barycentric coordinates, noise gets applied to the threshold where the colors change. Without noise, they’d obviously be hexagons, but with noise that’s covered up to a tolerable degree.
I also eliminated the per-triangle directional lighting since a faceted environment wasn’t actually what I was going for here — instead, I wanted large solid blocks of color. I did throw in some generic fog to create depth in the scene, but I’m not sure if I want to keep it or not.
Other to-dos include subdividing the triangles, as there aren’t any interesting silhouettes going on here, and being smarter about how the triangles slope down to water level. It’s nice to have an irregular coastline but right now the “water” flows right up the hillsides, which is not optimal.

Well, that’s certainly more consistent with the look of the planets from outside…

What’s going on here is that each triangle on the planet’s surface has three points that might be from three different climate zones: say, light vegetation, dark vegetation, and rock. In order to decide what color each pixel in the triangle will be, I’m using barycentric coordinates — a three-dimensional coordinate system where the three points of the triangle are represented as (1,0,0), (0,1,0), and (0,0,1). As we blend across the triangle, one of those three components is going to be higher than the other two. That component “wins” and the pixel will be considered to be in that point’s climate zone. By adding a 3D texture to vary the barycentric coordinates, noise gets applied to the threshold where the colors change. Without noise, they’d obviously be hexagons, but with noise that’s covered up to a tolerable degree.

I also eliminated the per-triangle directional lighting since a faceted environment wasn’t actually what I was going for here — instead, I wanted large solid blocks of color. I did throw in some generic fog to create depth in the scene, but I’m not sure if I want to keep it or not.

Other to-dos include subdividing the triangles, as there aren’t any interesting silhouettes going on here, and being smarter about how the triangles slope down to water level. It’s nice to have an irregular coastline but right now the “water” flows right up the hillsides, which is not optimal.

Monday, October 6, 2014
Due to poor planning Clementine’s moon is also terrestrial right now, so here’s a picture of Clementine rising behind the one big mountain on its surface.
In all honesty the faceted look really isn’t what I was going for here, though. I’ve got some ideas for how to switch things up a tad.

Due to poor planning Clementine’s moon is also terrestrial right now, so here’s a picture of Clementine rising behind the one big mountain on its surface.

In all honesty the faceted look really isn’t what I was going for here, though. I’ve got some ideas for how to switch things up a tad.

Sunday, October 5, 2014
Continuing work on the surface exploration state. Right now I’m establishing that I can construct arbitrary geometry that corresponds to the underlying terrain type, not just duplicate the original sphere’s triangle mesh.
I have to admit, I’m tempted to start violating my own rules about no textures. They wouldn’t be fancy, but some PS1 Final Fantasy-level detail on those ground features could do a world of good. Then again, I’m nowhere near generating “final” geometry yet.

Continuing work on the surface exploration state. Right now I’m establishing that I can construct arbitrary geometry that corresponds to the underlying terrain type, not just duplicate the original sphere’s triangle mesh.

I have to admit, I’m tempted to start violating my own rules about no textures. They wouldn’t be fancy, but some PS1 Final Fantasy-level detail on those ground features could do a world of good. Then again, I’m nowhere near generating “final” geometry yet.

Sunday, September 28, 2014

#NoScreenshotSunday

I have been working at least somewhat on the surface exploration mode in the space game, but have nothing to really show yet. The system I have now allows various metadata to be associated with the colors on the map, things like “should we use the altitude value or just flatten this out,” “is this ocean,” “does this create a shoreline,” and so on. After some annoying wrestling and a throw-hands-up-in-the-air-and-say-forget-it attempt to use the busted-ass version of std::unsorted_map my OSX installation has, I’ve confirmed I can get that information all the way to planetary geometry construction. The next thing is, well, to take action based on that information. Yeah.

Away from the compiler, I’m also noodling around with for-reals designing the setting for the game. I may have finally come up with a reason to explore this big, empty solar system. We’ll see, though, I don’t exactly bat a thousand when it comes to pulling together game stories.

Thursday, September 25, 2014
Starting to work on proper surface geometry. For starters, I just made it so the surface triangles take on the altitude and average color from the relevant map points. This is obviously just slapped together, but it’s useful for a) making sure surface geometry is correctly lit by the sun, b) setting up proper mesh/shader usage, c) getting a sense of scale, and d) getting a sense of efficiency. For example, “30 fps” means I probably shouldn’t be rendering 5,120 individual surface meshes complete with all the associated OpenGL bureaucracy.

Starting to work on proper surface geometry. For starters, I just made it so the surface triangles take on the altitude and average color from the relevant map points. This is obviously just slapped together, but it’s useful for a) making sure surface geometry is correctly lit by the sun, b) setting up proper mesh/shader usage, c) getting a sense of scale, and d) getting a sense of efficiency. For example, “30 fps” means I probably shouldn’t be rendering 5,120 individual surface meshes complete with all the associated OpenGL bureaucracy.

Sunday, September 21, 2014
Tweaked the atmosphere to be solarized (thus avoiding gradients) and to change colors between daytime, twilight, and night as the sun’s position changes. Along those lines the background stars and galactic nebula are faded out during the daytime.
Also, Clementine now orbits a gas giant (“Discordia”) because in science fiction there’s always gotta be a big ol’ ringed planet floating in the skybox.

Tweaked the atmosphere to be solarized (thus avoiding gradients) and to change colors between daytime, twilight, and night as the sun’s position changes. Along those lines the background stars and galactic nebula are faded out during the daytime.

Also, Clementine now orbits a gas giant (“Discordia”) because in science fiction there’s always gotta be a big ol’ ringed planet floating in the skybox.