[Home] [Groups] - Message: [Prev in Group] [Next in Group]
3726: Re: [MUD-Dev] newbie
[Full Header] [Plain Text]
From: Matt Chatterley <root@mpc.dyn.ml.org>
Newsgroups: nu.kanga.list.mud-dev
Date: Sun, 9 Nov 1997 13:38:08 +0000 (GMT)
References: [1]
Organization: Kanga.Nu
On Sat, 8 Nov 1997 coder@ibm.net wrote:
> On 04/11/97 at 09:21 PM, Sauron <dlove@kusd.kusd.edu> said:
>
> >Generally hardcode is what you use to write the server and has to be
> >compiled and restarted each time you make changes (note that i said
> >generally, i know this isn't ALWAYS true). Softcode tends to be the
> >internal programming language on your server. It has no need to be
> >compiled, generally adds to lag, but is also on the average easier to use
> >and uses the games internal functions to the best of their abilities.
>
> There are some notable exceptions here. LP's LPC is easily recognisable
> as "sfotcode", yet it is "compiled" into an internal form (bytecoding? I
> haven't checked), and in some versions can be compiled directly into
> machine binaries. ColC comparitively compiles into bytecode which is
> then run by the Cold VM.
Yeah. LPC is more like Java in the sense that it does run from a form of
VM (perhaps not strictly speaking, but in a theoretical sense). Using the
binary options you can also compile LPC to C at runtime, and keep it
stored as C for efficiency purposes.
The best example of softcode that I know of would be that found on the
Tiny/PennMUSH servers, and another example I could cite is the interpreted
scripting language being built into my mud (the interpretor/executor
written in LPC) to run magical spells.
> >The
> >real tradeoff is w/ hardcode you increase your cpu usage, and softcode it
> >chews up your ram. Most good mu*s tend to have a balance of both types of
> >programmed systems.
>
> Softcoded systems which compile to byte code lose many of their CPU
> intensive aspects. On a related note, disk based systems (don't keep
> everything in RAM), can be much more effective at reducing CPU and RAM
> consumption than the soft or hard code routes, as well as significantly
> improving page fault rates and thus performance. Marcus Ranum
> demonstrated this very clearly.
Yes - basically there are pros and cons to each approach. Putting aside
the hardware usage side (which is perhaps not as important to many people,
at least not until you have a *large* server), the main differences are:
Softcode tends to be easier to learn (citing Tiny/Penn as an example).
Softcode also tends to be harder to do major things in (if it is possible
at all).
Hardcode generally requires a server reboot, and is inaccessible to
players.
And so forth, and so on.
Regards,
-Matt Chatterley
http://user.itl.net/~neddy/index.html
"All extremists should be taken out and shot."