logo enkisoftware
Independent game developer making AVOYD
en  fr

Devlog - Technologie du Jeu

The technology of Avoyd - voxel editor and multiplayer networked voxel octree game engine using cross platform C++, OpenGL, Runtime Compiled C++ and enkiTS.

Optimising Voxel Meshes for Games Using Blender

Doug Binks - Juliette Foucaut - 18 Sep 2023


Reducing the number of polygons in 3D objects helps improve a game's performance. This tutorial explains step by step how to clean up the geometry of voxel models in Blender to prepare them for export to game engines like Unreal or Unity.

Note you may have encountered 'polygon reduction' techniques under other names such as 'vertex reduction', '3D model optimisation' or '3D model clean up'.

This post covers the following workflow:

  1. How to use Avoyd Voxel Editor to convert your voxel model to mesh for Unreal or Unity.
  2. How to use Blender to optimise the mesh.
  3. How to use Blender to export to .fbx, and links to documentation for importing the optimised .fbx into Unreal and Unity.
Continue reading

Implementing a GPU Voxel Octree Path Tracer

Doug Binks - 23 Aug 2023


Learn from my mistakes as I implement a GPU voxel octree path tracer based on my current CPU implementation in Avoyd. I cover the C++ to C conversion, buffer upload issues and data visualisation, enhancing the shader error logging along with a basic comparison of the performance on CPU and GPU.

One can program modern GPUs in a variety of languages. However only a few of those languages work well on all the main vendors' GPUs and operating systems: essentially the C like HLSL and GLSL shader languages. Since I use OpenGL with GLSL shaders in Avoyd I choose to write the path tracer in GLSL. (Avoyd runs only on Windows currently but I intend to support other operating systems eventually.)

Continue reading

Importing Minecraft maps in Avoyd Voxel Editor improved

Doug Binks - Juliette Foucaut - 25 Feb 2021


Our Avoyd Voxel Editor has come a long way since the last devlog post about it in 2018, and having just released a significant update which enhances the Minecraft import pipeline this seems like as good a time as any to talk about it once again.


Minecraft maps Greenfield city and Cuirassé DSD-401 by MrBatou imported and combined together in Avoyd voxel editor Minecraft maps Greenfield city and Cuirassé DSD-401 by MrBatou imported and combined together in Avoyd's Voxel Editor.


Continue reading

Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial

Doug Binks - 02 Feb 2020


This tutorial takes a small DirectX11 project, the Dear ImGui Example, and adds Runtime Compiled C++ to it. This enables us to edit the code at runtime and see the results live, without recompiling and restarting the project.

This is a Windows only project but both Dear ImGui and Runtime Compiled C++ are cross platform. Thanks to Jonathan Bleeker and Milviz for funding this tutorial.

Runtime-Compiled C++ (RCC++) is a way to reliably make major changes to C++ code at runtime and see the results immediately. It's aimed at games development but could be useful in any industry where turnaround times are a bottleneck.

github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus

RCC++ is primarily designed to shorten iteration times in development - developers can build their project, run it, make changes during runtime and see the results in a few seconds.

Continue reading

Boxes in Space: procedural generation of abstract worlds in Avoyd

Juliette Foucaut - Doug Binks - 21 Jun 2019


The first part of this post describes how we use procedural generation to create environments in our game, Avoyd, out of simple boxes. It is an extension of the 'Boxes in Space' talk Juliette gave at Feral Vector.

The second part shows the trial and error process we went through to create Avoyd's procgen worlds and how we procedurally generate the light and atmosphere.

The third part consists of procedural generation demos, giving complete instructions to create the boxes in space worlds, Menger sponges, trees that avoid obstacles, and how to change the lighting and atmosphere in Avoyd. The worlds created can be saved and used in game.

Procedurally generated zero gravity, abstract voxel world. It features hollowed, coloured boxes grouped in clusters and linked by metal bridges. All boxes are decorated with greeble.

Continue reading

Procedural python word generator: making user names out of 4 syllables

Juliette Foucaut - 05 Apr 2019 - edited 17 Aug 2023


I decided to write this post after reading about a very cool procedural NPC name generator and thinking that it might be of interest to show a much more basic example. This post is intended for people who have never used procedural generation and know very little programming. The examples are written in Python. I'll do my best to keep things simple and introduce the complexities progressively.

The algorithm is basic: names are generated by randomly assembling four syllables. First I'll explain how it's built, then the features I added to it to make sure the names are within an arbitrary size range, and more importantly, unique.

Continue reading

Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary

Doug Binks - 31 Oct 2017


It's rare for me to read a blog post and immediatly put the information to use, but this post from Aras Pranckevičius, Best unknown MSVC flag: d2cgsummary is one. Within a short time I had cut elapsed compile and link times for Runtime Compiled C++ live coding with Visual Studio by 1.5x, and eventually 3x with total compile time (total time for all compile processes in a multithreaded system) down 10x. This post explains how.

Continue reading

Internals of a lightweight task scheduler

