Scripting Language

Post Reply
qualakon
Posts: 18
Joined: Fri Apr 25, 2014 7:31 pm
Location: Canada
Contact:

Scripting Language

Post by qualakon »

While I'm not an expert in programming, I know that externalizing some of the code to external scripting files can benefit other modders.

I've taken it upon myself to find out which scripting language would be best. Some requirements is that the libraries have to be cross platform and universal, there shouldn't be different scripts for Mac and Windows and Linux and Android. (I'm optimistic about the Android support.)

I've outlined these examples with some pros and cons.

1. Straight text files (.txt, .xml, .ini) - This works well for certain things like items and NPCs but wouldn't work well for more complicated changes like affixes and quests

2. Lua - Built in C, could have issues with so many c++ classes from Freeablo
2a. - toLua++ - Built for C++ in mind - Could be a good option.

3. ChaiScript - A very simple embeddable scripting language for C++ as it only requires one include in the header to implement.

4. Falcon - Built for C++ - more robust but pretty complicated but far more flexible. I don't have experience to say what this can do that ChaiScript can't

5. SWIG - Would allow for multiple high-level programming languages including Lua and C++ code. Seems to be the best choice but could be overly complicated for what we want to do.

Maybe there's some others that I'm not away of. @wheybags, did you have any other ideas running through your head?

User avatar
wheybags
Site Admin
Posts: 86
Joined: Thu Apr 24, 2014 9:01 pm
Location: Ireland

Re: Scripting Language

Post by wheybags »

I was leaning towards python, and my introduction to libRocket has only made me lean further in this direction, as it supports python scripting for it's guis.
I think I'm provbably going to use libRocket for the freeablo gui system, as soon as I get it working with SDL.

qualakon
Posts: 18
Joined: Fri Apr 25, 2014 7:31 pm
Location: Canada
Contact:

Re: Scripting Language

Post by qualakon »

That works for me! So many choices and I think Python will work really well. Excited to see it in action. :)

Post Reply