Devlog 1: Finished building game time system, farming system and save system
Progress
I’ve finished three systems in the past 2 weeks: a game time/day&night system, a farming system and a save system.
The game time system went much more smoothly than I initially thought. The basic idea is that for every real world second, the game time goes by \(N\) seconds, where \(N\) is currently set to 64. So for a working day of 20 hours in the game (from 6am - 2am), it would take \(20 \times 60/64 = 18.75 min\) to complete.
Once we have the game time system, I implemented two different methods to achieve the day&night system: first method is to use a directional light, the second method is to use a CanvasModulate and a gradient texture. The second approach gives me more control, thus I decided to keep the second one.
Once I have the game time, I can go ahead and grow some crops. This part is more tricky since it needs the previously implemented components (player, collectable scenes, inventory/hotbar), new animations (tilling soil and watering crops), new tilemap layers (tilled soil) and a growth cycle component and new harvestable scenes to show the growth of crops. I managed to put everything together for this first version. But I expect to make some improvements to the current system later and add more crops.
The last system I implemented is a save system, which can save the state of the game on file and re-load the game. It’s not super important for the gameplay at the moment, but I want to have all the necessary components there and ready so that when I add new systems, they can be integrated to the save system fairly easily.
TODO
I’m not ready to show any pictures or videos of the game since I’m using other people’s assets. I’m still working on my pixel art skills, even though it’s a slow and tedious process. But I’m working on it, and it will be done. I hope by the end of this year, I can create a map using all my assets (at least for the environment) so that I can have some videos ready to show. Here is one of my recent drawings (pixel-art really looks best when zoomed out, smh).