[post-1.0] Scripting enhancemnts
Re: [post-1.0] Scripting enhancemnts
Lua is really amazing, but has anyone considered Python? If we are even considering this?
Re: [post-1.0] Scripting enhancemnts
There's still no Restricted Python for 3.x, AFAIK.
Re: [post-1.0] Scripting enhancemnts
Python is a really powerful language, but it's more suitable for stand-alone work. For embedded scripting, Lua will be better choice: more faster to execute (especially LuaJIT), smaller in codesize, easier to integrate and consumes less memory.raevol wrote:Lua is really amazing, but has anyone considered Python? If we are even considering this?
Re: [post-1.0] Scripting enhancemnts
Still really think we should have a seperate scripting language on top of mw script...
- potatoesmaster
- Posts: 112
- Joined: 26 Dec 2012, 17:01
Re: [post-1.0] Scripting enhancemnts
OpenCS will need script extensions too. I think Python is better suited for that: it's popular, has a lot of resources (tutorials, a good documentation, a bunch of libraries) and enforces readability.
If OpenMW ever have a new scripting language, be it the same as OpenCS.
If it happens, an exact translation (from Morrowind script to Python or lua) would be ugly. One thing I dislike in vanilla scripts is polling. Having event handler functions would be better IMHO.
It's a lot of work, since we have to remain compatible with vanilla scripts. And there will be no benefit until new content are created for OpenMW.
If OpenMW ever have a new scripting language, be it the same as OpenCS.
If it happens, an exact translation (from Morrowind script to Python or lua) would be ugly. One thing I dislike in vanilla scripts is polling. Having event handler functions would be better IMHO.
It's a lot of work, since we have to remain compatible with vanilla scripts. And there will be no benefit until new content are created for OpenMW.
Re: [post-1.0] Scripting enhancemnts
Looks like people are leaning to python.
While I dont code or script, I would choose python as well based on the fact that its the major code used for scripts in Blender. This would mean even more people would be familiar with it.
While I dont code or script, I would choose python as well based on the fact that its the major code used for scripts in Blender. This would mean even more people would be familiar with it.
Re: [post-1.0] Scripting enhancemnts
I'm skimming these topics, but I don't understand much of it, so I would be grateful if someone could explain to me what all this means. I am familiar with compiled languages: you write something in a language that looks like English, except more rigid, then you run it through a compiler that translates it to machine code and you get a computer program.
How does a scripting language work? From what i understand it needs to be "interpreted" by a program (i.e. OpenMW in our case). Lua and Python existed long before OpenMW, so how do the languages know how Morrowind works? I assume someone has to write some sort of "bridge" between script and game, but if that's the case, what does the scripting language contribute? What would be the advantage in adapting an existing language that people have to learn again over writing a custom language?
How does a scripting language work? From what i understand it needs to be "interpreted" by a program (i.e. OpenMW in our case). Lua and Python existed long before OpenMW, so how do the languages know how Morrowind works? I assume someone has to write some sort of "bridge" between script and game, but if that's the case, what does the scripting language contribute? What would be the advantage in adapting an existing language that people have to learn again over writing a custom language?
Re: [post-1.0] Scripting enhancemnts
Cleaner and much more powerful syntax (I doubt this event handling/callbacks thing potatoesmaster mentioned is possible with Morrowind scripting syntax), nice things from the standard library (e.g. math, working with arrays).HiPhish wrote:What would be the advantage in adapting an existing language that people have to learn again over writing a custom language?
Re: [post-1.0] Scripting enhancemnts
Yes, Python uses Blender and several games. But Lua became a de facto standard in game development, it was used in the many commercial games and it's a best-known scripting language in modding community. Even Civ series switched from Python to Lua in Civ V.Tarius wrote:Looks like people are leaning to python.
While I dont code or script, I would choose python as well based on the fact that its the major code used for scripts in Blender. This would mean even more people would be familiar with it.
Besides, Lua used in powerful game editors such as CryEngine SDK (Crysis series) and X-ray SDK (S.T.A.L.K.E.R. series). And, of course, in Garry's Mod.
Re: [post-1.0] Scripting enhancemnts
As a compromise, why not a Lua/Python-esque implementation of the Morrowind scripting language? Wasn't MWs scripting language very unwieldy in places ("set var to 10" rather that "var = 10")? Still, I personally prefer curly brackets over phrases such as "endif", makes it easier to recognize a block, but Lua and Python don't have that either, it seems...Zini wrote:Would not be easy to implement (we would have to do a good part of the work twice, since I am absolutely not going to drop the original language) and it would lead OpenMW into a direction that I am not willing to go.