Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (10 posts)

Xbox Database Question

Last post 2/3/2010 8:45 PM by Kevin Gadd. 9 replies.
  • 2/3/2010 6:29 PM

    Xbox Database Question

    Hello everyone. I have a question regarding the use of a database when creating games for the Xbox. I have searched the forums and haven't found a satisfactory answer.

    I am writing a soccer manager game for the 360 and will need to have a very extensive database to hold hundreds of teams and thousands of players, attributes, etc. What kind of database can be used on the 360? Any help would be greatly appreciated.
  • 2/3/2010 6:30 PM In reply to

    Re: Xbox Database Question

    None, unless you want to write your own. If you'd bothered to do a 2 second search of the forums, you might have found posts like this.
  • 2/3/2010 6:33 PM In reply to

    Re: Xbox Database Question

    You could use Arrays :P
  • 2/3/2010 7:28 PM In reply to

    Re: Xbox Database Question

    Jim Perry:
    None, unless you want to write your own. If you'd bothered to do a 2 second search of the forums, you might have found posts like this.

    Maybe it's me, but I don't see how a 2 second search looking for database options would pull that up. Thanks for your 'constructive criticism'. Guess i'll write my own...
  • 2/3/2010 7:34 PM In reply to

    Re: Xbox Database Question

    Paulygon:
    Maybe it's me, but I don't see how a 2 second search looking for database options would pull that up.

    Yup, it's just you, because that's exactly what I did. :\
  • 2/3/2010 7:42 PM In reply to

    Re: Xbox Database Question

    People don't search, ever. There have been several requests concerning databases, even a few already this week. Anyway...

    There are a few things you'll want to consider if you try and write your own. If you only ever need to read from the DB, you could use an XML file and query it using LINQ or Xpath. It may not be the fastest route and could create a lot of garbage, but its an option. The advantage here is that the DB will be deployed with your game to the TitleLocation, so you don't have to worry about managing storage devices.

    If you need to update the DB as well (a reasonable request) you will need to maintain it on a Storage device, which will be a bit trickier. You'd have to ensure for every read and write that the device is connected and manage disconnects, that sort of thing. It can get pretty complicated fast.

    If you have the memory available, something similar to the arrays approach above might not be a bad compromise. You could load your stats DB in memory and only perform searches and modifications to the in memory version. This way you have to worry less about storage devices (though you will still need to save once in a while).

    My curling game has a DB of possible computer shots based on various match criteria, and I found the in memory approach to be fastest and easiest for me to manage. I don't have more than a few MB of data, and the structure is pretty specialized, so it may not work for everything.
  • 2/3/2010 8:08 PM In reply to

    Re: Xbox Database Question

    I think 2 seconds might be a bit much myself http://www.bing.com/search?q=site%3Aforums.xna.com+database

    Someone was converting a SQL implementation to 100% c# so it would run on the 360 but I don't think the project ever got released.. I'll try to track down the author.

  • 2/3/2010 8:23 PM In reply to

    Re: Xbox Database Question

    dadoo Games:
    People don't search, ever.

    Not a valid excuse! That big textbox and button marked "Search Forums" is up at the top of the page for a reason! :\
  • 2/3/2010 8:41 PM In reply to

    Re: Xbox Database Question

    This is a SQL implementation in C# http://code.google.com/p/csharp-sqlite/ - it needs work to make it run well on the xbox due to garbage collection issues.

    Kevin Gadd (http://twitter.com/antumbral / http://www.luminance.org/) did some work on it and his version can be found here http://code.google.com/p/fracture/source/browse/#svn/trunk/Squared/XNASQLite - don't expect any support on it though.
  • 2/3/2010 8:45 PM In reply to

    Re: Xbox Database Question

    The ZMan:
    This is a SQL implementation in C# http://code.google.com/p/csharp-sqlite/ - it needs work to make it run well on the xbox due to garbage collection issues.

    Kevin Gadd (http://twitter.com/antumbral / http://www.luminance.org/) did some work on it and his version can be found here http://code.google.com/p/fracture/source/browse/#svn/trunk/Squared/XNASQLite - don't expect any support on it though.
    Feel free to drop me a note if you have issues with it, actually. I can't provide support for csharp-sqlite itself, but if you find issues or problems with my fork I might be able to help you out (since I'm using it in my game).

    The Squared.Game.Serialization stuff in that same project (Fracture) uses it to provide a generalized serializer sort of like XMLSerializer. I use it to store levels.
Page 1 of 1 (10 posts) Previous Discussion Next Discussion
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG