[Home] [Groups] - Message: [Prev in Group] [Next in Group]
29237: Re: [MUD-Dev] How much should be offloaded to Scripting?
[Full Header] [Plain Text]
From: Ben Garney <bgarney@purdue.edu>
Newsgroups: nu.kanga.list.mud-dev
Date: Wed, 11 Feb 2004 00:31:19 -0800
References: [1]
Organization: Kanga.Nu
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@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev