Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / Game Design & Programming / Principles of organization Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
Kalani Thielen

December 03, 2004, 10:20 AM

Hey guys,

While working on a little project of mine, I came up with a design idiom that some other people here might find useful (or maybe it's already been done before).

I made a little relational database system. This system can aggregate and mutate objects in general (not just records on disk). I have a little scripting language that feeds into this, so that objects I've created and classified can be seen in various "tables" of the game database. Then I put an SQL front-end on this database, so that I can execute standard types of queries/commands against it.

For example, in a battlefield game I might add a button to the player's display that allows him to highlight all enemy trucks. The code for this button would be an SQL statement that could look like:

update visible-objects set highlight = 'blue' where type = 'truck' and loyalty = 'enemy'

What do you guys think?

Kurt Miller

December 03, 2004, 12:18 PM

Personally, I think its a great idea. For a long time now I've been expecting that someone would develop and release a game-related 'sql'-ish library since it seems there are just so many places where it'd be useful; particularly in larger projects. The type of example you've provided is a good one, but even at a lower level it'd be useful; like a database of 3d primitives on which one could run queries (based on properties or specific calculations.) These types of things are a bit of overkill for the scale of project I've generally worked on, but as games grow more complex I do think this kind of organization will become more common. Good stuff, keep us updated on how it works out in your project.


December 03, 2004, 12:39 PM

I thought these things are a little slow for games. Could you write something about your experience with this approach considering the performance?

Kalani Thielen

December 13, 2004, 04:14 PM

OK, here's a little update. I've ironed out a lot of the kinks in this system and have made a demo program that has a database with a "windows" table containing several windows (which are created when the program starts up). I've made a brief little writeup on my website at (where the demo program can also be downloaded).

Here's a screenshot from the demo program:

I'll come back when I've got it working within a demo game.

This thread contains 4 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.