Doug Binks - 05 Sep 2015


This is the second in a series of articles detailing the inner workings and evolution of the permissively open source multithreading task scheduler enkiTS for C and C++ (including C++ 11). In the first article of this series I covered the external interfaces and their implementation. This post will cover the task threading function, running tasks, and waiting for tasks.

Image of Avoyd with thread and task activity. Figure 1: Screenshot of Avoyd being profiled with microprofile and ImGui integration available in enkiTSExamples. Solid bars above named tasks show when threads are active - the wait functionality allows the core to idle or other threads to run.

Continue reading

Implementing a lightweight task scheduler

Doug Binks - 22 Aug 2015 - edited 28 Jun 2019


This is the first in a series of articles detailing the inner workings and evolution of the permissively open source multithreading task scheduler enkiTS for C and C++ (including C++ 11). The interface has evolved somewhat since this article, and whilst I've made minor changes to update it, keeping it fully up to date is difficult, so please check out the full code on github.

If you're writing a compute intensive programming task on consumer hardware, and you want to use as much of the systems resources as possible, then you'll need to consider multithreading on the CPU. There are a number of ways to approach this, but the current gold standard approach for developers who want both simplicity and control is a task scheduler which can handle data-parallelism (in the games industry a task is often referred to as a job). Task parallelism allows you to run different types of computation at the same time, whilst data-parallelism enables you to run the same computation over a set of data across different threads at the same time. Note that I won't consider Single Instruction Multiple Data (SIMD) parallelism here, but if you're doing computations you probably should. Additionally, I won't cover multithreading methods for handling large latency, such as waiting on hard disk or socket transactions.

Avoyd being profiled using the enki Task Scheduler microprofile. enkiTS in our game, Avoyd, being profiled using the microprofile and Dear ImGui integration available in enkiTSExamples. This is an old image of the game and the current codebase uses newer enkiTS API features such as priorities and pinned tasks making for a much more complex task graph.

Continue reading

Normal generation in the pixel shader

Doug Binks - 31 Jan 2015


As usual, whilst working on one aspect of Avoyd I hit a hurdle and decided to take a break by tweaking some visuals - specifically looking at the normals for my surfaces. I added a step to generate face normals in the pixel shader using the derivatives of world space position [see: Normals without normals by Angelo Pesce and the Volumes of Fun wiki on Computing Normals], and immediately noticed precision issues when close to the surface. I'll demonstrate the issue and my quick fix which uses eye relative position instead of world space, before explaining what's happening in full.

Precision issues with normals from position derivatives in the pixel shader. Figure 1: The image on the left shows the face normals calculated in the pixel shader using the world space position, and on the right we take the eye relative world space position.

Continue reading

Lighting voxel octrees and procedural texturing

Doug Binks - 22 Oct 2014


In this post and video I'm going to cover the recent changes I've made to Avoyd's technology to add shadows, ambient occlusion and procedural texturing. I'll describe simple procedural texturing and its anti-aliasing, along with the use of voxel octree data to generate lighting and ambient occlusion using ray casts and 3D textures in the game Avoyd.

There's a good deal of information on all of these topics online, and they certainly aren't novel additions to a game - however in Avoyd I'm taking a slightly unusual approach so I thought it worth documenting. It's worth checking out the video before reading further.

Continue reading

Octree streaming - part 4

Doug Binks - 27 Feb 2014 - edited 27 Oct 2014


This post follows on from earlier posts on Octree Streaming. You should be able to read them out of order, but you get cake if you read part 1 first, then parts 2 and 3.



The video showcases three players zooming around at high speed in an environment being streamed from one player's PC to the other two, with the recording being done on one of the clients. This devblog post is about the steps I took to get this working smoothly.

Performance tuning is a large and varied topic, so I'm going to concentrate on one aspect which came up during development of the streaming system - framerate hitch removal. A framerate hitch occurs when one frame takes longer than most of the rest of the frames. To the player it can feel like a sudden start/stop. If frequent, the game takes on the feeling of being played on sandpaper.

Continue reading

Octree streaming - part 3

Doug Binks - 16 Jan 2014


The post follows on from the earlier post on Octree Streaming. You should be able to read them out of order, but you get cake if you read part 1 first, then part 2.

This tech update video shows off multiple players rapidly and smoothly editing fairly large sections of the environment whilst in edit mode. Materials and rendering are all still simple debug visuals for clarity rather than beauty, but there's still a fair degree of artistic freedom available. It's a real pleasure being able to carve and paint geometry fluidly in a connected online world.

Getting this to work, and work well, took a fair amount of effort and I'll explain some of the technical details here.

Continue reading

Octree streaming - part 2

Doug Binks - 14 Jan 2014


The post follows on from the earlier post on Octree Streaming. You should be able to read them out of order, but you get cake if you read part 1 first.

Our latest tech update video shows off players moving through the world shortly after joining the game - the video starts only a few seconds after where the last one ends, so about 30 seconds after loading. At this point large sections of the world are still being streamed to clients, but the prioritization of nearby regions ensures detail is present close to the player.

