spacer

Developer log of Jens Blomquist

spacer Hi,
I'm Jens Blomquist, responsible for every aspect of this game. This is my log about the adventures in the code of Blockscape.

Mesh optimization

Devlog Jens Blomquist 2013-03-20

On the fly mesh optimization:

spacer

Tweet

Limit reached part three

Devlog Jens Blomquist 2013-01-13

Finally got the CSG module (you know the one which will give us better lighting and enable me to add any kind of block type) working the way I want. It now cuts and merges any geometry I throw at it. Tomorrow I will make it fast enough to run in the world generator. If all goes well I will do a release this weekend.

Tweet

Limit reached part two.

Devlog Jens Blomquist 2013-01-08

Hi,

Actually there are a whole bunch of limits that have been reached. Here is a list:

A. Main memory

On max view distance it could use up more than 3GB of main memory. (32 bit processes are limited to 2GB but I modify the exe so that it can use up to 4GB. The problem is that 1GB is used by the OS and the framework.)

B. Graphics memory

On max view distance it could use more than 1GB of graphics memory.

C. Rendering speed

On max view distance it may have to render more than 10M vertices.

D. Block types are hard coded

The block types that we have today are pretty much hard coded into the engine. Global illumination, surface extraction from voxel grid and mesh optimization are all done on a per block basis and how the block relates to surrounding blocks.

Okay. That is not good. Why didn’t you think about all these things from the start I hear you say. Well, I did. The problem is that the solution is so annoyingly complicated that it took me almost a full year to think it through and implement. This is why I released Blockscape with the engine that we have today and then continued working in parallel with version 2 of the engine.

The good news is that this version 2 of the engine is almost ready. When I say almost I mean in a few days. Next snapshot will run on the new engine.

So how did I solve all the problems?

First I need to tell you why we have the problems and it actually boils down to one single thing: The world is made of blocks. Yes, that is right. If we skipped the blocky part and went for curved surfaces using some well known method like the marching cubes algorithm we would never have had all the memory and performance problems above. The mesh generated by the Marching cubes algorithm is very easy to work with and to optimize. But at the same time we would also have to throw away all the blocks and how we work with world. Crafting, blueprints, mining and building would be something else or not working at all. And beeing limited to only curved surfaces is not an option for me.

The solution:

1. The solution to A is voxel data compression.
2. The solution to B and C is progressive meshes.
3. The solution to D is Constructive Solid Geometry (CSG)

The voxel data compression was quite straight forward. I did some compression in the old engine and I just made more tuned version. There is still room for improvement here if needed.

Progressive meshes were a real pain because of the blocky properties of the world. And to make it work in realtime was even more pain. I spent huge amounts of time on the algorithms here and I’m quite happy with the result. Much fine tuning is still needed and I guess some of you will complain on how detail pops up when you approach new terrain. This is unfortunately a side effect of using progressive meshes and I don’t have the luxury of time (as this runs in realtime) to do very smooth transitions.

The CSG part is not working at 100 percent yet but it is good enough for now.

A positive side effect of solution 2 and 3 is that I now have access to the real surface much earlier in the pipeline and because of that I can do much better/accurate lighting in much shorter time. A bit hard to explain but you will definitely see the result. Surfaces will appear brighter and better lit. The snow for example will look more like snow and not like the “dirty” snow we have today.

The result:

We can now add any block type with any complexity we want. More bricks, slopes, bars, tiles. The engine will, using CSG, automagically combine the different blocks into a perfect mesh. The progressive mesh engine will then optimize the meshes and do LODing in realtime.

In other words: The new engine will do more stuff faster using less memory. spacer

On my machine on max view distance it currently uses about 1.5GB of main memory, about 300MB of graphics memory and runs at a steady 150 FPS.

best regards
Jens

Tweet

Limit reached!

Devlog Jens Blomquist 2013-01-03

Hi!
Back again after some days of celebrating with friends and family.

Limit reached. Yes, that is right. I always knew that this day was comming. The limit I’m talking about is the amount of blocks that the Blockscape engine can handle at the same time. And we have reached that limit.

To translate that into something that is easier to understand you can say that the maximum view distance that you can select in the startup dialog really is the max. Sure, I could do some more extreme optimization but that would only give us a few more meters or so of view distance.

So is this the end?

I said “I always knew that this day was comming” so it would be kind of stupid to not be prepared right?

Stay tuned for the next post!

best regards
Jens

Tweet

Power of 2 snapping

Devlog Jens Blomquist 2012-08-06

I have been working on models (or blueprints if you like) for a couple of days now. The first thing I noticed when I got it working was that the current way of editing the world with the power of 2 snapping doesn’t really work at all for models.
The correct to handle models is to snap them to the existing world. A bookshelf for example should snap to a wall. It should not snap to some fixed grid.
This got me thinking. Is power of 2 snapping really the best way to edit the world with the standard blocks? Or is there a better way?
The first version of Blockscape didn’t have any snapping at all. That was a disaster. Digging through the terrain turned everything into a fragmented mess. So I was very happy when I tried power of 2 snapping and suddenly digging was dead simple. This has the downside of making the building part a bit harder as you have to align your buildings with the large grid in order to use anything but the smallest blocks.
So maybe there is some hybrid editing tool that works equally good both ways?

Tweet

Screen capture software

Devlog Jens Blomquist 2012-02-20

Screen capture software that is compatible with Direct3D works by hooking into the Direct3D API. It then gets the backbuffer before it is presented to the screen. This works fine for almost every game out there… except my game. spacer
By mistake I seemed to have found the “Achilles heel” of screen capture software. Some old code loaded the PresentationCore assembly and that must have made the screen capture software confused.
This is of course a bad thing since I want my users to make videos and pictures from the game. So it is fixed in the new build.

Tweet

Welcome to my devlog

Devlog Jens Blomquist 2012-02-19

Watch this space for details about my adventures in the code of Blockscape.

Tweet
spacer
 
Made by Kim Jansson
Copyright © ioneo

Close
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.