scripting engine libraries

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

scripting engine libraries

Post by keless »

has anyone found any cross-platform, cross-compiler scripting libraries?

I looked at both caLUA and toLUA, and it seems they're both limited to MSVC.

I am trying to support Win32 (MSVC+DEVCPP) and linux (gcc).

I am looking for any scripting language that is vaguely C-like, so Python would work as well as LUA. It should plug into C, but C++ object support is a plus.
a screen cap is worth 0x100000 DWORDS
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Well.. CaLua is a C (not even C++) library. So I don't know how it would favor MSVC over anything else.
Crud, how do I do this again?
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

toLua can be used under Linux; I used an older version - http://habitat3d.sf.net.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

tell ya what if somebody finds one lemme know too ;-)

Post by buhatkj »

heh yeh really dude, HELP! i have already plugged CaLua into fmorg, but like you say, its really a c lib, and i cant do neat stuff like register objects with it. simkin was mentioned in another thread, but i couldnt get it to compile at all, plus it's actually rather poorly documented i thought. another i have looked at is called angelscript, and that one is REALLY poorly documented and not only that, but it makes you manually load it's DLL, which means you must include the windows.h header, which causes all sort of foul ups in my compile. (not sure why that is actually) so for that its rather totally NON cross platform at all.

it occurs to me, that a very similar method to the way im handling the network messages could prolly be applied to doing scripting. i could write the scripts in XML, ALA simkin, read them in like i do with the config files, and then parse them very much like i parse the network messages.

not sure how well that would work in practice, but it's a thought, and would mean that anything that the server and client could tell each other, a script could do too. although there are several areas it still wouldn't really cover, like combat or effects, and most significantly the AI.

there seems to be a lack of truly well-documented, cross-platform, WORKING scripting languages to embed in C++, or maybe they are just hard to find....

or maybe it's just me;-)

i think my best option right now is to work with the best one i have found so far, which is CaLua, and see how i can extend it to be more O-O
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Guest

Post by Guest »

AngelScript is a scripting engine based on C++ syntax, very easy to implement: http://www.angelcode.com/angelscript/
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

I think it is just you; Lua is very easy to embed with toLua. Also SWIG is similar for Python and other languages.
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

heh thanks dude...

Post by buhatkj »

hehe yeh thanks for the vote of confidence in my abilities LOL ;-) actually i hadnt noticed tolua++ until last night really, and i ran it on some simple stuff and the output looked promising. i havent tried pluggin it into the app(fmorg) as a whole yet, but im certain i shall soon enough. swig, neat, might let me embed PERL :-)
cool :-)
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

Sorry for the stupid question, but what exactly does a scripting do. I know its good to have, but how does it work, and what does it do?

btw. sorry to hijack the thread
The Robomaniac
Project Head / Lead Programmer
Centaur Force
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Scripting is just an extension of your normally c++ code. It primary bonus is that you can tweak functions and not have to create a whole new build. It's good for things like behavioral logic, combat logic (damage/accuracy), etc..

This is crucial for large projects that get to the point that a rebuild would take hours to finish.
Crud, how do I do this again?
Robomaniac
Posts: 602
Joined: Sat Aug 23, 2003 2:03 am
Location: Pottstown, PA
Contact:

Post by Robomaniac »

What do you use for scripts, do you load files that have script code in it, or is it realtime? The only script engine i worked w/ was Python for about a day, and my impression was that you had to type something in each time you wanted to do something.
The Robomaniac
Project Head / Lead Programmer
Centaur Force
stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

As I said before, look at the source here:

http://habitat3d.sf.net

The source is messy and the demo doesn't work, as the image files were created under Linux and don't seem to load under Windows. But the source for the ScriptManager is in the Core directory.

Oh and it only supports Lua 4 and toLua.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

script engines typically load script files.

the great thing about scripting is that you can think of things like dialog, item statistics, game logic and all sort of other things as 'resources' which can be created and changed by the game designer instead of the programmer. this is similar to resources such as images and sounds. instead of having to recompile the engine every time you want to tweak something, all your designer has to do is change a script file and move it into the script directoy.
a screen cap is worth 0x100000 DWORDS
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

and magic numbers...

Post by buhatkj »

also for things like a particle effect, where you have a bunch of magic numbers for things about that effect, and you wanna tweak it without having to do a total recompile. lets you do it more easily. also for something like a bot, you could have a file open dialog and allow the player to select from many different pre-made bot scripts, or even write their own bot script and use it without having to recompile the game or anything. really, the possibilities are endless...
-ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
stampsm
Posts: 142
Joined: Mon Nov 10, 2003 5:52 pm
Location: Las Vegas

Post by stampsm »

it is a lot like doing a mod
i know tribes2 allows mods to be done through scripts
this allows players to change things to suit themselves and extends the life and playability of a game
a.k.a. more people will use it
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

stodge wrote:As I said before, look at the source here:

http://habitat3d.sf.net

The source is messy and the demo doesn't work, as the image files were created under Linux and don't seem to load under Windows. But the source for the ScriptManager is in the Core directory.

Oh and it only supports Lua 4 and toLua.
I dont see a source download on that page, or the 'project page'
a screen cap is worth 0x100000 DWORDS
Post Reply