Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a game which shall consist of several level packs (and also be extended by additional level packs). Each level pack should contain some levels. Each level will have its own level information. How do I store this information? Do I use one big database, or should I split the information into several databases? (one database for one levelpack, or even one database for one level?)

EDIT: To be more precise, I want to store the following level information:

  • Several simple key-value pairs
  • Some (primitive type) arrays
  • An array-list (with informations like: x-, y-coordinates and an Integer)

This information should be stored for each level. I am planning for creating 10-20 levels. These levels shall be located in level packs. I need to get access to them dynamically (printing a level list with the level information an the display).

share|improve this question
    
What do you mean by "database"? Do you mean a real Relational database, a NoSQL database, or just some file-format that you read (and I wish people would stop trying to call the latter "databases")? –  Nicol Bolas May 1 '12 at 10:07
    
yes i do mean a real relational (SQL-)database. –  user1349812 May 1 '12 at 10:21
    
Telling us what you plan to store in these level files would help. –  Nicol Bolas May 1 '12 at 10:23
1  
You should do more research on what databases are and how to design a relational DB. It makes no sense to have multiple databases for this. –  Toni May 1 '12 at 10:29
    
i know how to work with databases, but i have no practical experience of how the structure shall look like (especially for this case) - that's why i am asking –  user1349812 May 1 '12 at 10:43
show 2 more comments

1 Answer

Unless you're making an MMO or something so huge that you need it (and no, 10,000 elements doesn't cut it), you should not be using a relational database of any kind. Especially not for something as trivial as a list of stuff that goes in a level or series of levels. That's tremendous overkill.

Just use a file. An XML file if you must. It contains a list of files that are associated with each level. Or group of levels.

There is no need to go to the level of a relational DB.

share|improve this answer
    
Dear God, not XML. XML produces huge files that are not easy to understand. –  ashes999 May 1 '12 at 14:46
    
@ashes999 I disagree XML is perfectly human readable when done properly, has a huge amount of tools to parse/manipulate it, and the file size difference is rarely going to be noticeable beside your art assets. Nothing so awful as to warrant devine intervention :) –  ClassicThunder May 1 '12 at 18:08
    
I agree with all your points. But, there are better formats. –  ashes999 May 1 '12 at 19:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.