this post was submitted on 05 Jan 2025
100 points (77.2% liked)

Games

33090 readers
1739 users here now

Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.

Weekly Threads:

What Are You Playing?

The Weekly Discussion Topic

Rules:

  1. Submissions have to be related to games

  2. No bigotry or harassment, be civil

  3. No excessive self-promotion

  4. Stay on-topic; no memes, funny videos, giveaways, reposts, or low-effort posts

  5. Mark Spoilers and NSFW

  6. No linking to piracy

More information about the community rules can be found here.

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] DerArzt 4 points 1 day ago (1 children)

Real talk what's wrong with Java? It's runtime is rock solid at this point and it's a very mature lang with a great ecosystem.

[–] [email protected] 10 points 1 day ago* (last edited 1 day ago) (2 children)

To be fair I'm being a dickhead.
I'm sure Minecraft's slowness has more to do with how it was built/tech debt and such than Java itself, as the mods that massively boost performance show.

[–] [email protected] 2 points 14 hours ago* (last edited 14 hours ago)

You know why villagers cause so much lag if there's too many and they're allowed to roam free? Well, rather than optimise their pathfinding logic they just... recalculate their paths every goddamn frame. They also take shortcuts in calculating their paths to reduce this overhead, so their movement is derpy and frequently kills them.

You could make the path then record all the blocks they will interact with, and only recalculate if one of those blocks changes. Boom, millions of operations eliminated, and you've got some spare time to make sure the paths will actually work. You could also stagger pathfinding so if a bunch of villagers need a path all at once - like you just blocked a path to where they were all going - you could spread out that load, and prevent lag spikes.

But they don't do that, so people end up sticking them in tiny boxes on top of carpets so they stop trying to pathfind. Just absurd stuff.

[–] DerArzt 1 points 23 hours ago