[MUD-Dev] Virtual machine design
Shane King
thandor at donut.dhis.org
Fri Apr 16 19:59:43 CEST 1999
I'm currently working on a mud design, and what I'm really a little
stuck on is the best way to progress with respect to virtual machine
design. As I see it, there are four basic options I could go with:
1) A java virtual machine, running compiled java (or java-like) code
2) Adapt an existing virtual machine from another mud to my needs
3) Write my own virtual machine, and make it a target for the egcs
compiler, thus allowing it to run byte compiled C/C++ code.
4) Write my own virtual machine, and write my own mud language.
Am I missing any options here?
Anyway, my thinking comes down to this:
The java option has some appeal, I must admit. However, sticking to the
jvm spec is both a plus and minus I guess. At least I have something to
work from, but it's also rather restrictive. On the up side, there's no
need to write a compiler. I know some people were talking about using a
jvm for the devmud vm though, so if they have any thoughts, I'd love to
hear them.
Adapting a virtual machine from another mud seems like the least work,
but I question how well it would work. I'd most likely have to also
adapt the language that those muds use. If I liked the availible
choices at present, I wouldn't want to make something new. So I don't
think this would be a good choice.
The vm that is a target of gcc/g++ is what I'm really thinking about
doing. It would have the advantage of the same code compiling to either
byte code or native code, which appeals to me greatly. And there would
also be nothing stopping me from writing a compiler for some other
language should I decide to do so. In short, this option seems to give
the greatest flexibility for the least amount of work. And knowing that
quake3 (although not a mud) uses a similar approach (with the lcc
compiler I believe), makes me think I'm right. Or am I?
The final option is probably a poor one, since the real problem with it
is (IMO) that people would rather not learn a language that's only
useful on a particular mud. They're more likely to use C/C++ which they
already know, or will be useful to them elsewhere if they learn. Thus
I'm wary of a making something that doesn't offer a "standard"
language, at least as an option (whether that be C/C++/java/whatever).
Any thoughts from people who have been through this? What choice did
you make and why?
--
- Shane King <thandor at ihug.com.au> <ICQ#:2492866>
<http://homepages.ihug.com.au/~thandor/>
"If a machine, a terminator, can learn the value of human life, maybe we
can too." - Sarah Connor, Terminator II: Judgement Day.
_______________________________________________
MUD-Dev maillist - MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list