Continue reading

Octree streaming

Doug Binks - 12 Jan 2014


The original Avoyd stored the internal voxel representation of its game world as a standard 3D array. At the time this provided a good trade off between performance and memory for the size of levels we required for a multiplayer PvP game with a fully modifiable environment. In the new version we wanted to increase the size of worlds we could handle, whilst maintaining large view distances.

Our second technology update video shows off how the voxel octree streaming gives rapid loading over the internet.

Continue reading

LAN discovery with multiple adapters

Doug Binks - 05 Dec 2013


I was recently testing my LAN server browser dialogue menu with multiple machines running servers when I encountered an unusual issue. I had two machines, each running a server and a client. On one machine the client could see both servers, but on the other machine only the local server was found. The application had firewall permissions, and since the server was both sending and receiving packets without problem the firewall didn't seem to be the culprit.

Avoyd screenshot - user interface showing LAN discovery with two servers running on two different machines Working LAN discovery with two servers running on two different machines. Note the two IP addresses listed for Machine 1.

Continue reading
2023
 › Optimising Voxel Meshes for Games Using Blender
 › Implementing a GPU Voxel Octree Path Tracer
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
2022
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
2021
 › Importing Minecraft maps in Avoyd Voxel Editor improved
2020
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
2019
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › Procedural python word generator: making user names out of 4 syllables
 › In-game building
 › Player-deployable turrets in Avoyd
2018
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
2017
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
2016
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
2015
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Feral Vector
 › Normal generation in the pixel shader
2014
 › Python Google App Engine debugging with PyCharm CE
 › Lighting voxel octrees and procedural texturing
 › Patterns and spheres
 › Python Google App Engine debugging with PyTools
 › Interview
 › Domain masking using Google App Engine
 › Octree streaming - part 4
 › Black triangles and nervous_testpilot
 › Presskit for Google App Engine
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
2013
 › LAN discovery with multiple adapters
 › Playing with material worlds
 › Developer Diary archive
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Implementing a static website in Google App Engine
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
2002
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
2001
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready
 ›› Game Tech 
 › Optimising Voxel Meshes for Games Using Blender
 › Implementing a GPU Voxel Octree Path Tracer
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › Procedural python word generator: making user names out of 4 syllables
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › Normal generation in the pixel shader
 › Lighting voxel octrees and procedural texturing
 › Octree streaming - part 4
 › Octree streaming - part 3
 › Octree streaming - part 2
 › Octree streaming
 › LAN discovery with multiple adapters
 › enkiTS
 › Internals of a lightweight task scheduler
 › Implementing a lightweight task scheduler
 › RCC++
 › Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial
 › Speeding up Runtime Compiled C++ compile times in MSVC with d2cgsummary
 › Web Tech
 › Procedural python word generator: making user names out of 4 syllables
 › Python Google App Engine debugging with PyCharm CE
 › Python Google App Engine debugging with PyTools
 › Domain masking using Google App Engine
 › Presskit for Google App Engine
 › Implementing a static website in Google App Engine
 › Avoyd
 › Implementing a GPU Voxel Octree Path Tracer
 › Avoyd Release Streams and Minecraft Lit Materials
 › Avoyd Beta Stream
 › Isometric Render of a Minecraft Map in Avoyd Voxel Editor
 › Importing Minecraft maps in Avoyd Voxel Editor improved
 › Boxes in Space: procedural generation of abstract worlds in Avoyd
 › In-game building
 › Player-deployable turrets in Avoyd
 › Avoyd Game Singleplayer and Coop Multiplayer Test
 › Voxel Editor Evolved
 › Multiplayers toxic last hit kill and how to heal it
 › Avoyd Editor Prototype
 › Black triangles and Peter Highspot
 › Colour palettes and lighting
 › Concept art by Rebecca Michalak
 › Feral Vector
 › Patterns and spheres
 › Interview
 › Black triangles and nervous_testpilot
 › Playing with material worlds
 › Website redesign
 › First Person Editor
 › First Avoyd tech update video
 › Multiplayer editing
 › First screenshots
 › Thoughts on gameplay modes
 › Back in 1999
 › Avoyd 1999
 › Developer Diary archive
 › Back in 1999
 › ECTS 2002
 › Avoyd Version 1.6.1 out
 › Avoyd Version 1.6 out
 › Biting the bullet
 › Avoyd version 1.5 out
 › Monday Mayhem
 › Avoyd version 1.5 alpha 1 out
 › Avoyd version 1.4 out
 › ECTS 2001
 › Fun with Greek letters
 › Closer just a little closer
 › Back already
 › Artificial Humanity
 › Products and promises
 › Ecommerce
 › Explosions galore
 › Spring fixes
 › Open source and ports to other operating systems
 › Avoyd LAN Demo Version 1.1 is out
 › Thanks for the support
 › Avoyd LAN Demo Ready