79
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 05 Jan 2025
79 points (78.4% liked)
Games
39400 readers
581 users here now
Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.
Rules
Authorized Regular Threads
Related communities
Video games
Generic
- Gaming: Our sister community, focused on PC and console gaming. Meme are allowed.
- Cosy Games: Because not everything has to explode to make a good game
- Photo Mode: For all your screenshots needs, to share your love for games graphics.
Help and suggestions
- Tip Of My Joystick : You are searching for a game, but can't remember the name? Someone will find it for you here.
- Videogame Suggestions : Can't find a game to play in among the hundred you already own? Find another one to add to your library here.
- Patient Gamers: Gaming isn't only about having the latest great games. Good old games are there too.
Platform specific
- Linux Gaming : For everything related to gaming on Linux platform, be it on Steam Deck or Desktop Linux.
- Steam Deck : A Steam Deck specific community
Game specific
Language specific
Others
PM a mod to add your own
founded 2 years ago
MODERATORS
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.