[MUD-Dev] CORBA, RMI, threads

Brandon Gillespie brandon at roguetrader.com
Thu Jan 29 08:53:14 CET 1998


On Wed, 28 Jan 1998, Marc Eyrignoux wrote:

> In my C++ code, I have coded the Player Character class.  I have an
> object in the world, for example a chest, which is special:  when you
> open it, it exploses and you take damages. As I don't want to create a
> class for each special object in the world, I just have a generic class
> for Objects. So I need to store in the database something like the act
> method of every object. For the chest, the act method will be like (in
> the script language): 
>
> if (taken)
> 	the_PC_who_has_taken_takes_damages();
>
> That's why I need a library that can read the script stored in the
> database.
>
> The object chest was first created in C++. My code looks like (in C++):
> 	object obj;
> 	obj = getObjectFromDatabase();
> 	obj.act();
>
> The act() method reads the script and executes it. So the script has to
> get the values contained in the object, in order to know if the object
> was taken, and it has to modify the values of other objects (in this
> case, the life points of the PC). 

OK... I guess I'll explain ColdC a little more.  While ColdC allows you to
have native methods--its not designed with the same concepts as lua--that
being slapdash mixing of compiled and scripted code.  The ColdC language
was designed as a clean, safe, system for a server to be coded in. 
Because it strongly defines server and database roles, you generally have
a much more stable database (last time I remember a 'crash' on the Cold
Dark was over a year ago).  So basically, you can likely do what you
want--but I wouldn't suggest doing much driver hacking.  The driver is an
interpreter--not the game engine itself.  The game engine is written in
ColdC.  For a manual see:

       http://ice.cold.org/bin/help?node=coldc

And make note when you are at that web server--*EVERYTHING* there is
written in ColdC, and is all running under the same server (that is, the
entire virtual environment, http server and many other things are all
written in ColdC).

-Brandon




More information about the mud-dev-archive mailing list