Devtober Day #5


Welcome back to Day 5 of Devtober, in which coordinate systems make me cry, and tangible progress is finally made.

After a massive amount of work that probably could've been better spent studying for a midterm this week, I've finally managed to re-implement the striking mechanic from the demo version of Voxelsmith, giving us our first actual gameplay mechanic! Of course, there's plenty of missing features to be added and bugs to be fixed, but for now, striking is implemented, and that puts a smile on my tired, worn-down face.

"Striking" is the primary way the player will be able to manipulate voxels while smithing, and governs how voxels are added, removed, and modified. Since it's one of the game's major mechanics, a lot of design work has also gone on behind to scenes to make sure it performs well. The video I've linked with this devlog showcases the mechanic in action, so please give it a watch.

Striking works on a power-based system, in which holding down the primary action button (left-click by default) begins to build up power for your next strike. After enough power has been stored, release and quickly tap the button again to perform a strike on the currently targeted voxel. It should also be noted that the "power" value in the UI is for testing purposes only, and the player will have to build a sense of timing in order to perform the move they wish. This also allows canceling a strike to be quite easy, just don't tap again after build power.

This unique control scheme is meant to replicate the feel of actually bringing up a smithing hammer for a swing, and in my humble opinion, actually managed to get it across quite well. 

The type of move your strike actually performs is based on how much power you've stored, which I'll explain in more detail below:

  • The Precise Strike is both the lightest, as well as probably the most complicated out of your moves, as it's the only context-based one. Depending on the state of the neighboring voxels, the Precise Strike will perform one of three actions:
    • Create - Creates a single voxel ahead of the target voxel, good for carefully filling out any holes in your work
    • Draw - Removes a part of the top-most layer of subvoxels,  good for creating things like edges
    • Dish - Removes a "bowl shape" of subvoxels, good for creating things like fillers and other detailing
  • The Light Strike creates a "cross shape" of voxels in the four cardinal directions neighboring the targeted voxel. This one actually isn't that good compared to the other ones, so carefully managing your power to avoid it will be a challenge.
  • The Medium Strike creates a horizontal 3x1 row of voxels ahead of the target voxel, making it good for quickly expanding your grid's shape without wasting heat.
  • The Heavy Strike is, unsurprisingly, the heaviest hitter of the bunch, creating a 3x3 square of voxels centered on the target voxel. Unfortunately, this move also happens to remove the most heat from your grid, so it should be used wisely.

Similar to striking, "Engraving" is the system by which subvoxels can be manipulated. Essentially, you go from targeting voxels to subvoxels, and you'll only have the ability to remove subvoxels, and can't add any additional ones. This allows for finer detailing to be done without actually needing to make the voxel size any smaller.

This system takes great inspiration from some of the original designs for the Vintage Story smithing system, as well as some rework suggestions from the forums. If you're interested, feel free to take a read. One of the things I wanted most from this system was for it to be both simple to pick up, yet with enough depth that the difference between a newbie and a master smith is clear, and stealing repurposing and improving upon these ideas really helped with the design process. The "finishing move" system from the original design is one I really liked in particular, and so the subvoxel system was my answer to actually implementing it in practice, along with the context-based nature of the precise strike being inspired by the "one-button" mentality of the rework suggestion.

As Picasso once said, "Good artists copy, great artists steal," and while my design is quite close to that of my inspiration material, I think I've managed to take elements of both along with my own spin on things to make it something new instead. At least, that's what I tell myself to justify yoinking a bunch of ideas from those posts.

Anyway, moving on... One of the major challenges in re-implementing striking was utilizing a proper coordinate system. In the demo version, I was able to cheat by scaling every other object up so that voxels could be just standard 1x1x1 cube, but that opened up its own set of problems, as I figured out later. Aside from the silly scaling every object had to go through, it also meant that the anvil was, more or less, stuck to the origin point as it made the coordinate calculations the easiest. Since I plan to allow the player to rearrange the various workstations and furniture in their workshop in the future, this is, of course, a problem. Thus, to solve this problem, I had to make each voxel operate on a local coordinate system, as well as properly storing them in a matrix so each voxel could be accessed without needing their actual coordinates. This was honestly a lot more headache to get done than it probably had to but, but I'm honestly just glad it's over and working.

Also, you might have seen me reference a "heat" value earlier, and that's because managing heat will be another crucial part of forging. Each metal has a distinct forging temperature, and manipulating voxels and subvoxels are only possible when within that temperature range. More powerful strikes will remove more heat from the grid, requiring you to eventually reheat it once the temperature drops too much. Since the final product's quality is affected by the number of reheats you do, working quickly and efficiently becomes the hallmark of a master smith, and is a skill the player will need to develop over time, adding another layer of mastery to the smithing process. 

Hopefully implementing the rest of the smithing mechanic won't take too long so I can get started on the forge and heat mechanics, and from then on out, it'll be new and unmarked territory, which I'm more than excited for.

Well, this post became a lot longer than I originally intended, but I hope that this impromptu TED Talk on my game's design process was an interesting read, at least.


Anyway, that's about it for now. 'Till tomorrow,

- Ian, Lunarium Works

Get Voxelsmith

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.