Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   Advanced MUD Concepts (http://www.topmudsites.com/forums/forumdisplay.php?f=7)
-   -   Embedding scripting languages (http://www.topmudsites.com/forums/showthread.php?t=40)

Artovil 09-11-2002 07:50 AM


Winddancer 09-12-2002 03:44 AM

I code on Dawn of the Ages which is done in Java. We have quite a number of Scheme scripts as well. Recently, our head coder created a totally new profession along with all spells and skills in Scheme.
Major advantage of this is of course that you can alter and improve any part of that new profession online without the need for a reboot, which is normally required when new Java Classes are to be introduced into the MUD code.
Java has the advantage of having special class-applications like Skij, Scheme in Java, or kawa. These allow an easy way to create handles in Scheme with which you then can manipulate the Objects created by the normal Java code.
Since your codebase is C or C++, I would first look out there for a similiar wrapper class that will allow you the easy road to use Perl or Python in your mud. Since I never attempted to create or code in a C based mud, this is where my advice has to end.
I hope the information did help you none the less.

Artovil 09-12-2002 04:26 AM

In this case, what would you define as a wrapper class?

I have already implemented the actual hooks to Perl, and I've got it working so far as initiating the interpreter and all of that. Now I need some help/ideas with how to actually pass data between the two, and if somebody out there has any code written in C for this purpose, let me know, I don't mind if the code is not written for Circle as long as it tangents on what I need for my MUD.

Ogma 09-12-2002 05:51 PM

Personally, if you want to get that complex, I'd go with an LPMUD.

Artovil 09-12-2002 06:03 PM

Well, when I first started out coding I considered LPMud, but I chose CircleMUD for several reasons, mainly because I did not want to reinvent the wheel by coding the WHOLE server from scratch, and because I wanted a codebase that was active and growing, and something I could actually learn to code from just by extending it.

Chances that I will be converting to an LPMud now, almost four years later are slimmer than none. Which leaves me little choice in the matter, I either use embedding, or I reuse DG Scripts, or I do it the old fashioned way by hard coding each and every last one of the spells (which is my very last way out).

Loriel 09-12-2002 09:59 PM

Whilst accepting your subsequent statement that you've invested too much time in your mud to change to LPC, the original reasons for choosing Circle are questionable, and you are now seeing some of the disadvantages of that decision.

There are several mudlibs available that provide something close to a "ready to run" mud, so you wouldn't have had to "code from scratch" (unless you preferred to).

I don't see why you dismiss LPC on the grounds that it's not "active and growing".

There is some validity in your final point that by using  CircleMUD you are "learning to code" - but doing something similar in LPC would also teach you to code - the difference being that LPC is of no direct relevance outside the MUD community, but the Object Oriented design techniques it uses may be more useful than the design techniques of CircleMUD.

Please note that I am not making the "LPC is better than C for muds" claim - I am merely saying that LPC has some advantages which should not be ignored or dismissed as you appear to have done.

Artovil 09-13-2002 02:01 AM



All times are GMT -4. The time now is 07:47 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022