this post was submitted on 14 May 2025
437 points (99.3% liked)

PC Gaming

11234 readers
344 users here now

For PC gaming news and discussion. PCGamingWiki

Rules:

  1. Be Respectful.
  2. No Spam or Porn.
  3. No Advertising.
  4. No Memes.
  5. No Tech Support.
  6. No questions about buying/building computers.
  7. No game suggestions, friend requests, surveys, or begging.
  8. No Let's Plays, streams, highlight reels/montages, random videos or shorts.
  9. No off-topic posts/comments, within reason.
  10. Use the original source, no clickbait titles, no duplicates. (Submissions should be from the original source if possible, unless from paywalled or non-english sources. If the title is clickbait or lacks context you may lightly edit the title.)

founded 2 years ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 92 points 3 weeks ago* (last edited 3 weeks ago)

What a grand and intoxicating modding community

[–] [email protected] 76 points 3 weeks ago* (last edited 3 weeks ago) (4 children)

... Ok, that is legitimately impressive, from a technical standpoint.

Lua is a high level, not exactly very 'fast', very performant language. It is designed to be very, very human readable, and coding noob friendly.

Getting a 3D physics engine to work ... in lua... is not something I would have thought possible.

Usually you need to use a much lower level language to ... actually do that.

EDIT:

A few other commenters have now pointed out that this is actually using LuaJIT... which passes Lua code to a C compiler, quickly translates and then compiles in C, and then runs in C.

So, that makes much more sense, its functionally running in C, a lower level, compiled code language.

Still impressive nonetheless!

[–] [email protected] 30 points 3 weeks ago (4 children)

It is designed to be very, very human readable, and coding noob friendly

As someone who can't wrap my head around lua syntax, I will have to assume I simply have too much coding experience

load more comments (4 replies)
[–] [email protected] 17 points 3 weeks ago (2 children)

Lua is pretty fast actually, though I don't know how it compares to compiled speed.

[–] [email protected] 5 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I haven't benchmarked anything in a while, so it is possible Lua is more performant now than it once was... but in my (out of date) experience, python is faster than Lua, and nearly every language that is actually compiled is... one or two or three orders of magnitude faster.

Though it is also worth mentioning that Lua is fairly simple to plug in to some kind of database language, which can result in reasonably good performance in situations involving say... dynamically spawning or unspawning tons of inventory style minor items, or containers with them.

Lua has been fast enough to handle a simple 2D physics engine... but this is the first time I am hearing of it handling 3D.

[–] [email protected] 4 points 3 weeks ago

At the dawn of mankind's perversion Lua was used for 3D

[–] [email protected] 3 points 3 weeks ago

Lua can be very fast using LuaJIT or similar

[–] [email protected] 11 points 3 weeks ago (2 children)

So from what I can read, the Morrowind Script Extender uses LuaJIT instead of regular lua, which does tracing just-in-time compilation. Meaning, and I'm just paraphrasing wikipeda here, it compiles frequently executed sequeneces of operations into machine code.

[–] [email protected] 5 points 3 weeks ago

This appears to use OpenMW, not MWSE

[–] [email protected] 4 points 3 weeks ago* (last edited 3 weeks ago)

Now, that is a very relevant detail!

I did not know LuaJIT was even a thing.

Still probably not as performant as ... C++ or Rust or something, that is totally precompiled... but that would explain how this is even possible, a 3D Lua based physics engine.

Yeah, looks like LuaJIT passes a bunch of the Lua code into C, just good ole C, and then dynamically compiles it, then runs the 'translated' C code.

That makes a lot more sense lol.

[–] [email protected] 8 points 3 weeks ago (8 children)

Imma be the guy and drop an ackshually

  • Nothing about Lua would make it difficult to implement a physics engine in it compared to other languages
  • The hardest part would be integrating with Morrowind's systems. If the engine doesn't expose e.g. collision geometry to scripts in an efficient way, then you'll run into some real challenges
  • Even without LuaJIT, there's no reason to expect performance so bad you can't implement realtime rigid body physics. Interpreted Lua is fast, but even if it wasn't, a 60 fps performance target for physics is not tough to achieve at all
[–] [email protected] 3 points 3 weeks ago

Can confirm

load more comments (7 replies)
[–] [email protected] 29 points 3 weeks ago (1 children)

Does anyone recall what wound up becoming of the RTX tech demo which applied Ray traced lighting to Morrowind? The old axiom holds true, any mention of Morrowind results in at least one person reinstalling it, and it appears im the guy this time.

