Game Development Community

dev|Pro Game Development Curriculum

Plan for Ryan VanIderstine

by Ryan VanIderstine · 06/14/2002 (10:49 am) · 3 comments

I am working on the TubettiWorld project with Ken as a C++ and script developer. My background is principly business applications but it pretty much runs the gambit of easy to hard.

One of the primary additions I have added to the TubettiWorld game, or generically the Torque engine, is a new database independent layer sub-system. A small shim of code is compiled into the game which contains no specific references to any particular vender. During the game startup in script you specify the database type and connection information and from that point can execute sql as required. In order to provide the flexibility we were looking for the actual database connection and query code is isolated into a loadable module (.dll, .so) that is loaded on demand. We currently only have a mysql database provider but I intend to construct an oracle provider and may do an ado provider as well. When a query is executed it gets interesting. The query object returned to the script can reference the fields of the query as if they were properties so you can have code like the following:

%query = $db.execQuery("select * from table");
while !%query.isEof() {
  echo( %query.field_name );
  %query.moveNext();
}

When I get some time I will clean it up, perhaps add some additional functionality and post it for anyone that would like.

About the author

Recent Blogs


#1
06/14/2002 (2:03 pm)
Hey Ryan,

That's pretty cool. I do hope you share it with the rest of us. Goodluck with Tubettiworld.
#2
06/14/2002 (2:07 pm)
That's awsome Ryan - I don't have a particular need for it at the moment, but, I can see where this would come in very handly down the road!
#3
06/14/2002 (4:00 pm)
It's muy cool. And Ryan has packaged it in an easy-to-digest manner such that even a DB no-know like me can use it very effectively !