News

One year

written 06 Dec 2015

One year of Konstructs

When we started we inherited a lot of cool algorithms and code from Craft, but as we added things we realized that we needed structure. On top of this we also liked to tap in to the flora libraries in the C++ world. So, to make sure that this project has a bright future we decided to make a rewrite.

The stuff we use

C++ 11

Konstructs requires some fundamental technologies to run, like collections, threads and memory management. All these things is possible in C, but it adds a lot of overhead and boilerplate. In the C++ standard library there are nice collections, cross-platform threading and intelligent memory management like shared pointers.

Eigen

Eigen is a vector math library, this simplifies things a lot when calculating things in a 3d-world.

NanoGUI

To make a GUI in a 3d-context, that’s a small project in it self and luckily someone else already did it. We choose NanoGUI since it lightweight and written in C++11. It is also using Eigen and the same OpenGL wrappers as the old client did (GLEW/GLFW).

Where are we?

We started by taking a bad turn with dependency management. After using other languages like for example ruby, scala, java and so on … we really wanted a dependency management system to fetch our dependencies. We tried tree different systems Biicode, CPM and hunter. After several frustrated weeks we realized that there was a reason that no one is using a dependency management with C++. We hope that this will evolve in the future but right know git submodules as cmake subprojects works fine.

After this progress has been smooth, step by step all the functionality of the old client is rewritten in to C++ in a structured way. Where it make sense we trow out old C-code and replace it with its C+ equivalent or a library functions. Right now you can walk around in the world (which renders faster then before) but no interaction. The biggest task was to get the rendering of the chunks to work, after this was done thing has been moving much faster. Right now we are working on world interaction and when this is finished we will release version 3, a version with similar functionality as release 2.

After this it will be all about evolving the game!

Long Distance Rendering - Flying

This is with view distance set to 30, that's 960 blocks away with approximately 13 500 chunks processed!

Long Distance Rendering - Sunset

Sunset!

You can follow our progress over at PR #103

Written by Petter and Stefan