For today: A bit of level design and why CSG is awesome.
For our prototype we needed a little level to test our movement code in.
So I came up with this:
For the movement prototype we needed to cover a lot of things. Ramps that would be stairs at some point, gangways that would be walkways in the sky later. And it had to be done fast. So I devised a quick blockout of some of these features so we could test if what we had in mind would actually work out and be fun.
I made this with a tool called SabreCSG. It’s a tool to create level geometry with a method called Constructive Solid Geometry. It’s fast and it’s easy.
Also I’ve got a strong background with the Source Engines Hammer Editor.
(that’s from a project I worked on for CS:GO a couple of years back - good times)
There are several tools like it out there. Buta lot of them are not actually CSG type tools. They are more like Unity-based mesh editors.
Which is fantastic in itself but not what I wanted. It had to be real CSG. And we simply opted for the solution that costs no money (anymore).
Using this kind of tool solves an awful lot of issues. Such as iteration over your map layout, texturing, householding with your drawcalls and so forth. It also brings problems. You’re working with so called brushes when doing CSG. There are convex primitives out of which you build your world. The tool will create a mesh from these brushes. That’s what you’ll see in the end. 3D world and all that.
However, if you just throw in brushes willy nilly you get weird meshes.
Like so. The blue lines are the brushes, from which the mesh is made (the black lines).
You might now gawp at me and be like: And what exactly is so bad about it?
It’s the vertices, man! The vertices. We got a budget, you know. And we don’t want to waste it. We can optimize that away by placing more brushes.
It looks messier now (because such is the wireframe view).
However, the count of vertices is now much much lower.
Budget successfully saved. Beans have been counted.
Next time we’ll see about making this hovering block kind of thing a proper hell taxi!
If you find this project interesting, give it a follow - you won’t be disappointed! ;)
0 comments