PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Storing Data

PointOfLight · 19 Nov 2003, 06:07 UTC
I was just wondering what methods people used to store their data (ex: dialogs, level definitions). Does anyone use databases? If so, how do you create / maintain them?
What do you mean? Storing data on games? or on dbase applications? In regards to games data, I'm using registry and textfiles just like in regular C/C++. Regards.
I'm looking at the possibility of using a database for an upcoming project, but I'm not sure about the overhead (or speed) of an SQL engine. I still need to research this.

If nothing else, you could look into using either flat files (what we used in Warlords II), or even a simple indexed sequential method. It really depends on what your application requires.

In the case of Warlords II, all of the string data is stored in flat files for ease of localization. Map data is stored in a simple packed binary format, as is scenario info.

If you wanted to 'hide' your data, you could use some sort of a WAD file and pack pretty much everything into it, including graphics. Again, it all depends on your requirements.

Oh, and like Redenthor, I use the registry for things like game scores. It is alot easier to do it that way, and speed isn't an issue since you're hitting the registry very infrequently.
I am translating a game that was originally written for the PC, and it uses an Access database to store questions and answers, as well as some other information. I am trying to figure out the best way to translate this data to a format usable on the PocketPC.
I've tried a couple of implementations of different databases:


You connect to an SQL Anywhere db by ODBC, works for both PocketPC and Windows, but you have to have a SQL Anywhere server running on the PDA and/or the PC.

With SQL CE you connect through OLE DB. I think it's just a lot of code for getting a little job done.

SQLite is actually a C library where you get a direct access to the db, but you can use SQL commands. It's very simple and it's in the public domain. It's also typeless. Works for PocketPC, Windows and Linux.

These databases are all slow on the PDA when you work with large amount of data (currently I'm working with tables containing as large as 50-60000 rows and more) but what you gain is that you can use SQL queries to access and modify data. Currently I'm using SQLite mainly for its simple interface and that it is simple to distribute.