XaiJu
thinmatrix
thinmatrix

patreon


Homegrown 0.3.3 - Tool System Update

It's been an intense month of programming! In preparation for adding more content to Homegrown I've be reworking a lot of the tool system to make sure it has support for all that I have planned. Hopefully it's now more flexible and easier to use, both in terms of gameplay and future development.

Gamer Tier+ patrons can download and play Homegrown here. 

And for Programmer Tier+ patrons the code is available here. 


Tool System

The main changes and additions are as follows:


Code changes

There were also some big restructuring changes in the code that I thought were necessary in order to make the tool system more flexible:

Component based architecture

The biggest change is that I've got the items using a component based architecture now. This allows items to have many different functions and purposes, instead of just one. The easiest example of this is that the compost heap now accepts any items that have the "compostable" component, regardless of what else that item can do. E.g. you can now compost your vegetables if you want. Previously, being "compostable" would have had to be the sole purpose of the item.

This new system opens up many more possibilities for future content and more interesting items!


Objects can provide functionality

Up until now it was the tools themselves that provided all the functionality for interaction with objects in the world. For example, equipping a watering can would open up the "watering" tool, which had functionality for watering tiles and for refilling the watering can at the well. The well object itself provided no functionality.

For some of the features I've got planned in the future it seemed like this system could be a little bit limiting. Just as an example, say I decided to add durability to the tools in the future, and then added a "tool sharpener" object that you could place in your farm that could be used to repair your tools. With the old system, the functionality for this repairing would have to be handled by any tool that wanted to use the tool sharpener (and that could be multiple tools!).

So I changed things about a bit and allowed objects to provide their own functionality and to define which items they can interact with. To use the same example, the tool sharpener object would provide the functionality to repair the items, and would accept any items that have the "durability" component. The tools wouldn't have to be updated at all.

You won't notice this change in the game much at the moment, but in the future it will make it much easier for me to add objects that use or process items in some way.


New Items

On top of everything else there are a few new tools available in the tool shop, as well as a new collectible trophy!


Coming Soon...

Sticking to a similar theme, I'll be reworking the item system next. I'm going to be implementing an upgrade system which will allow you to spend coins on improving and customizing your tools, instead of always having to buy new ones.

Finally, sorry that there isn't a new devlog video yet! This update was very code-heavy and I decided to just knuckle down and power through it without having to film anything. I'll do the same for the item update next week and then make an update video showing a summary of these two updates together.

Thanks as always for the support!

Karl

Homegrown 0.3.3 - Tool System Update Homegrown 0.3.3 - Tool System Update

More Creators