by jesse__ · 2mo ago · 0 comments
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.
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 ;)
Tell me you were born after 2000 without telling me.
A younger relative asked me how a flight simulator showing a view of common flights posted here “was even legal”,
and I’ve been on watch for similar mentality ever since lol
https://en.wikipedia.org/wiki/Constructive_solid_geometry
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.
Kudos, this looks like the shaders took a long while to get right. Love the art style, keep it going!
good luck with the game btw, is there anywhere i can follow development?
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
Such a cool primitive!