Easy-to-use scripting language

Started by
3 comments, last by DvDmanDT 16 years, 3 months ago
Greetings, I am looking for an easy-to-use scripting language to learn. I've used Lua for some time, but the fact that I have to: 1) write my own wrappers to interact with C++ code, or 2) install toLua (which I couldn't do from source in VC++, and the maintainer took the binaries off the official site) turns me off. I am looking for something that saves all that hassle. Thanks in advance. [edit] I found out Boost.Python and it looks like it could satisfy my needs, but maybe you can suggest something better. [/edit]
Advertisement
Luabind is to Lua what Boost.Python is to Python. Both APIs are very similar.
Crossing the bridge between scripted code and C++ code is a big pain no matter what you use. Lua might be as good as it gets right now. Sorry.
You may want to check out uCalc Fast Math Parser, and uCalc Language Builder. When you unzip uCalc FMP, you will find the VC++ code in the VC subdirectory. The ready-made binary files are already there (nothing to install beyond unzipping the DLLs in your project or Windows directory), and you'll see a demonstration VC++ program that uses it. Interfacing uCalc with your VC++ code is very easy. For instance, in your VC++ code, you might have the following arbitrarily defined function:

long double _stdcall MyEasyCallback(double a, long& b, byte c)
{
return a + b + c;
}

To attach it to uCalc, the "glue code" would simply be:

ucDefineFunction("MyEasyCallback(ByVal a As Double,
ByRef b As Long, ByVal c As Byte) As Double", MyEasyCallback);

That's all there is to it. Then you can use MyEasyCallback() in your uCalc expressions.

If you download uCalc Language Builder, you'll see how to easily call Windows API routines from your script.

uCalc Language Builder, and uCalc Fast Math Parser are really the same thing underneath the hood. The first one is for those who are interested in scripting. The later is a subset for those who just want a math parser. For more, see the message I posted yesterday in this forum regarding uCalc Language Builder ( http://www.gamedev.net/community/forums/topic.asp?topic_id=477927 ). I posted info on the math parser separately in the Math forum.

I had actually taken a look at Lua while developing uCalc Language Builder, and I believe you'll be happy with uCalc's easier approach towards interacting with VC++.

Give it a try, and let me know what you think.

Daniel Corbier
www.ucalc.com
Checkout Angelscript from Angelcode.com.

This topic is closed to new replies.

Advertisement