SWIG Scripting Extensions project

Everything about development and the OpenMW source code.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: SWIG Scripting Extensions project

Post by Zini »

Nothing stopping LUA from being included, aside from Zini of course. Dude is like a brick wall!
Sorry about that. I really don't like rejecting code; especially if people have put a lot of effort into it. In fact that is my least favorite part of my functions within OpenMW. But if I see clear negative consequences of that code being merged, then I don't have a choice (reasons for this particular rejection have been discussed sufficiently, I think).
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: SWIG Scripting Extensions project

Post by psi29a »

It was an attempt at humour, what you are doing Zini is a good thing. :)

Your response to reject Python, until it can be sandboxed, is valid.

What is your opinion about Lua then? It is trivial to sandbox.
User avatar
FiftyTifty
Posts: 63
Joined: 15 Oct 2014, 21:02

Re: SWIG Scripting Extensions project

Post by FiftyTifty »

Just going to go out on a limb, and suggest Pascal. Main reason being that it is somewhat legible, and documentation is super easy to find.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: SWIG Scripting Extensions project

Post by Zini »

What is your opinion about Lua then? It is trivial to sandbox.
I don't have problems with Lua per se, but as mentioned before I don't think that a second scripting language is needed or beneficial for OpenMW.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: SWIG Scripting Extensions project

Post by psi29a »

Since the project is eventually evolving to be more than just Morrowind, wouldn't it be in the engine's best interest to be "pluggable"?

So you want Lua, ok, there is a plugin for OpenMW to handle that. Install it.

How do you feel about that?
maqifrnswa
Posts: 180
Joined: 14 Jan 2013, 03:57

Re: SWIG Scripting Extensions project

Post by maqifrnswa »

psi29a wrote:Since the project is eventually evolving to be more than just Morrowind, wouldn't it be in the engine's best interest to be "pluggable"?

So you want Lua, ok, there is a plugin for OpenMW to handle that. Install it.

How do you feel about that?
I think I've satisified my itch, and have accomplished what I wanted, so I can move on to other issues. I'll probably maintain the PPA with each new release as a tech demo for those that are interested.

Python and/or Lua simulataneously:
https://github.com/maqifrnswa/openmw/tr ... -scripting

Lua only, and configured as a configure option (cmake -DLUA_SCRIPTING=ON/OFF ..):
https://github.com/maqifrnswa/openmw/tree/lua-scripting
not sandboxed, but can be done in a few minutes if needed.

Both scripting support libraries are actually already plugins that are installed to /usr/lib/games/openmw/. Could easily make a package/download for openmw for just the executable and make optional plugin packages or downloads openmw-python & openmw-lua that depend on openmw already being installed.

I think there is a value to having scripting languages that can create callable functions, run multithreadied scripts (coroutines in lua), interface with third-party scripting modules/packages (for future games), and there is a reason most free and commercial games choose those scripting libraries. However, there is also value in a unified scripting language, and morrowind already was written in one. The current interpreter/compiler does a very good job providing functionallity to that scripting language. It's up to release managers and project leads to figure out how to balance both needs (unified language versus new capabillities), so I'll just offer this work up to whomever wants it (under that same license openmw uses).
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: SWIG Scripting Extensions project

Post by psi29a »

For sandboxing Python, PyPy supports it out of the box:
http://pypy.readthedocs.org/en/latest/sandbox.html

It is more lightweight than Python itself, faster with a great degree of compatibility with existing Python modules.

I use it at work for our async Twisted projects.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: SWIG Scripting Extensions project

Post by Zini »

Even when OpenMW moves beyond MW (and we are talking about things like TCs here, not racing simulators or space fighters), I would still expect it to be primarily used by the larger (and expanding) MW modding community, that shares resources and knowledge (code snippets, tutorials and so on). Splitting this community up along the lines of different technologies won't be beneficial.
onionland
Posts: 68
Joined: 29 Jul 2014, 00:43

Re: SWIG Scripting Extensions project

Post by onionland »

psi29a wrote:Since the project is eventually evolving to be more than just Morrowind, wouldn't it be in the engine's best interest to be "pluggable"?
This, so much this!

Although it certainly is something for post 1.0, developing some form of handle for things such as the SWIG project (projects?) to be usable as plugins without the need to recompile openmw.

This would mean that the main focus would still be on the morrowind scripting language, as it would be the only language in openmw's own source, but that these sort of extensions could be installed with the vulnerability being in the hands of the individual plugins, and could potentially lessen the work that needs to be done on de-hardcoding openmw.

I would love to see openmw develop in a similar manner to ogre, with several projects being developed at its side.
wheybags
Posts: 207
Joined: 21 Dec 2012, 19:41

Re: SWIG Scripting Extensions project

Post by wheybags »

Zini wrote:Even when OpenMW moves beyond MW (and we are talking about things like TCs here, not racing simulators or space fighters), I would still expect it to be primarily used by the larger (and expanding) MW modding community, that shares resources and knowledge (code snippets, tutorials and so on). Splitting this community up along the lines of different technologies won't be beneficial.
My attitude would be less that it would be a "split" and more "kill mwscript with fire".
Seriously though, I would actually support deprecation warnings in opencs if you try to write mwscript.
Post Reply