Storing game data in database
I am a casual programmer and have recently, since express was launched, started using SQL databases in my app. These have been very convenient to store and manage datatables etc.
I understand that with XNA we can also access other VS components, such as networking, but these components might not be available on the Xbox.
Is database integration a purely VS component or can we use it for Xbox applications as well?
[435 byte] By [
PdCNZ] at [2008-2-17]
So will we be able to use the Dataset classes for interacting with XML?
I would be really happy if this was possible. I created a state engine for my last program using datasets which made it really easy to save data and read externally for errors, as well as managing the formats and table structures.
I'd be willing to bet the only databases accessible on a 360 are those on MS's network and that through some type of Live networking API, not the regular Data namespace classes (since .NET isn't on the 360 yet

). Binary or XML files are much easier to use. What would you need a database for on the 360?
Jim Perry wrote: |
| What would you need a database for on the 360? |
|
Big tables of data :)
Specifically, large tables of information which can be queried, sorted, perhaps even joined, but not necessarily in real time. The application I was hoping to use it for was AI. With a lightweight database you can have an efficient, searchable history of AI decisions and interactions with other NPCs and the player, a memory of sorts. This memory wouldn't need to be kept in RAM, most of it could be swapped out to a disc cache if necessary and queries could happily take several frames.
The other thing that I'm interested in that isn't provided (unless Microsoft.CSharp.CSharpCodeProvider is allowed on the 360) is some sort of simple run-time scripting language, one that you can alter the script and reload while the game is running. That's not really related to the thread but it has the same problem as with the DataSets, in that under Windows you can just throw in a .dll (e.g. SQLite, Lua) or use the functionality in the full framework, but on the 360 you can do neither and, because the 360 is a special case that needs a lib to be C#-native using the CF, efficient 3rd-party libraries will be thin on the ground.
There is no reason why you cant use C# based database engines. Im talking completely code based databases, not anything that requires on System.Data, as it probrably doesnt exist.
Google SharpHSQL for an example of a code based, "embedable" database. Oh, word of warning, I am not involved with SharpHSQL, hell, ive never even used it. Keep that in mind.