Skip to main content
gamedev.net
🔒 Locked

MMORPG scripting language

Started by Raduprv Jan 9, 2003 at 5:44 PM 12 replies 300+ views
Original Post
Raduprv
Raduprv
I recently started to work at the server side, for my game. And, I would like to add a scripting language to it, especially to allow players to build in their own worlds, etc. So, I would like soem advices on a scripting languages that has to comply with ALL this requirements: Free/LGPL C or Basic like syntax Resonably fast Allow use of internal functions. That means, if I have a C function, like, say move_player(int player_id,int x, int y); I want to be able to call it from the script. Relatively simple to implement Is there such a scripting language? Thanks in advance. P.S. I want something TESTED, not the average: "Search on google" or "A friend of mine said that he liked this language". Height Map Editor | Eternal lands
Alan Kemp
Alan Kemp
Then you want Small.

> Free/LGPL
Its free.

> C or Basic like syntax
Virtually C syntax

> Resonably fast
Speed is good, absolutly brilliant if you use their just in time dll instead of interpreter.

> Allow use of internal functions. That means, if I have a C function, like, say move_player(int player_id,int x, int y); I want to be able to call it from the script.
Of course :-)

> Relatively simple to implement
A few months ago I did an intergration of small into my little test engine in about 3 hours. The documentation is superb.

Alan
"There will come a time when you believe everything is finished. That will be the beginning." -Louis L'Amour
stodge
stodge
I would recommend Lua.

AlanKemp: Could you post a simple example of your Small integration? I looked into it, but I didn''t find it too attractive to use.
---------------------http://www.stodge.net
Alan Kemp
Alan Kemp
quote:
Original post by stodge
AlanKemp: Could you post a simple example of your Small integration? I looked into it, but I didn''t find it too attractive to use.


Not easily. It was just to test out how easy an intergation would be, and it was into the test framework that I use for testing any new features I am evaluating.

If you are having problems try the message board linked from the small site, the people on there are usually quite helpfull.

Alan
"There will come a time when you believe everything is finished. That will be the beginning." -Louis L'Amour
HenryApe
HenryApe
I hear Star Wars Galaxies uses Java for its server-side scripting.

[edited by - HenryAPe on January 10, 2003 9:47:46 AM]
Scourage
Scourage
I''ve used TCL as my scripting language for my AI and game flow control in a recent project. It''s a simple language to learn and not to difficult to export my C++ functions to.

[size="3"]Halfway down the trail to Hell...
Raduprv
Raduprv
Oh, it just occured to me that I might have a big problem, if i implement a scripting language, and let my users upload their scripts, without me checking them...
What if someone, out of stupidity and/or malice does something like:
while(1)eat_all_the_resources_like_there_is_no_tomorrow();

Is there any way to privent things like that, in any scripting language?



Height Map Editor | Eternal lands
Pyabo
Pyabo
Protection from that will have to come in the host application for the scripts, not the language itself. Even if a scripting language had some means of preventing such a resource-eating script, you couldn''t depend on it.

First of all, your server needs to be multi-threaded so that running these scripts doesn''t completely stop execution of the main server app. Second, you''ll want some sort of watchdog method built into your script host. For example, an event that is triggered if a user-run script does not finish execution within 1000ms or whatever your threshold is.

I''ve thought about doing this in a MMORPG game myself, and it''s pretty much impossible to do safely. This is something that old school MUD games did constantly -- allowed users to build areas and create new code. But invariably the setup in those situations was human oversight, and new code could not be dynamically added to the game. Being able to add new code (as in your scripting system) to the game at run-time is a whole new ball of wax, and one that is very hard to do in a secure manner. I think it''s a great idea though. I''ve often thought that a completely EMPTY world that just gave users scripting ability and world-building tools would be a great game... start with nothing and just let the users build it all.


Raduprv
Raduprv
Yes, I think I will ventually give up the whole idea fo scripting... it is too complicated, and, perhaps, slow too.
There is a massive online game, Furcadia www.furcadia.com that has a scripting language, called DS (Dragon Speach), which you can embedd in your maps. The scripting language doesn''t allow any execution control, so you can''t do stupid things.
In fact, it is something like:

"if player moves in square x,y then move player to x1,y1"
It is not a combat game, so you don''t need too advanced stuff anyway, usually the msot used features are teleporting people, locking parts of your map from others, etc.




Height Map Editor | Eternal lands

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.