Making a scripting language for Irlicht?
Making a scripting language for Irlicht?
How do i make a scripting language for irrlicht? I have a parser(The Gold Parser).
thanks
tyler
thanks
tyler
Wow, this is kind of a n00b question.
Please read about compilers and ask in a compiler/C++ newsgroup.
My latest "creation" is M3Script, a scripting language that uses irrlicht to make 3-D games and simulations. maybe if i release the source you could learn something from it
search google for "implementing a scripting engine", i remember there was an article on there..
-dudMan
Please read about compilers and ask in a compiler/C++ newsgroup.
My latest "creation" is M3Script, a scripting language that uses irrlicht to make 3-D games and simulations. maybe if i release the source you could learn something from it
search google for "implementing a scripting engine", i remember there was an article on there..
-dudMan
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Adding script support to "Irrlicht" is like adding audio to MS Paint.
First, define the problem that you want to solve. Then determine the relevance of Irrlicht (a "3d engine") to that problem.
I expect that you want to add scripting support to your game engine. But Irrlicht is not a game engine. Come up with a solution to your problem.
First, define the problem that you want to solve. Then determine the relevance of Irrlicht (a "3d engine") to that problem.
I expect that you want to add scripting support to your game engine. But Irrlicht is not a game engine. Come up with a solution to your problem.
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
There is a project that aims to provide a LUA-binding to Irrlicht:
http://irrlua.sourceforge.net/
LUA is a very popular scripting engine and is used in several big projects (like WoW).
But man, that is really a n00b-question (for an advanced problem).
http://irrlua.sourceforge.net/
LUA is a very popular scripting engine and is used in several big projects (like WoW).
But man, that is really a n00b-question (for an advanced problem).
scripting engines are sooooo slowwwww..... i would prefer ini configs instead of scripting engine. bit more work implementing everything but at least runs fast. imagine, you spend 3-4 weeks or more while making scripting engine. it surely slows down your game. so why not to use ini config parser and load lets say scene when everything is defined in the config? less work to do, more free time, better performance.
compiling scripts before run takes time. its slow. if you want faster result - you have to prepare precompilded bytecode. scripts compilation is not on the fly so whats point to have scripting engine anyway if scripts have to be compiled before running a game. also learning some new stupid scripting language is basicly same as learning c++, just c++ has more capabilities and it is more useful. if i rly would like to have something like that i would choose maybe xml instead. functions written in c++, game data defined in xml or ini configs, or even txt files. that is my opinion
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Should I ever find a need for runtime-adjustable behaviour, I'll just use an expicitely loaded and unloaded DLL compiled in C++, the way the Baby Jesus would have done it.
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
Actually, I've making a simple Python binding of some core Irrlicht functionality using Boost::Python. Now that the binding is in place, all I have to do is hit ctrl-s in the text editor and then run the program. Sure, it has to "compile" the Python to byte code, but that usually takes a tiny fraction of a second since it only has to recompile the one file, as opposed to 30 seconds to re-link even a smallish C++ program every time you make one small change. Coders: how much of your life have you spent waiting for large C++ programs to compile and link, not being productive? Maybe at your day job this gives you a chance to goof off or zone out, but if you are trying to get something done it is refreshing to see results almost instantly.
Don't get me wrong, I'm a huge C++ fan, its my favorite programming language, but don't get down on Python or other scripting languages until you've given them a fair chance. The speed of Python is fine. You have to realize that the speed of your game is almost entirely dependent on your memory bandwidth and the speed of your GPU. With Irrlicht doing all the heavy lifting in the background, I can do the game logic in Python, and it still runs at 60 frames per second (with Vsync) on my laptop, while only using a fraction of the processor time.
Don't get me wrong, I'm a huge C++ fan, its my favorite programming language, but don't get down on Python or other scripting languages until you've given them a fair chance. The speed of Python is fine. You have to realize that the speed of your game is almost entirely dependent on your memory bandwidth and the speed of your GPU. With Irrlicht doing all the heavy lifting in the background, I can do the game logic in Python, and it still runs at 60 frames per second (with Vsync) on my laptop, while only using a fraction of the processor time.
+--------+
steveth45
+--------+
steveth45
+--------+
Python is ugly? Heres a chunk of C++ from ISceneNode.h:
Here would be the equivalent code in Python:
Which one is uglier?
Code: Select all
core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin();
for (; ait != Animators.end(); ++ait)
(*ait)->drop();
Code: Select all
for anim in Animators:
anim.drop()
+--------+
steveth45
+--------+
steveth45
+--------+