Managing All That Sweet Sweet Data

This is going to be a very technical post so you’ve been warned 🙂

Perhaps the task I spent the longest time on so far was figuring out exactly how to store and manage all the data for all the things that would be in this game. I spent a lot of time working with sql databases, excel sheets, and JSON but nothing was as “clean” and fluid as I wanted. Using an SQL database added a dependency and competency layer I didn’t want to add. Using excel was too cumbersome, hacky at times, and not as easy to edit. JSON suffered from the same issues. It was after a lot of research that I stumbled upon Unity’s Scriptable Objects. This has been a god send and I’ve been using it to manage my entire data layer.

 

Some examples of my data layer using Scriptable Objects

 

In addition to these amazing things which hold all my data, I’ve been able to keep them all organized using something called Odin. With Odin I am able to serialize dictionaries which lets me put all my Scriptable Objects into logical containers. I put all my Card objects into my Card dictionary, and all my Unit objects into my Unit dictionary.

Organizing my data using Scriptable Objects and Odin dictionaries has been the most effective and flexible approach I’ve seen yet when it comes to managing data. So if you are ever developing a game and using Unity, be sure to tap into the awesome power of Scriptable Objects!

I'm the guy making Grrbls.

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.