Home       About Me       Contact       Downloads       Part 67    Part 69   

Part 68: Names

October 12, 2012

I've had another poor health week and so not much has gotten done. Here is the current list of issues:

I'm keeping summaries of the chunks at five resolutions: 2x, 4x, 8x, 16x and 32x. At 32x, the entire chunk is a single textured block. These would be used at the farthest distance, where a 32 by 32 grid element would be 1km across.

Although the size of the summaries seems reasonable so far, I'm disappointed at how long it takes to generate them. On my machine, it's taking over a second per chunk to produce the five summaries. The code has no optimizations at all, so I'm hopeful that I can improve this dramatically. I'm surprised that even a stupid implementation takes this long however.

Different levels of detail have to match up at the edges. Back in Part 28, I fixed up the edges by recalculating the buffers whenever the resolution changed. I don't want to do that here. Instead, I'm trying to generate quad lists in the summaries that will match up correctly with any of the higher resolutions. What I have looks right on the surface of the terrain, but is doing bizarre things underground. Unfortunately, the sample data is so complex there that I can't figure out what it should look like. I'll have to try some simpler test cases.

Non-cube data like grass, lamps, etc. can be represented with cubes in the distance. Unfortunately, I think that's going to be noticeable at the 2x distance, which is still close enough to see individual bricks. I'm not sure I have a choice though. I really don't want to draw anything other than simple quads on these summaries. We'll just have to see how it looks.

I'm not sure what to do about transparent cubes. The important thing is that water look good, so I'm optimizing around that. I can take the water texture pattern and apply the alpha blending in my code when I create the summary texture, then just draw it as opaque. This will work with small windows too, since they will get opaque data from the room behind them.

Where this doesn't work well is trees, where the tree trunk will be blended with the leaves in the six cube directions, but not from an angle. That might end up looking kind of weird. Large buildings made of glass, like the glass dome in my sample data, are also a mess. There just is no opaque pattern that will look right. I'm going to have to live with that, I think.

I also have problems when there's empty space within a summary box. I would want to make those pixels of the texture transparent, but that leads to the same problem. Perhaps I can do those with alpha-testing. The only nice-looking approach would be to actually draw the summaries with transparent textures. However, that would mean sorting things correctly over the entire distant landscape as you move. I'm just not going to have the time for that.

I don't have a realistic performance number for the final viewer. My trivial implementation was to just have a separate buffer per chunk, but since there are thousands of chunks in the image now, that causes performance problems. I still have a lot of messing around to do there.

I'm kind of sick of playing with the low-level rendering issues on this project, but I can't stop now.

New Names

Some time ago, I noticed there was a Javascript game library called Crafty.js. So now I think my little Crafty demo should be renamed. I have no idea what to call it though. I went through the exercise of looking for unused domain names based on blocks, boxes, bricks, voxels, etc., but had no luck coming up with a good name that wasn't already taken.

I'm also less keen now on "Sea Of Memes." I registered my personal blog, "Free the Memes!" back in 2002. (Don't bother looking for it -- I haven't updated it in years.) Back then, "meme" was still an unfamiliar word (my Dad pronounced it "me-me"...) It was coined by Richard Dawkins in his book "The Selfish Gene" and basically meant an idea, which could spread by selection in analogy to a gene. Now of course, it means cat videos.

This site was registered in 2008. I don't remember if I thought of the name "Sea Of Memes" as a variation of "Free the Memes" or because of the xkcd cartoon. I can't rename this site, since there are links to it now, but I'd like to rename the game project.

In Part 40, I described a "Minecraft meets Civilization" game concept, where you would design structures offline, and then tell "critters" to build them for you, and perhaps make war on the critters controlled by other players. These critters could also be called "minions", since they obey without question. Looking around for unused domain names on that theme, I found AllMyMinions.com, and registered that. I think that's an OK name for the game, if I ever get around to writing it.

I'm open to suggestions on new names though. It's hard to find something decent that isn't already in use!

Since there's no new image from the project this week, here's something from my photo collection, so that I can track the RSS hits.

Glaciers meet in Alaska. I can't remember if this was near Sitka or Ketchikan.
A person would be a tiny dot in this picture.

Home       About Me       Contact       Downloads       Part 67    Part 69   

blog comments powered by Disqus