Farmin a Bit

Forgot to update anything last week, I went from a primitive UI with one square of soil and separate buttons to grow a crop-

Farmer Dog by Derek Powazek on Flikr

-to a primitive UI with four squares of soil and separate buttons to grow a crop!

To be fair, this was actually a big step under the hood, the previous version was hardcoded and only grew a specific node in godot. However, I had two goals when expanding to four whole squares of farming:

  1. Rework the two basic nodes into a hierarchy, where nodes have specific responsibilities. This means that instead of just a game node with a control and a crop node, I now have a proper garden node that holds and controls the squares. This eventually means I can expand to any number of squares of soil, I just did four for my test. Additionally, I now have a soil factory node, which was the actual trickiest part of this version, because godot didn't care about my factory-made soil nodes at all, until I told it to care (which I didn't originally know how to do).
  2. Make the soil clickable, and reflect what state the soil is at on the UI buttons. This wasn't quite as bad as my factory soil, but there was a bit of trickery since I couldn't directly wire up the factory-made soil to my other godot scenes. Basically, each plot gets a "clicked" signal, and that gets wired to a method in the garden node. The garden node sees this and tells the game that the clicked plot is now the new target. The game then checks what state the given plot is at, which it can do since non-primitive godot objects are passed by reference. I'm pretty sure, anyway.

Visually it looks very much like before, but with four squares and some more interactability. This was pretty much an under-the-hood upgrade.

That being said, I have no idea where to expand from here. Maybe I figure out how to make different plants work, with different growth speeds or different appearances. But I'll probably reference this proof of concept later for the actual farming game, I have that feeling that things already could be changed up a bit.