SakeTami
Cyrus Byrd
Cyrus Byrd

patreon


Toolin' Around

Happy new year! I'm Pete and I handle the majority of the programming on Compound Fracture.

This month I'm going to show some of our editor tooling, and talk about why being able to make our own little editor tools has been really useful. This is going to touch on a lot of different parts of the game behind the scenes.

As some of you already know, Compound Fracture is being made in Unity. One of the best features in Unity is the ability to extend the editor, with new tools, views, and hotkeys. The gif above is showing a really simple hotkey that rotates the selected object or group of objects 90 degrees.

The initial implementation was a few lines of code, took a few minutes to make, and has just made it immeasurably less annoying to do something as simple as rotating wall pieces (which Austin especially has done and will continue to do, thousands of times).

As another more specific example, when Austin was experimenting with the wobble effect feature (if you need a reminder, check it out here), he set it up so objects can be stacked and the wobble will propagate up the chain, like from a table to a computer case, to a monitor on top of it. Setting up this stacking is an enormous pain in the ass, and it involves lots of scrolling through the hierarchy to painstakingly drag-drop every consecutive level in the stack.

Obviously this is complete garbage, so it was an easy decision to have me take 30 minutes and make a tool to improve the workflow.

With the tool, I select the object to stack, hover over the object I wish to stack it upon, and hit Shift-G to stack it.

At this point, it's worth mentioning how these tools tie into the Unity editor, which is pretty much perfectly. As you can see below, we have our familiar drop downs, and importantly it displays the hotkey, which is good for remembering the ones you use less frequently.

The next thing I want to share isn't really an editor tool, but a utility for debugging. I can drop this into a level with a navigation graph (one of our test levels is shown below), and have it generate and display random paths for me, which is way quicker for debugging than waiting for the raptors to walk around. There's not too much to this, just moving the editor camera to give me a nice overview of the path, showing the number of points in the path (before and after processing), and then reusing the same debug view I'd already made for the raptors.

Not all the editor and workflow improvements I make are to help get things done. After implementing the new navigation graph, I bound Ctrl-N to rebake the navigation for the level, and started to constantly misclick Ctrl-B (rebake all lighting) instead. This is a problem in the bigger levels, where there are a lot of things to bake, and this holds up the editor for a few minutes.

And so, a little modal confirmation was added. It's pretty rare to bake the whole scene anyway, mostly we're baking individual objects, or baking a specific view in the editor, so this doesn't slow down the lighting workflow at all.

I know this has been a fairly dry post, so I hope this raptor-free demonstration of the fullbright editor view mode I added will brighten your day. It turns out Austin really struggles to make the dark levels properly when he can't see anything.

I hope we'll have many more exciting things to show in the coming months, so once again, thank you for all your support, and happy new year.


More Creators