Today was satisfying, ultimately, after a slow start that seemed would end badly. Later in the day, though, I just started trying some things, and it started to come together.
I ended up at the point where I have multimesh instances for both the edit grid and the game’s grid points. That was one difference that simplified things: instead of having a single set of grid points that appear, disappear and change sizes depending on state, I went with one multimesh instance with the full set of grid points for editing (which can be shown or not shown) and then another multimesh instance for the game’s grid points. And instead of trying to augment the multimesh points incrementally, the code just rebuilds them from the sparse nodes whenever a change is made. It seems fast enough, it only happens during editing (so it doesn’t have to work everywhere), and I haven’t seen any negative effects to it.
Some of today was spent looking at draw calls and other display statistics, and some simple changes made quite a difference in the numbers.
A significant change was the realization (after reading some Godot reddit posts) that I had shadows turned on for grid points, grid lines, conduits and pulses, none of which need shadows. Turning off shadows reduced draw calls for each by 75% (4 calls to 1 call). Adding a conduit now only adds one draw call, whereas before it added four.
Pulses also still had the full default settings for a cylinder (4 rings and 64 radial segments), so reducing those down improved the number of vertices used greatly where a source is starting up.
The next step in being able to resize a level is to resize the sparse nodes to the new size. I can think of a brute force way to do that, which I might just go with to start.
Get it working, and then get it working better.
Day 17, over and out.