[MUD-Dev] CORBA, RMI, threads

Marc Eyrignoux Marc.Eyrignoux at efrei.fr
Wed Jan 28 11:08:58 CET 1998


Brandon Gillespie wrote:
> 
> On Mon, 26 Jan 1998, Marc Eyrignoux wrote:
> 
> > I would like to know what ColdC exactly does. Is it a better alternative
> > to lua (I mean: can I write some scripts for some objects or monsters,
> > these scripts being able to interact with other datas or objects in
> > memory or in the database, store them in the database, and execute
> > them?)
> 
> Umm, I'm not fully sure what you are asking, but I think the answer is:
> 
>     yes
> 
> Perhaps you could clarify?
For example:
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).

Now I have a question for Greg: you told me my code should look like:
> event_diver.schedule(new event(real_to_game_time(t)));
But in this case, how do I know what the events refers?
In the constructor, I only store the delay, but not the method that has
to be 
executed when the delay will be attained?

Thanks in advance.
--



More information about the mud-dev-archive mailing list