[MUD-Dev] How much should be offloaded to Scripting?

Ben Garney bgarney at purdue.edu
Wed Feb 11 00:31:19 CET 2004


Dan Larsen wrote:

> Now, my question is this.  How much of the game should I offload
> onto my scripts, versus hard-coding it in the server?

I would suggest passing control to the script as soon as possible.

I would also suggest wrapping the commonly used stuff - like
parsing, perhaps - in script-callable functions. That way you can do
your heavy hitting in native code, and let script guide execution
through the whole process.

Personally, I'd start implementing most everything in script and
only move it to native code if I needed the performance gain. That
approach really depends on your scripting language and how easy it
is to embed/extend it. But if you can cover 80% of your parsing
cases and most of your database access with native code, then you
can let the rest stay in script, where it's hopefully easier to
maintain and tweak.

You never know when you're going to want to prototype a secondary,
XML-based protocol, or need to deal with some weird border case
right at connection time. So it's good to have script involved right
from the very beginning, even if it just passes control to a parsing
function right off.

Ben
_______________________________________________
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