Big Update


Big Update

introduction

For this dev log, I’ve finished adding all the player action mechanics and introduced the plant growth system. I’ve also implemented the store and day/night transition scenes, but both came with major issues during development that I’ll break down below. Additionally, I’ll explain why animations for the actions are unlikely to be added.

Actions & Growth Mechanic

I’m grouping these two features together because they both use the same script, and the way they interact made it more efficient to handle them in one place.

Actions

All four core actions—Hoeing, Planting, Watering, and Harvesting—have now been added. Players can activate them using number keys 1 through 4 (in that order).

Originally, I planned to include animations for each action, but I ran into persistent issues where the animation triggers wouldn’t fire. I spent a lot of time debugging this but couldn’t get it working reliably. For now, I’ve decided animations aren’t essential to the core gameplay, so I’ll only come back to them if time allows.

Growth Mechanic

This system caused a lot of headaches. I spent several days trying to get it functional. Eventually, I realized that too much was happening inside the Update() method, so I refactored the script by moving key logic into a separate class at the top of the file. After that, the growth mechanic started working properly. Now plants grow over time and can be harvested.

Store & Transition scenes

I’ve created a separate store scene and wired up the logic to allow the player to buy four items:

  1. Med Packs – Restores health in combat. The player only has a limited number, so they’ll need to keep restocking.

  2. Health Upgrade – Increases max health. The cost doubles with each purchase.

  3. Attack Upgrade – Increases attack power. Also doubles in price on each buy.

  4. Seeds – Required for planting. This adds balance by preventing the player from filling every tile with crops on Day 1.

The pricing system is designed to prevent the player from becoming overpowered too early.

I added two transition scenes—Day to Night and Night to Day—which serve as a break between gameplay segments and display important data from the previous cycle. These scenes are essential to the game loop and help pace progression. The transitions work by recording key stats from the day or night, showing them, and then letting the player continue. I’ll include screenshots here to show what they look like:

Day Transition

Day Transition

Night Transition

Night Transition
The Major issues

The biggest challenge this week came from how I handled scene changes.

At first, I tried switching the store and transition scenes to UI panels instead of full scenes. This caused null reference errors in the Scene Trigger script, which interacts with the Stats script. Because the panels didn’t load the same way as scenes, I couldn’t reliably test or trigger certain mechanics, especially the night transition.

After a day of trying to make panels work, I reverted back to using full scenes—which fixed most problems. However, now when I return from the store scene back to the level, the game spawns a duplicate player character.

I suspect the issue is with how the stats script persists between scenes, and possibly how objects are being marked with "Don't Destroy  On Load" () I’ll need to re-examine how my player and stats systems are structured to figure out what’s causing the duplication.


notes:

Next steps:

  • Fix the player duplication bug and clean up the stats script.

  • Fully test combat to ensure it plays as expected.

  • Add UI elements to better communicate game state to the player.

Leave a comment

Log in with itch.io to leave a comment.