1. Idle Together
  2. News
  3. Game Resource Optimization

Game Resource Optimization

After many updates, the game has become a much more substantial experience, requiring more and more calculations, especially as updates allow players to progress farther and faster. That’s why it was time for a first round of optimization. Fortunately, I had planned for this !

In the settings menu, you can now choose a performance level, ranging from minimum to maximum, with a total of 5 performance levels available.

To help you understand what each level does, here's what I implemented :

  • At the lowest level, all optional visuals like grass textures are removed, random generation is simplified and more uniform, and the calculations made by villagers are coarsened.
  • At the highest level, no optimization is applied: all textures, randomness, and villager calculations are rendered exactly as originally intended.
Let me give you some examples with the villagers :

  • Walking animation : every animation frame is counted to allow a smooth transition and synchronous restart when rotating. At minimum (or medium when too many villagers are present), frames are no longer tracked, the default animation just replays from the start. At maximum quality, there’s no restriction: every frame is always counted, regardless of how many villagers are on screen.
  • Villager calculations : to optimize performance, I artificially reduce numerical values. Processing a "1" is faster than processing a "2", so this causes small "inconsistencies" as optimization ramps up, based on the number of villagers.

I ran some calculations to figure out the maximum optimization I can apply without causing issues that would require recalculations. Hopefully I didn’t mess it up, I did run a few tests !

In fact, you might notice that once you reach a certain threshold of villagers, your FPS might increase.

Right now, I’m working a bit blindly, I really need your feedback based on your hardware to determine what optimization parameters I should tweak. It’s possible that current settings aren’t sufficient.

Nevertheless, there’s a limit to how much optimization I can do. Eventually, if you want to maintain your FPS, you’ll have to drop to a lower performance level. I still have a bit of wiggle room and some tuning to do, like deciding how many villagers it takes before increasing resource optimization.

Meanwhile, I found a few minor improvements and applied them, but they should have a negligible impact so I won’t go into detail.

I hope this helps your setups go further into the game before things start feeling uncomfortable. Share your feedback on the game’s Discord, and I’ll see you soon for the soundscape update !