|
|
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?
|