devlogs
media
characters
links

PERSISTENT DATA ACHIEVED!!!

DEC 3, 2025 @ 12:51AM

For my first official devlog, I am sharing one of the biggest milestones of the game that definitely proves to myself and to you all that this game is totally feasible. I was able to conquer the challenge of persistent data.

"What is persistent data?" some of you may ask.

Persistent data is a fundamental part of any game that basically has more than one scene or map. Any game you've played that had you leave a room and enter another or that loaded a new screen has persisting data.

Like the name suggests, it refers to data that is carried over from one scene to the next. You see, by default, every scene is loaded as if you're loading it for the first time. In order for the player to retain, say, items he has picked up from one map to the next, you must make the element that is carrying the item data persist or stay between scenes, effectively "remembering" that you picked stuff up, because, well... it never forgot.

That part was easy. YouTube has a multitude of tutorials for different methods of persistent data. My personal challenge was making sure that every farm plot in the player's farm loaded exactly as it was left; from whether it's been tilled, watered, and to what stage of planting it's in.

And unlike other data that can be retained in a few countable variables like one for each item slot in my inventory, there were 300+ farm plots in my sample farm scene (which is expected to still grow by the time the game finished), and I'll be damned if I had to manually define hundreds of variables for each farm plot. And each farm plot had many data to store! Like I said, some bools like if its been tilled, watered, and what plant it holds, and what stage it's in... Times a few hundred? No thanks.

I'm not sure how other games do it, and I might as well be doing it the hard way, but I found a way that worked for me!

the solution:

What I did was: every time the player left the farm, a farm save function would run, creating a list for each piece of information. A list of bools (yes's and no's) for if it's been tilled, another for if it's been watered, a list of integers for the stage of the plant, etc... And each list was automatically numbered from the first farm plot to the last in their respective farm plot number or ID. And when the player came back in the farm, each farm plot would check all the lists and take the values for all the items on each list that matched their farm plot number or ID.

I know I am over explaining, but I was so excited when I typed this away and it worked. Now, bask in the glory of it working seamlessly.

Now that the farming fundamentals have been worked out, I can move on to building the world more. Onto more visuals and graphics!

I have been so happy to share my journey with you all so far, and I am excited to share even more in the near future. Your support means the world to me.

thank you for reading, and until next time...



let's meet again

PROBLEMS LEFT BEHIND
need to find out how to write to json...
next task
to create more maps and locations