Hi again, everyone! This time, I'm back with yet another exciting news piece concerning the game. Without further ado...
Connecting the dots
At first, Quark Storm's levels were all built out of two objects: a cube and a half-cube. That implementation was fairly straightforward and worked decently, but after a while I realized that manually placing and moving lots and lots of individual objects made creating and editing levels a real pain.
A short while ago, and thanks to some help, I finished upgrading that system with a vertex-based level editor, complete with an extension for Unity's property inspector that let me add and remove vertexes with ease. However, a design limitation was carried over from the old implementation: the inability to do proper curves.
Up until now, all stages used hand-placed vertexes, which tended to make corners
kind of rough unless I'd add lots and lots of extra vertexes in specific positions
As you can see, making a smooth curve on the terrain would take lots of vertexes and I'd have to place them by hand, which is one of the things I didn't want to do in the first place. If I did make a smooth curve by using lots of vertexes, then editing it would be a pain due to the increased number of vertexes that'd have to be moved or deleted.
Enter the mentor
Two Saturdays ago, I was told by the staff at my local Game Work Jam that they liked what they saw, and that they'd help support the project's development. To do so, I was paired with a mentor who'd oversee the project's development: Juan Linietzky, local game developer and programmer behind a multiplatform game engine in the vein of Unity called Godot. I knew Juan from having seen him post at a local game dev forum, as well as hanging out with him during the MICSUR event at Mar del Plata earlier this year.
In our first meeting at the end of the day, we discussed that Quark Storm really needed an artist, but it was also made apparent that we'd need a dedicated level designer. Working on both the level designs and the tools behind them, I'd often end up meandering off by adding or changing tools whenever I felt like it. His proposal was simple: I'd dedicate myself to building a good set of tools for level design, and then I'd hand them over for someone else to build levels with. That way, he said, the level designer would have to get creative with the tools s/he's given rather than simply adding or editing new ones on the fly like I did.
One of the things we talked about was that it'd probably be interesting if I could actually make smoother environments. Maybe with bézier curves, he said...
The (belated) witness
Yesterday, I was routinely checking my Facebook feed like usual, until I saw something that piqued my interest. Another local game developer, Daniel Benmergui, had decided to share a video where one of the programmers behind The Witness covered, you guessed it, bézier curves!
With that simple and thorough explanation, I set out to build my own implementation of the system. To do so, I had to delve deeper into Unity's classes related to extending the editor, such as handles.
After working a few hours, my custom inspector was ready to support bézier curves. With that done, I wrote the actual implementation that created extra vertexes along the curves in less than an hour and, with that, the level design tool Mk2 was ready to roll!
When you select any vertex, the linear shapes disappear,
revealing the bézier curve system I've implemented
The cool thing about this new tool is that I can create landscapes that look infinitely more organic while using even less manually-placed vertexes than before. Win-win!
With this tool ready for a level designer to use, I wonder what I'll be doing next... who knows, maybe I'll even end up giving a hand with some concept art and screen mockups!
Anyway, to end this post, here're two screenshots of that test level running with different values used for the number of subdivisions made per curve (twenty subdivisions per curve for the first image, and ten subdivisions for the second one):