Behind the scenes: how we built LateCraft, our own voxel survival game

Endless block worlds, zombies, farming, minecarts and voice chat — built from scratch by a small Danish team. How a world is made of blocks, how it gets drawn quickly, and the rail bug that took three tries.

LateCraft is the biggest thing we've ever made: a survival game for Windows and Linux where the world is made of blocks you can dig, build and shape. There are caves and volcanoes, villages, zombies, animals with families, farming, boats, cars, minecarts on powered rails and voice chat. Here is a look behind the curtain at how it works.

Our own engine

We didn't use a ready-made game engine. LateCraft is written in C# on .NET 8 and draws everything itself with OpenGL. That's more work, but it means we control every detail — and the game starts in seconds and runs on fairly ordinary laptops.

A world made of chunks

The world isn't stored as one giant map. It's split into chunks: columns 16 blocks wide, 16 blocks deep and 256 blocks high. Only the chunks around you are kept in memory. When you walk, new chunks are created or loaded in front of you and old ones are saved and let go behind you. That's how a world can feel endless.

New land is made by mathematics, not by hand. Layers of smooth noise decide where the hills, valleys, lakes and caves go, and the same seed always gives exactly the same world — which is why two players with the same seed see the same mountains.

Drawing millions of blocks quickly

A single chunk can hold 65,536 blocks, and you can see many chunks at once. Drawing every side of every block would be far too slow. The trick is that most block sides are hidden: they touch another solid block. So for each chunk, the game builds one mesh with only the faces that touch air or water. Rebuilding that mesh when you dig a block is fast, and the graphics card draws the whole chunk in one go.

Playing together, fairly

On a server, the server is the referee. Your game sends what you're trying to do — dig here, place this, move there — and the server checks that it's possible before everyone else sees it. That stops the most common kinds of cheating. One example: the server never sends the positions of ores you couldn't possibly see, so "x-ray" cheats that look through walls simply have nothing to show.

The rail that took three tries

Small things are often the hardest. Minecart rails have to join up: straight pieces, curves round corners, and slopes up and down a block. Our first curves were two straight pieces at a right angle, which looked stiff, so we made real quarter-circle bends. Then a player noticed that a bend at the top of a slope didn't quite meet the slope: there was a small step.

The reason was geometry. We drew a slope as a flat rail tilted 45 degrees, and tilting it moved its ends a little down and in from the edge of the block. The fix was to stop tilting it and instead shear it: every point is lifted exactly as much as it has moved along the block, so the rail starts at the bottom edge and ends at the top edge, at precisely the height of the next piece. Now bends, slopes and straights run into each other without a bump.

Try it

LateCraft is free to download for Windows and Linux. You can play alone right away, also as a guest on LatePals, and with a free account you can join our server and play with others. The LateCraft guide explains the keys, survival, zombies, farming and servers.

ยังไม่นอนเหรอ? คุณไม่ได้อยู่คนเดียวหรอกนะ

LatePals คือเครือข่ายสังคมออนไลน์ฟรีสำหรับคนนอนดึกและคนทำงานเป็นกะ พูดคุย แบ่งปัน และค้นหาคนที่ตื่นเวลาเดียวกับคุณ

สร้างบัญชีฟรีของคุณ