Implemented Brian's JSON Save System prior to the Weapons module

Possibly off-topic, but just after working through the “standard” Save System modules (Saving Asset Pack and Saving System), and just before starting this module, I chose to implement Brian Trotter’s JSON-based save system.

I realize that future save code will have to be adapted for the JSON-based system, but I just wanted to rave about how well-made and well-explained Brian’s (safer) alternative to the BinaryFormatter system is.

I was afraid I’d mess up my project completely trying to swap out the systems, but over a few hours I was able to excise the old system completely, and add the JSON save system with plaintext (JSON), XOR, and XOR with Base64 strategies — all thanks to Brian’s excellent instructions.

If you choose to make the switch, I echo Brian’s recommendation — source control is your friend! I branched off of my running GitHub repo for the change, then merged back to main without problem now that it’s complete.

Loving the course so far!

2 Likes

It also helps that Sam hammered in those SOLID principles. Once you’ve swapped out the system you don’t touch it again and everything else just keeps working because the substitution principle comes into play and nothing else need to even know or care that the save system is different.

1 Like

@bixarrio — I agree completely. I’ve programmed professionally for about 25 years, and I’m still learning new things about C# and general programming patterns from Sam.

The solid, extensible architecture throughout the game so far is fantastic. I’d imagine it would be much easier just to hack together something that “works well enough” for a course like this, but this is something better entirely. What’s more, the Sam et al. continue to curate years-old content to keep it fresh, actively support user questions, and provide the building blocks to take your designs further.

Many thanks to Sam, Rick, Brian, and the whole GameDev.tv team!

One of the teaching points of this course is presenting a good and extensible architecture and not just a bare minimum prototype, too.

I fully expect it to cover (or at least tackle) a number of things that come up when you want to make a game of a larger scale than just a single-scene arcade type of game.

So far I haven’t been disappointed… :grinning_face_with_smiling_eyes:

1 Like

Privacy & Terms