Twig gains [Basic Crafting]

Blog Header Image

This week Twig gained the ability to select tables to craft, place them, and build them!

Mistakes Were Made…

The mark of a great software system isn’t that it was built perfectly, but that it can easily be refactored to get closer to perfection! With that in mind, I have to amend the last post! There was a nasty bug found that allowed overlapping furniture in rare occasions. The bug still exists, but it occurs much less often and I have a solid idea of how to eliminate it. In the process of debugging, I ended up cleaning the grid placement system.

Without going into too much detail: BP_PlaceableGrid no longer has three modes. Instead, the grid and cursor (previously “ghost preview”) can now be turned on and off independently. This let me also pull code related to spawning out of the grid and into the crafting menu.

Did I mention crafting?

[Basic Crafting]

Inventory

Finally Erin can carry her weight! Or at least some wood. A basic inventory has been added to Erin and the Inn.

Crafting Menu

The new crafting menu constructs a list of items from a table of recipes (shown below). As items are selected the grid cursor updates to show the new mesh. When confirmed, the item is spawned at the cursor location (still applying those tiny random offsets and rotations!).

Item Ingredients
Round Table Wood: 4
Long Table Wood: 6

Buildables

Now.. rather than let the player just select an item from a menu to place it (boring!), they are spawned as mere blueprints that must be crafted further. The current building implementation is that each interaction takes an ingredient from your inventory to help build the table. Once the table has all of the required ingredients the blueprint disappears completely and the table is built! In the future I want to have several variations. For example, a particularly difficult table might require specific tools and minigames to finish building.

Building Stages

What’s next???

Check out the new Trello board to see what I’ve got planned. Currently it’s pretty sparse, but I’m continuously moving ideas from the roadmap document to the board. In general, next week I will be working on some sort of ultra-basic gameplay with guests now that the Inn tables can be arranged.

As always, check out how the orangeblue juice is squeezed during my daily dev streams on Twitch!