PDA

View Full Version : Embeddable scripting languages


moebius
07-29-2002, 05:31 PM
Well, I'm looking for a fast and lightweight embeddable scripting language to use in Lixoo. I know some: Lua (used in GrimE, Mad), SpiderMonkey (JS-like, used in Sphere, Mozilla), Ferite (used in the new Enlightenment window manager) and Simkin.

I'm trying to find the fastest and more lightweight one. Do you know another languages of this kind? What of them would you prefer to make scripts of an adventure game?

We could also make or own, but that requires some advanced knowledge on parsers and lexical analyzers that we don't have at the moment.

Thanks in advance

superqult
07-30-2002, 05:41 AM
AppleScript?

Anym
07-30-2002, 07:38 AM
Other options would be Python http://www.python.org/ (replaced SCUMM at Humongous Entertainment) or SeeR http://home.elka.pw.edu.pl/~ppodsiad/seer/ (I used to think that AGS used this, but as I didn't find information about the other on both sites, I'm not sure anymore.)

Anyway, I'd go for either Python http://www.python.org/ , because it's a easy to learn, powerful, efficient and elegant programming language (used in Backyard Hockey, Freedom Force, Severance: Blade of Darkness, Star Trek: Bridge Commander, QuArK,...) , or with LUA http://www.lua.org/ , because it has proven that it is capable of the task as well (Grim Fandango, Escape from Monkey Island, Angband, Baldur's Gate, MDK2, ...) and the MAD Adventure Game Engine Project http://mad-project.sourceforge.net/ uses it as well.

moebius
07-30-2002, 06:36 PM
I have been making tests with SpiderMonkey and Lua this evening and I decided not to use SpiderMonkey as the runtime is bigger than Lua's (I can reduce the Lua runtime to be only 78 KB!). Lua is also faster. I sometimes get confused with the stack when calling C functions from Lua, but it's a matter of practice ;P

I'll try Python, SeeR and Ferite tomorrow, too. I want to take a look to them before choosing one.

Mmmh... AppleScript. That would reduce the platforms in which Lixoo could be used. I think it won't be a good idea to use AppleScript in the engine. Maybe it could be used in the IDE, we have a Cocoa version in mind :)

superqult
07-31-2002, 07:39 AM
Originally posted by moebius
Mmmh... AppleScript. That would reduce the platforms in which Lixoo could be used. I think it won't be a good idea to use AppleScript in the engine. Maybe it could be used in the IDE, we have a Cocoa version in mind :)

ah, that sounds so nice! :) I wasn't actually hoping for that, you just made my day.

Anym
07-31-2002, 07:53 AM
Don't even bother to check out SeeR. I just mentioned it for completeness' sake... Go Python! :D

moebius
07-31-2002, 08:17 PM
I have been reading lots of stuff all over the net, and I finally decided to use Python or Lua. I don't know yet what to use, I have to make some experiments with them until the final decission.

Just one question about Python: can I strip down the standard Python modules in order to get a smaller Python interpreter? It would be a nice thing, can somebody tell about that?

Thx.

moebius
08-01-2002, 04:49 PM
I 've been trying to make Python as small as possible, but a minimal embedded Python system is about... 700KB!! I like Python now I've read about it, but I need to make it smaller, is it possible?

Can someone tell me what is the "magic recipe" to get it small? If it's not possible I would use Lua.

Anym
08-02-2002, 07:22 AM
I don't know how small you can get it, but not as small as LUA, I think.

moebius
08-02-2002, 07:32 PM
Finally, I decide to use Lua. I like Python a lot now that I know it, but the thing I really love is the speed and the small size of Lua. And as the 'L' of Lixoo stands for 'Lightweight', Lua is the perfect candidate. I couldn't make Python smaller than 570KB :( ...and its quite big for Lixoo, I think.

I was worried about object oriented programming with Lua, but digging through its documentation, I found that OOP can be made by assigning functions to Lua tables the behave as methods for the table that contains them just by using the "table:method()" syntax! Cool!

Thanks for your help, anyway ;P