[–] [email protected] 3 points 3 weeks ago (1 children)

One day I'll do a exploit-free playthru of Morrowind. But it's not this day...

[–] [email protected] 4 points 3 weeks ago

Exploiting Morrowind's systems is a hobby unto itself. For years, the only copy I had access to was the Xbox release (not even the GOTY edition). Without the dev console, I had to discover other ways to bend the game to my will.

To this day, I have to resist the urge to steal the Limeware Platter from the customs office, not to mention sequence breaking by phasing through the barrel with Fargoth's ring in that building's courtyard. Since you hadn't technically completed the tutorial and been released from custody yet, you could zip around the whole island, stealing with impunity and assembling quite the nest egg for your playthrough.

[–] [email protected] 28 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

While awesome for just the technical aspect, I actually would find this to be a downgrade in the way I play, since it would mean no longer being able to make staircases out of books and pillows, as they would actually fall if they had physics. 🤣

[–] [email protected] 6 points 3 weeks ago* (last edited 3 weeks ago)

Cyrodillic Brandy has no physics and wont fall. Staircase away, my friend. Especially if you know how to dupe. (its ridiculously easy)

[–] [email protected] 21 points 3 weeks ago (1 children)

Damn, I should really play it huh

[–] [email protected] 26 points 3 weeks ago (14 children)

*peers suspiciously at username* Hmmmm...

Anyway, OpenMW is amazing and the best way to play the game these days. The only bad thing I can say about it is the expanded draw distance shows how tiny the world map actually is, but that's both not their fault and extremely minor considering how content dense Morrowind is.

[–] [email protected] 6 points 3 weeks ago (1 children)

You can adjust the draw distance/fog amount in OpenMW, you know…

[–] [email protected] 3 points 3 weeks ago (2 children)

Also... isn't the base game's level of fog... more or less canonically justifiable, due to most of Morrowind taking place in... a swamp/bog type of biome?

That or a volanic death zone that could just be said to have lots of gas plumes and such?

load more comments (2 replies)
load more comments (13 replies)
[–] [email protected] 15 points 3 weeks ago (2 children)

I just need controllers to work in menus

[–] [email protected] 14 points 3 weeks ago (1 children)

I'm shocked someone hasn't grabbed the files from the Xbox release and used their implementation as a base. It wasn't great, but it worked well enough on a controller considering how complicated Morrowind's UI was.

[–] [email protected] 5 points 3 weeks ago

I'm hoping the lua in OpenMW 0.49 willallow for it to be implemented. If I ever get free time I might try my hand at it.

[–] [email protected] 4 points 3 weeks ago

Controllers kind of work.

They let you control the cursor. Actual support would be better, of course.

[–] [email protected] 12 points 3 weeks ago (7 children)

But useful idiots told me people won't work for free.

load more comments (7 replies)
[–] [email protected] 9 points 3 weeks ago

The article has the link buried so deep. https://github.com/MaxYari/OpenMWLuaPhysics

[–] [email protected] 8 points 3 weeks ago

But do they also randomly explode all over the place when you enter a room?

[–] [email protected] 8 points 3 weeks ago (2 children)

So now my thief can simply stack crates to get to a store's unguarded second level instead of grinding the acrobatics skill? Nice.

I know they try to remain faithful to the original design, but I can't help but wonder how hard it would be for the OpenMW devs to integrate a full modern physics engine such as Jolt or PhysX into the engine. Probably much easier than building one from scratch in Lua of all things!

[–] [email protected] 7 points 3 weeks ago (1 children)

I know they try to remain faithful to the original design, but I can’t help but wonder how hard it would be for the OpenMW devs

I would love it if, after OpenMW hits 1.0, they set a new goal of feature parity with Skyrim (or Skywind).

[–] [email protected] 3 points 3 weeks ago

A post 1.0 goal is to be a general engine replacement for many Bethesda titles. OpenMW would be a platform for other projects to build OpenOblivion, OpenNewVegas, etc on.

load more comments (1 replies)
[–] [email protected] 8 points 3 weeks ago

This kinda s'wit really makes my day, my n'wah

[–] [email protected] 6 points 3 weeks ago
[–] [email protected] 3 points 3 weeks ago

OG programming language developed by OG Brazilian nerds implemented into OG morrowind by OG modders

[–] [email protected] 3 points 3 weeks ago (1 children)

You should take a look into KSP and Rimworld modding. Adding emtirely new physics is only the cup of the cake there.

load more comments (1 replies)
load more comments
view more: next ›