Version 1.49 - Maximum Oversave


I’ve done it, I finally got the saving backend completely working.

Tragically, despite the improvements I made earlier, saving still caused awkward stuttering around the 500-word mark. Incidentally, that’s roughly how many words I’ve mastered (about 800 now!), so I couldn’t even finish my own game because it was getting too clunky, especially on mobile!

After a two-month break, I needed to take a long step back and squint at the code. I had to really narrow down how to make saving perfect—scalable to at least 1,000 elements and quick as a bullet.

I spent countless hours crafting a new solution to the saving problem. By storing each word in an individual field in Firebase, it should theoretically allow Firebase to upload only the changes. Since Firebase couldn’t store these fields in Korean, I had to create an entire mechanism to sanitize the output into English beforehand.

It didn’t work.

The sanitation process consumed too much computational power, negating any benefits of saving words as individual fields.

So, I embarked on another multi-hour journey. This time, I decided to store each word as a collection, with each collection containing a document representing one word. I’d read that Firebase can easily handle thousands or even millions of words this way.

It didn’t work.

You can’t create collections this way from Godot—something I only figured out after spending quite some time trying to make it work.

Back to the basics, I revisited my original saving schema and realized the true culprit was saving the large word database, the dictionary of dictionaries. Firebase can’t just update one element in a dictionary; it has to rewrite the entire hundreds-of-elements dictionary every save.

But then I remembered I had a second dictionary uploaded that only contained the Korean words and their associated experience points. Instead of uploading the player’s current and mastered words, could I just look at the exp_point values and reconstruct the player’s word bank?

Unfortunately, the saving structure had become bogged down with my prior experiments. Even without all that clutter, saving and loading heavily relied on grabbing the saved word bank. Still, I worked diligently to refactor it all. And by "I," I mostly meant leveraging the new ChatGPT-o1 version to handle most of the heavy refactoring work for me. The hardest part was specifying the requirements and double-checking the output, but that saved me hours of tweaking the code to fit the new schema.

Long story short,  saving and loading have never been faster. Stuttering is completely eliminated, and I refined a few other aspects here and there—some word definitions, experience calculations, particle emissions, and other boring stuff like that.

I still don’t want to spend too much time adding more features until I beat my own game, but I do have something planned soon: an overdue, elegant way to track your progress toward mastering a word. Hopefully, it’ll be ready within the next week or two if my schedule cooperates.

Files

Master 1000 Executable.zip 44 MB
17 days ago
Master 1000 HTML5.zip Play in browser
17 days ago

Get Master 1000: Korean Words

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.