Data storage.

Hi folks.

This game I’m working on at the moment has a need to store data. Lots of data. It isn’t actually anything to do with buildings, but imagine storing every address in a small town. And the size of the garden, and the colour of the fence, and the size of the letter box. Blah, blah. Hopefully you get the idea.

During play, at timed intervals, changes to the game assets will have to be sent to the back end. Thankfully it’s a slow paced game and you can only change one asset at a time. Although there will have to be a class running which will update every asset constantly during game play.

I’m not worried about the updating, this will be handled with a queue and careful timing so I don’t slow the game down. Where I’m not sure is how to store the data.

It’s a windows game, so I have all the lovely PC options, but XML is horribly slow, I don’t really want to use a local SQL server, ini’s and text files are a pain in the backside.

Has anyone out there had a similar problem to solve, or have any suggestions?

Many thanks.

Sqlite.Net works awesome with MonoGame. There are also more advanced options like Akavache. I’d recommend you wrap your storage layer in a repository pattern, which would allow you to easily swap out frameworks as you explore different options.

Cheers!

For this case, it does sound like Sqlite would be a good choice. It is self contained, no separate server (remote or local), and it will do everything you need.

Sqlite is not a separate install either. It is just a library you add to your project.

Cool beans, cheers folks.

I’ll have to put my SQL head back on.

Thank you.

You can download my freely available SQLite Data Access Layer from the following thread on this forum…

Database for Game Developers Thread