SWIG Scripting Extensions project

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

Re: SWIG Scripting Extensions project

Post by Zini » 11 Feb 2015, 13:53

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: 4803
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: SWIG Scripting Extensions project

Post by psi29a » 11 Feb 2015, 14:57

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
MajinCry
Posts: 51
Joined: 15 Oct 2014, 21:02

Re: SWIG Scripting Extensions project

Post by MajinCry » 11 Feb 2015, 21:39

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.
CPU - i7 6700k @ 4.0Ghz
GPU - Vega 56
RAM - 2x16GB DDR4 3000MHz
Mobo - Asus Z170 Pro Gaming
Soundcard - Creative Soundblaster X-Fi Titanium Fatal1ty Pro
OS - Win. 10 LTSC 2019 x64

User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Re: SWIG Scripting Extensions project

Post by Zini » 12 Feb 2015, 22:56

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: 4803
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: SWIG Scripting Extensions project

Post by psi29a » 12 Feb 2015, 23:49

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 » 13 Feb 2015, 03:26

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: 4803
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: SWIG Scripting Extensions project

Post by psi29a » 13 Feb 2015, 09:05

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: 5537
Joined: 06 Aug 2011, 15:16

Re: SWIG Scripting Extensions project

Post by Zini » 13 Feb 2015, 11:41

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: 65
Joined: 29 Jul 2014, 00:43

Re: SWIG Scripting Extensions project

Post by onionland » 14 Feb 2015, 02:02

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 » 15 Feb 2015, 02:26

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