Game 1 - Day 5 _ Godoting

Learning

I still plan on finishing the blueprints tutorial for Unreal, but that’s not it. On top of that I am starting in on some Godot tutorials, and plenty of ready and watching explanation on Godot concepts. I may be using a different editor but it only varies slightly from the base Godot setup - learning what the engine offers is still incredibly important.

The Clicker

Today was all about continuing with the shop, the first speed-bump I ran into, how to have a global variable that every scene can access?

The biggest need for this for me was the total points amount. I wanted a contained object (child scene, the shop) to be able to see what the total points were and then reduce the total by the cost of the upgrade.

After a bit of research and troubleshooting I decided to use Singletons, in much the same way I used a Game Instance in Unreal. It felt good to have a concept that I had learned in another engine carry over to this one - it felt like real progress.

So I created a global file to house the variables that I want different scenes to be able to access - this list is ever changing (growing and shrinking)

My biggest focus today was in Scalability. Trying to make sure that I could build out code that reused as many functions as possible for when I continue to add upgrades

Each of the blue nodes are functions which receive inputs - the idea being I can use them across every purchase - hopefully reducing the total amount of nodes, and adding some legibility.

Some of the functions:

Ultimately I’ve now created a first version of a click upgrade - tomorrow I’ll go about making sure the power can scale, and create a toggle for purchase amount.

Next
Next

Game 1 - Day 4 The Great Reset.