Thinking Inside The Box

I was planning on working on the Roguelike Platformer for one more day, but after spending just one day away from this project, I have already rekindled my motivation! There’s something cathartic about starting a blank project and having to build up all the boilerplate code for basic functionality. It really makes you appreciate how far you’ve come in your existing projects. After yesterday’s dev log, I was so ready to jump back into the Voxel Engine / Editor that built out a feature I’ve been dreading for awhile now. Let me show you!

If you’ve pledged to the Subscriber tier or higher on my Patreon, you can download this build right now!

Day 11’s Progress

What Did I Do Today?

Selection Tool

One of the more powerful features from the early Voxel MMO prototype was the Selection Tool. This tool allowed you to fill, delete, cut, copy and paste voxels you’ve selected. It was a bit unruly back then, however, as moving and resizing it had to be done with keyboard shortcuts. Today I’ve re-implemented this awesome tool in a much more user-friendly way!

Implementing the widget-style controls was by far the hardest part of this feature. It took me a good bit of trial and error to get something that worked reliably. Once you select the tool, you can drag a starting box the same way you can with the pencil tool, but this time the box will remain after you stop dragging. You can then grab one of the 8 corners and adjust its size along the plane perpendicular to the face you’re manipulating. You can also move the entire box at once by clicking anywhere in the middle and dragging.

Selection Tool Widget

Selection Tool Commands

Once I had the Selection Tool working, adding functionality was incredibly straightforward. All of these commands are invoked by keyboard shortcuts for now – I’ll probably add some on-screen buttons for them at some point in the future. Here’s a list of what it can do so far:

  • Insert – Fill Selection
  • Delete – Delete Selection
  • Home – Paint Selection
  • Ctrl + X – Cut Selection
  • Ctrl + C – Copy Selection
  • Ctrl + V – Paste Selection
  • End – Clear Clipboard

Finally, I hooked the voxel preview up to the clipboard so that you can see what you’ll be pasting and position it accordingly. I eventually want to add support for rotating, flipping and mirroring what you’ll paste, but for now this is pretty good.

Copy / Paste Command

Minor Changes

Since I added the Ctrl modifier for clipboard commands, I had to remove it from the flight controls. You can still raise/lower yourself with Q and E, but let me know if there are any other keys you feel would work well for this feature.

Burning got back to me with a lot of bug reports today, so I took some time to fix some of these. Placing/removing voxels on or near ramp blocks should no longer cause unexpected results, and I fixed a small bug that was preventing scenes saved in Day 9’s build from loading.

I also added a VFX toggle, which will disable all of the image effect shaders such as bloom, depth of field, vignetting, etc. Eventually I’ll add a panel where you can toggle these things individually, but for now this will have to do.

What’s Next?

There are a few more features I’d like to add to the Selection Tool and in general. Being able to flip and rotate with the Selection Tool is pretty high on the list. The old Voxel MMO had a nice Extrude feature which let you draw a complex shape and then extend that outward, which is something that will be very useful for complex builds. After that, we’ll see what needs to be done. I’m trying to avoid adding unnecessary features like VR support or multiplayer at this time. I really want to, but they’re not core to what the editor needs. That’s it for today, thanks for reading!