Hello
I recently started a small project with Irrlicht with no game programming experience. I created some code, almost all object based. Now I`m wondering - does Lua or Python can call c++ methods? If yes then could you say where I can find a decent tutorial on Lua/C++ or Python/C++(based on which can call C++ methods) tutorial.
Thanks
Scripting language help
What about AngelScript:
http://www.angelcode.com/angelscript/
http://www.angelcode.com/angelscript/
Last edited by MasterGod on Mon Feb 04, 2008 7:37 pm, edited 1 time in total.
-
- Posts: 4
- Joined: Sun Feb 03, 2008 10:06 am
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Calling C++ functions from Lua. I can't find anything on calling a method, nor can I figure out how you'd specify an object (so you'd have to call a class static method). Sorry.
I don't have much experience with either, but I have a mild leaning towards gamemonkey rather than lua.
I don't have much experience with either, but I have a mild leaning towards gamemonkey rather than lua.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Well rogerborg, check AngelScript. It can handle objects and methods and functions and the syntax is C\C++'s..
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
That does look very impressive - from the intro text, anyway.
Does it do what it says on the tin?
Does it do what it says on the tin?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
cinvoke
i found a nifty thinger called C/Invoke, whose purpose is to work in a similar manner to P/Invoke, which was used for instance to do the Irrlicht CP wrapper for .NET. I got it working up to the point where my lua runtime can use it, and Im trying to adapt the IrrlichtW Wrapper from Irrlicht CP to DE-Object-Orient Irrlicht so I can use it this way. Yeh, I might be crazy, but i like a few things about lua a lot, and I like this method better than lua's native C calling support which involves a whole bunch of annoying stack-parameter-passing BS. I wants me some damn coroutines and lightweight threads....
heres a linky http://www.nongnu.org/cinvoke/lua.html
heres a linky http://www.nongnu.org/cinvoke/lua.html
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net