Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I can't seem to find any articles or threads about creating save games. I'm fairly confident and proficient at creating databases, but I�ve only ever created them for business applications, where you don't necessarily have to store the entire state of a world, usually just a point in time or a status.

 

I'm trying to create a database, (and I'm planning on using a SQL Server DB as a save game structure for initial development, so that its easier to change data structures, then replace it with a custom save game format.), for a 3d isometric strategy game similar to X-Com, Jagged Alliance, Fallout Tactics etc.

 

So I started with an Items table, and then a series of itemtype tables (Itemarmor, ItemWeapon, etc; these tables are linked to the items table), and then an iteminstance table that stores the quantity of each item and its location (bases, missions, etc.). I'm also trying to create a structure that is reusable and generic, so that I can use it for other projects/ sequels. I was thinking about having 2 databases, one with all the properties (i.e. for weapons: Weapon range, weapon damage, etc), and then the other would be the actual save game, with details of iteminstance quantities and locations. I also have research, production, and personal (soldiers, scientists, etc) tables.

 

What I want is some feedback on my designs, and a place to discuss these concepts with other people who would have an interest in sharing such a design... I�m on my 3rd iteration now, and I�d like to get it right, I think that working with other people would help to find design deficiencies�

 

Please reply/ email me if you�re interested.

 

thanks

 

Sam

Posted
I imagine most save game files consist of a linear set of binary instructions to recreate the map, thereby reducing file size and the time needed to save and load each game. A database would be far too bloated for such a task.

 

Its not a map I'm trying to save in the database, its the game information.

 

And the database is an intermediate development step, not a final solution.

Posted

It sounds to me like you've got a basically hierarchical set of containers and items within those containers (items can be containers themselves). For example: a world, bases in that world, items in those bases, people in those bases, etc.

 

Rather than a database I'd suggest using an XML document as your 'development' save file. I've found this to be useful for two reasons:

 

1) Its human readable and easily tweakable by hand to test different scenarious.

2) Its a cinch to convert/write alongside a persistence system that writes to an XML file to a persistence system that writes to a custom binary file and just change the mechanism used based on debug or release modes.

Posted
It sounds to me like you've got a basically hierarchical set of containers and items within those containers (items can be containers themselves). For example: a world, bases in that world, items in those bases, people in those bases, etc.

 

Maybe XML will work. I hate XML so much though. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...