Search found 69 matches

by ptmikheev
02 May 2021, 00:26
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

So it will not work the same as Papyrus in Skyrim. But we will be able to use Lua coroutines in some form. I'm aware our threading model is pretty different to that of Papyrus, but we're eventually going to need to support transpiling papyrus to OpenMW Lua (or write a Papyrus/Papyrus bytecode inter...
by ptmikheev
30 Apr 2021, 16:26
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

Lua MR is ready. I hope it will be merged soon (but it will not be included to the 0.47.0 release). Builds for testing: https://gitlab.com/ptmikheev/openmw/-/pipelines/295138173 Documentation: https://openmw-lua-work-in-progress.readthedocs.io Quick start: how to run a script Example mods: https://...
by ptmikheev
18 Apr 2021, 13:18
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

To do that properly, it couldn't be done via scripts since AI isn't script-driven. Unless we move all AI processing to scripts, in which case you'd replace/override the AI script functions. Yes, there is a plan to make AI script-driven. But of course it will take a lot time and effort. It's also po...
by ptmikheev
17 Apr 2021, 21:16
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

There is not enough evidence to tell that there is a real need to make it "inherent". There is only a vague term "heavy scripts" yet. With async physics main thread handles such "hardcoded" things: 1. Input 2. UI 3. Game mechanics 4. AI 5. Scene graph tweaking Lua scri...
by ptmikheev
12 Apr 2021, 23:51
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

IMO, separate thread here is a premature optimization. It is not. If it is not inherent in architecture from the beginning, it will never be possible. With such a logic you can also say "it is too early to think about the multiplayer" and block the possibility of having it in the future b...
by ptmikheev
08 Apr 2021, 02:39
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

If we could trust mod developers, maybe we could let them flag stuff as either needing handling in a hurry, or being handleable at the engine's convenience, and do the first category for the same frame, but defer the other category until whichever point in the frame it fit best, even if that added ...
by ptmikheev
07 Apr 2021, 21:05
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

If a script controls something like a UI element changing colour when you hover over it (not the best example as that'll probably stay MyGUI's job for the foreseeable future, but there's plenty that's analogous to that in a game), a user will absolutely notice one frame's delay in scripts processin...
by ptmikheev
04 Apr 2021, 23:35
Forum: General Development
Topic: Lua scripting in OpenMW
Replies: 137
Views: 110921

Re: Lua scripting in OpenMW

On plenty of machines, the cull traversal is the slowest thing. It is exactly the reason why it is important that Lua can work in parallel with it. It is the only way to support heavy scripts without affecting frame rate. If we have other intensive things happening on another thread, then we're at ...
by ptmikheev
04 Apr 2021, 11:29
Forum: General Development
Topic: Lua API for GUI
Replies: 30
Views: 25275

Re: Lua API for GUI

In this case, we have more or less the same limitations as tes3mp server-driven UI. That means that the parts of my tes3mp PR one could call hacky for OpenMW are not hacky at all :) And what are the limitations? Currently I don't see any reasonable alternatives to this solution. The choice between ...
by ptmikheev
04 Apr 2021, 02:17
Forum: General Development
Topic: Lua API for GUI
Replies: 30
Views: 25275

Re: Lua API for GUI

I don't really see why it's fine to run MWScript before the cull traversal, but Lua needs to be done in parallel and then applied to the frame after. Lua should be faster than MWScript. Also, as the rendering guy, that's when I want the entire CPU available to me and no one else so I don't get othe...