I've been working on a voxel game engine called Bonsai for ~10 years.
Probably the most interesting thing about it at the moment is the editor. The world, and most things in it, are represented as collections of SDFs. More accurately, they're density fields, but, potato-tomato.
Bonsai has undergone a large rewrite over the last couple years that's nearing completion. A world edit is defined as a bunch of SDF parameters which get projected/rasterized into the voxel grid by a shader on the GPU. One neat thing about SDFs is they've been thoroughly researched and documented by a guy named Inigo Quilez, and they have a lot of nice mathematical properties. For example, you can do a smooth union of arbitrary SDFs to get nice rounded contours where shapes join.
I've written every system from scratch, all the way from the memory allocators and font rasterizer to the collision detector and simulation loop. I even wrote a metaprogramming language as a replacement for C++ templates, which is a whole other story. IIRC the only external dependency is the C runtime library for starting the process and my very occasional use of variadic functions arguments.
For a long time, an explicit non-goal of the project was to ship a game. It sounded insane to me to write an entire 3D engine and then ship a game. As it turns out, I've gotten it to the point where I can actually make a game. I've got a start on the game systems in a closed-source repo, and hope to have a steam page for it by the end of the year.
I'll do some shameless self-promotion and leave some links here for anyone interested in looking at the engine, language code, or some pretty pictures.
Definitely interested in where you take things with the actual game - the engine looks really cool. It seems like we're in the midst of a bit of a cambrian explosion around "survival games descended from Minecraft" (Hytale is top of mind, but there's also Vintage Story and iirc there's a few others of note either in early access or development). Not that a voxel engine can only do a Minecraft-like - but there's definitely a market for someone who wants to take that formula and run with it.
Yeah, it seems enough people have done enough work on voxel engines now that we're actually starting to see games proliferate. I'm stoked about it!
I'm a lot less interested in minecraft-style survival games than I am in exploring .. other .. types of games that push the medium further. Most voxel games that make it to release basically boil down to 'hack-n-slash RPG with a lego world'. As you mentioned, it's obviously a successful recipe, but I feel like it's barely scratching the surface in terms of how far the underlying tech has come.
I've got a game in-flight where the primary mechanic is modifying the environment to achieve a goal. Teardown is really the only other game that's made it to market and done this. The mechanics are going to be intentionally simplistic .. it's more of an existence proof that a deeper game could exist and people are interested in it.
What would you say its defining features are? What makes it different than Minecraft? Seems like its probably more performant.
Whats the license situation. I see your own license which sounds maximally permissive but written by you. Is that just how it works? I can do whatever I want with that license? It doesnt need to be a “real” license?
Maybe your bonsai logo should come from your voxel engine instead of pixel art?
Idk why but my first thought was somehow that i misunderstood “voxel engine” when i saw the pixel art.
I'd say the defining feature is the editor and terrain generation system. At the moment it's not well documented, but once the big rewrite I've been working on has settled I plan to take some time to make tutorial materials.
As far as the license goes, I chose WTFPL originally because I figured it would dissuade 'real' companies (with legal teams) from using it. I've since thought about changing the license to something permissive that might play nice with legal teams, like MIT. You can do whatever the fuck you want; it says so right in the license ;) I'd actually love it if people used it. My intent now is to keep the engine open source, and build games with it in closed-source repos.
You're right, I should change the logo. It's on the todo list .. it's just a really long list ;)
SDFs are the future at least when it comes to level design - especially because they have that "subtract" railgun cone of death functionality baked in. A boss fight feels different, if where the hammer comes down there is a crater afterwards.
If you are trying to rapidly iterate a level layout, nothing comes close to the power of a hierarchy of CSG brushes. You can change one parameter and have the work of an army of artists executed in milliseconds.
These are SDFs? - The problem is though to do level of detail with these functions. Like you have to add interpolation rates to the various subfunctions - and distancevalues to them.
I actually convert the SDFs to voxels and render triangles, but.. some people have written direct SDF renderers. There's a guy that posted to YouTube not too long ago that wrote a really cool one with physics and everything
omg you're the poof guy!! i really like trying to shove metaprogramming systems into C and poof is one of the best i've ever encountered!! it's so damn good!
good luck with the game btw, is there anywhere i can follow development?
Wow, high praise! Thanks :D I'm slightly biased, but I tend to agree with you; it's actually the best metaprogramming language I've ever used. JAI is probably better, but I haven't sat down and done a real project with it yet.
As far as following development on the game .. I'll probably start doing marketing when I've got enough for a trailer. I'll announce updates on Discord and Youtube, if you'd like to follow along there
Probably the most interesting thing about it at the moment is the editor. The world, and most things in it, are represented as collections of SDFs. More accurately, they're density fields, but, potato-tomato.
Bonsai has undergone a large rewrite over the last couple years that's nearing completion. A world edit is defined as a bunch of SDF parameters which get projected/rasterized into the voxel grid by a shader on the GPU. One neat thing about SDFs is they've been thoroughly researched and documented by a guy named Inigo Quilez, and they have a lot of nice mathematical properties. For example, you can do a smooth union of arbitrary SDFs to get nice rounded contours where shapes join.
I've written every system from scratch, all the way from the memory allocators and font rasterizer to the collision detector and simulation loop. I even wrote a metaprogramming language as a replacement for C++ templates, which is a whole other story. IIRC the only external dependency is the C runtime library for starting the process and my very occasional use of variadic functions arguments.
For a long time, an explicit non-goal of the project was to ship a game. It sounded insane to me to write an entire 3D engine and then ship a game. As it turns out, I've gotten it to the point where I can actually make a game. I've got a start on the game systems in a closed-source repo, and hope to have a steam page for it by the end of the year.
I'll do some shameless self-promotion and leave some links here for anyone interested in looking at the engine, language code, or some pretty pictures.
https://github.com/scallyw4g/bonsai
https://github.com/scallyw4g/poof