this post was submitted on 14 May 2025
392 points (99.5% liked)

PC Gaming

10989 readers
882 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
you are viewing a single comment's thread
view the rest of the comments
[–] Zahille7@lemmy.world 2 points 7 hours ago (2 children)

Project Zombie and GMod both use Lua scripts. GMod is also one of the best physics sandboxes imo, and has like the most mods on the workshop ever.

[–] Leuthil@lemmy.world 5 points 6 hours ago* (last edited 6 hours ago) (1 children)

The physics in GMod isn't implemented in Lua though. It was already part of the Source engine.

Unless GMod isn't referring to Garry's Mod.

[–] sp3ctr4l@lemmy.dbzer0.com 1 points 4 hours ago* (last edited 3 hours ago)

Yeah, was gonna say this.

If you actually do use Lua to significantly alter the actual physics, shit gets fuckywucky really, really fast... its quite inefficient and laggy.

I know, because I've tried to implement custom physics manipulations in Gmod via Lua... the netgraph, and server side lag, becomes absolutely absymal, really fast, if you're trying to use it for more than just a few objects/interactions at a time.

Like the uh... Armored Combat Framework?

That uses Lua to allow you to construct your own custom tanks and what not?

That tries to do things like penetration/ricochet calls on physics and collision hulls... through Lua?

Astoundingly inefficient and laggy in pretty much any situation with more than 3 or 4 vehicles operating and engaging each other at the same time... especially so if they are using high rate of fire autocannons or machine guns.

You have to have an unusually powerful server to be able to handle more than that, and its still gonna chug as you scale up conflict sizes.

As I remember, most ACF servers had/have a bunch of rules about giving warnings before you dupe spawn or dupe save a vehicle design, have maximum part complexity limits, have designated build and designated battle times, or just seperate servers for each... because using Lua to handle so much physics stuff is so often likely to cause server stalls and crashes.

[–] sp3ctr4l@lemmy.dbzer0.com 2 points 3 hours ago

Project....Zombie?

Do you mean Zomboid?

If so, Zomboid isn't ... the physics aren't done in Lua.

The base of the game is written in C++, and then certain parts of that are exposed to modders via an API that works with Lua.

https://expertbeacon.com/is-project-zomboid-java/

The physics engine is written in C++.

Because Lua is waaay too slow, and even compiled Java is about 4x as slow as C++.