[MUD-Dev] Databases and scripting languages

John Szeder john at seismicstudios.net
Tue Jun 25 03:49:56 CEST 2002


I am playing around with an online game concept at the moment, and
exploring some different implementation strategies.

I would be interested in hearing some thoughts from the more
technical minded people out there regarding databases and scripting
languages.

For example:

  I am going to set up a persistent game world where all of the data
  is stored in an SQL database. Basically some of the data stored in
  each record will be accessed by in-game scripts, and some of it
  will be accessed by the system that it is running on.

Let's say for the sake of argument that the scripting language is
based on an off the shelf language that has easy extensions into
C/C++, and that the basic game engine is a C++ application.

I am looking for some anecdotal advice on data storage from people
who have gone down this path before.

Essentially what I am thinking would be "ideal" is to have an object
that is constructed with a set of base attributes that exist for
objects that are accessed from the C++ server primarily
(last_modified, create_time, etc).

In addition, there would be an object definition that exists for
attributes within the game world accessible from the scripting
language (object_location, object_type, object_name, etc).

I am presuming that there will be some difficulty in loading objects
from the database on game launch, as well as difficulty in saving
objects periodically because of the requirement to convert to and
from values in the scripting language.

Does anyone have any interesting clever tricks they have done with
various languages to make this simpler? For example, would it be
sensible to construct the objects as a single string to pass into
and out of the object for parsing?

The language in particular I am looking at is Lua (www.lua.org).

Discussion, advice, guidance, and criticism are welcomed.

 --
John Szeder

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list