Hotfix v1.0.2 - The Real Performance Fix

Element Idle · published

The 1.0.1 hotfix helped, but several of you came back and said the game was
still running badly. You were right. Thank you to Dark-Noir, maplesyrupghost,
stan, YaSHivaDa and shpasic for reporting it with specific detail - that's
what let me find what I'd missed.

Last patch I fixed the system that was SENDING too many updates per frame,
and stopped there. I never checked what the systems RECEIVING them were doing.
Two of the worst offenders had nothing to do with that bug at all, which is
why some of you saw bad framerates with zero particles and nothing running.

PERFORMANCE - five separate problems, all fixed:

- The Periodic Table was rebuilding all 118 element buttons every single
frame (~28,000 style objects per second), even while you were on a
different tab. This was the biggest cost in the game, and it got worse the
more elements you owned - which is why it "got laggy at higher numbers."

- The ambient hum was a 3-second sound that wasn't set to loop, so the game
re-synthesized the entire audio buffer from scratch every 3 seconds,
forever, on the main thread. If your fans were spinning up, this was why.

- The atom animation drew its four orbit rings as 256 separate line segments
every frame - to draw shapes that never change.

- The click sound was also rebuilt on every single click. That's specifically
why fast clicking was worse than idling.

- The project was set to Godot's Forward+ renderer, a full 3D lighting
pipeline. This game draws circles and buttons. Now on Compatibility, which
is far lighter and should help older GPUs most.

AUDIO SETTINGS NOW SAVE
Turning the sound off didn't stick - the save file stored thirteen things and
not one was an audio setting. Volume, SFX and ambient hum all persist now.
Thanks maplesyrupghost.

FIXED BROKEN CHARACTERS IN THE UI
I'd used emoji the engine's default font has no glyphs for, so they rendered
as empty boxes - the splash screen was literally showing a box before the
title. All replaced with plain text. Thanks stan.

ALSO
- HUD no longer rebuilds its text 60 times a second
- Floating click numbers reuse a pool instead of creating a node per click
- Removed debug console output firing every 30 seconds in the release build
- Fixed the Save button's confirmation text getting stuck

WHAT'S NEXT
This patch is only performance and bug fixes. The balance complaints -
prestige stalling out, cheap elements not being worth buying, the skill tree
filling too fast, auto-click gated too deep - are all real and I've done the
maths on them. shpasic identified a genuine design flaw I introduced in
1.0.1. Those need proper testing, so they're coming as a larger update very
soon along with a reworked skill tree.

This is my first game and every one of these fixes came from a player taking
the time to be specific. Thank you it truly means a lot to me!

- Ben, Chalk Creative