New answers tagged

2

Once I faced this particular problem. My approach was to make the code dumber. I hard baked the precomputed offsets for different load distances. And then I would just go over them, and add the offset to the coordinates of current chunk where the player is located. I had not to worry about any distance check because the offsets were precomputed for that. I ...


0

Now, while I wrote the question I had an idea and the solution was actually simple. But I thought I'd still throw it up here in case someone has a similar challenge. Be reminded, I selected the most optimal data structures - but if you find something to improve here, feel free to inform me! The solution is: Get all chunks in a rectangle as described in the ...


1

You can tame this in the same way we tame other \$n^2\$ interactions in games, like collision detection: use a spatial partition to break it into smaller, more tractable pieces. Let's say I divide my world into 500 m x 500 m chunks. As players move around the world, the server keeps track of which chunk each player is in. When a player enters a new chunk, ...


0

It looks like for Rimworld specifically there is an ongoing project to create a profiler mod: https://github.com/Dubwise56/Dubs-Performance-Analyzer From those diagnostics it looks like the performance issues I am seeing come from garbage collection (and so indirectly memory allocation). In theory it would also be possible to get profiling info from the ...


0

I can't comment because I don't have enough rep, but ignore that 'clustering 5/11 jobs' comment. That is unity baking Light Maps and has NOTHING to do with the prefab performance increase you are discussing. I can't comment on Prefab performance, but would like to know if they do help. I hope they do, it seems like it would make sense. Any information you ...


1

I went ahead and replied to Oskar Stålberg's tweet about this technique to ask for clarification. (Try it yourself! Most game developers who post about their work on Twitter are happy to share more details & insights with their peers) Here's what he said: In an old implementation of WFC I used to rebuild the possibility space around a contradiction. ...


Top 50 recent answers are included