I was dealing with roughly 3500 cells total at that stage, and in the interest of time I didn’t optimize a single damned thing. After all, while testing with an integrated graphics card I even had effects and sheez and the game was looking great at ~60fps (CPU bound), so there was clearly no need to optimize anything, we’re good baby!
Thing is, on Desktop and Mobile by default Godot uses a Vulkan-based renderer that is performant, full of features and overall awesome. On Web however, it needs to use an OpenGL 3 based compatibility renderer that is much more limited. No effects, much smaller limits on things like how many meshes it can render at once and no per-instance uniforms! I could only get it to show anything at all when I reduced the tower to just 3 strata. That was not nearly enough
So I ended up having to spend the two last days of the Jam refactoring my approach and using multimeshes instead of individual objects - basically, several mesh instances are combined in a single mesh resulting in a single draw call, but retaining the ability to be individually positioned and colored. A bit like dynamic batching in Unity, with different trade-offs.
I’m glad I didn’t go this route right away because it allowed me some freedom to experiment, but I’m glad to say implementing this was much easier than I feared. The more I use Godot the more I like it, it’s uncanny. So when I was done, I reduced my draw calls from a peak of ~2500 to ~45. The multimesh also allowed me to easily set vertex colors, so I used that to make cells darken with age instead of the unsupported-on-web per-instance uniforms. A good solution solves multiple problems, right?
Didn’t really have time to find a way to make the glow effect on the web. Pretty bummed about that, it adds so much to the game