Jump to content
  • Advertisement
Sign in to follow this  
bioxx

Should I use a database for...

This topic is 2545 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So first off some background. I'm using c# and have been toying with Microsoft sqlce 4.0 while and I'm ready to implement it in my main project. My project is a hacking sim game that generates a large amount of data procedurally. I need to keep track of a lot of detailed data about people such as date of birth, their SSN, home address, as well as in depth filesystems located on virtual computers.

I have a lot of referencing going on between classes to keep track of things such as who owns a particular computer, or who is the owner of an email account. In many cases I have circular references. I had been saving the data using a binary serializer, but the save file size was beginning to get far too large for my liking. Also loading the data caused the application to use >1.4GB of RAM. To get around this I tried to implement protobuf-net to make it faster and more optimized. Unfortunately, i kept having trouble with all of the references involved and couldn't get the data to load.

Now my idea here is to use a local database and save all the data to it. And then while playing, the application can just get the information that it needs by requesting it from the database. Am I over thinking this or is this a good idea?

My other thought to deal with the abundance of references is to remove the references all together and instead to give every object a unique id which I can then use a List.Find() to locate. Now obviously this won't be the fastest method, but would it be on par with a database solution?

Thanks for any input!

Share this post


Link to post
Share on other sites
Advertisement
I figured as much, thanks for the input. Now to spend 6 months(because i'm lazy) building the database to encompass all my data.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!