MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: turning player_db and match_player into builtins..





On Fri, 20 Sep 1996, Sergio Costa wrote:

>   I was just wondering if that was at all possible...
>   I mean hacking the C code to include both things..

It's possible, of course (anythings possible on Unix, certainly with C ;)
but i doubt it will be easy, bugfree, speedy, or smart. Main problem would
seem to be the time usage. Certainly, it will be (lots ?) faster than the db
one, but it will only take one tick. MOO itself isn't multitasking, merely
taskswitching, so a large player_db in server and all accompanying
functions, could create massive lag-spurts. Whereas verbs in-db can (and big
ones must) call either suspend() or read(), which gives other threads a
chance.

More bad things: how were you planning on putting it in the server ? you
would need a lot of new functions, a few for the player_db, a few for the
match... and you'd need a few more builtins. Maintaining a list like that in
server also isn't a joke. you have to keep your pointers in check, your
array bounds, etc. 

Also, there already is a version of player_db in-server. you can access it
with 'players()' :-) player_db was created to allow match_player, and lots
of other verbs, to access such information, and also to link it to other
info. (players() returns only object numbers). Lastly, it's kind of silly to
put it all in-server. the DB already IS in-server :) By putting these
functions in-server, you create _another_ DB, with an alternate way of
accessing it... Are you sure you want that ? 

Regards,
Thomas.




Follow-Ups: References:

Home | Subject Index | Thread Index