[MUD-Dev] Using Windows Scripting Host

Tess Lowe tess at soulsong.org.uk
Fri Aug 15 16:38:16 CEST 2003


Matt Owen wrote

> During the development of MUD32, my own 'for fun' MUD project, I
> have been considering the implementation of Windows Scripting Host
> as a method for adding on-the-fly script abilities that are
> attached to objects

...

> The stumbling block I have however, is which parts of the engine
> go in the driver EXE and which parts should be script files. WSH
> provides hooks where functions and objects in the compiled code
> can be exposed to the called scripts, but I am unsure which parts
> of the mud should be scripted. Is feasible to script everything
> bar the tcp/ip socket management ?

> Has anyone had any experience with something like this, and can
> offer a few pointers?

I built an engine doing exactly this a couple of years ago. TCP/IP
socket management was in VB6, and the game library was written in
VBScript and loaded dynamically via windows scripting host. I put
everything that needed to keep state during a code update into the
VB6 component, and everything else into the script. In the end I
think I simply had three public functions in the script -
node_connected(), node_dataarrival() and node_closed().

It was surprisingly fast too, though I never built a full MUD with
it (just a talker) and so can't verify its solidity under load. I
still have the code if you need pointers. :)

In the end I believe I found a way to put both socket management and
the game library into VB6 DLLs and still do run-time code updates,
so I scrapped the scripting idea - I considered that it would only
have been useful if I was involved in a project with many unskilled
developers. Now we have C#/.NET I've built the same runtime code
update functionality using Application Domains but the principle
remains the same.

kind regards,
~Tess Lowe
_______________________________________________
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