Home       About Me       Contact       Downloads       Part 70    Part 72   

Part 71: Update

November 2, 2012

For the past month or so, I've been getting about four hours of interrupted sleep a night. This problem has been bothering me off and on for most of this year. It really cuts into my progress on this project! I rarely feel like I can really concentrate, and when I do write code, it's full of bugs. I lost hours this week chasing what turned out to be a trivial typo ("lx" instead of "ly") that I read over a dozen times before I realized what was going on.

I'm hoping to switch to a new medical group and find some sort of solution. In the meantime, I just have to wait this out. I'm sure I'll get back to the good old days of six hours of sleep a night sometime soon...

Fig 1: Boxes out to 32 kilometers.

I'm coming up on the two-year mark, so here's a short review of the entire project at this point:

  • I started this project coding for DirectX/Windows, but then I tried to make it multiplatform. My infrastructure needs a lot of work before it could be a usable library like SDL. On the other hand, it does run on Windows, Linux and Mac, for all of the machines I've tried it on. If nothing else, the applications are well-isolated from the OS and 3D library and can easily be ported to another environment.

  • I started on a UI library, and I'm reasonably happy with the architecture of that as well. It needs some low-level graphics on each platform, and then a better looking set of controls. I intend to finish that up after I get the basic world rendering working.

  • I've implemented a Minecraft-world viewer that I think looks really good and performs well. I've recently learned that the graphics code can be a lot more efficient though.

  • I tried to implement my larger solar system full of polygonal (not block-based) landscapes. I ran out of steam about then, and have been nibbling around the edges for the last year.

  • Recently, I realized I could implement instancing under OpenGL 2.1 and use it on the project. This will cost me a bit of rendering time but save huge amounts of display memory. It might even save time overall, since I will be moving less data into the display (millions of vertexes take a noticeable amount of time.) I've implemented test cases, but not a full version of the rendering code using this technique. (Part 65)

  • I also discovered that the number of vertexes was affecting my performance more than the number of pixels drawn. I can fix that by drawing quads of connected faces rather than a quad per face. My test cases on that look very good, but I still have to solve the aliasing and lighting problems with that approach. (Part 66)

  • I found a way of summarizing distant landscape that I can live with (Part 67.) I'm currently working on implementing that. Figure 1 above shows my TwentyMine Minecraft save file merged with a procedural landscape (the mountains in the distance) and rendered out to 32 kilometers. The alternating colors show me where the resolution changes.

  • The landscape is saved with my ObjectStore library (Part 53) along with summaries from 2-1 up to 1024-1. I've got the code to keep the summaries up to date as blocks change in the world. So far, I haven't used that interactively, just in a batch exporter that converts my Minecraft data.

  • I need to add code to create a texture for each of the quads of the summary, based on the original brick data and the procedural world data. I'm about halfway through getting that to run.

  • Finally, I need to combine all the pieces into a single demo that updates the landscape resolution as you move (similar to Part 28), loads summaries out of the store in the background, and renders the foreground 1-1 data with instancing and combined faces instead of one quad per face.

  • I'll put some kind of crude UI together so people can add blocks similar to Minecraft creative mode. Then I'd like to get the server I wrote in Part 39 up to handling the new data structures. That will give us a cooperative world to play in. Finally, I want to get the McrView program to allow export of buildings, and the new Crafty to allow import. Then you'll be able to fill the shared world with your favorite structures.

  • At some point, I think I'll add all of this block-based code to SeaOfMemes, and just go with blocks for the asteroids, ringworld, planet and moon. I've actually done one quick test of wrapping the block world around the inside of a cylinder, and it looks like a lot of fun.

So that's the current state and future plans. All I need is some sleeeeep.......

Home       About Me       Contact       Downloads       Part 70    Part 72   

blog comments powered by Disqus