Closed Roang-zero1 closed 5 years ago
I will clean up the code some more, but the features are there and can be tested!
Ok I've found out there is still a performance problem with large bases, so I would hold of on releasing this branch until this is released.
Awesome work! I accidentally merged it to master, but now moved it back to the feature branch. I haven't had time for a proper test of it yet :(
About the big bases issue: One possible (major) change to the update logic is that we let go of the global dict of machines and their signals. Instead, updates would only happen around each player that want the signals shown (by re-scanning regularly). It would still be possible to cap the global number of updates per tick, and when its time for a new scan around a player, that scan would be the only computation that tick, so it might be fast enough.
Pro:
Con:
Sorry I did not elaborate enough it was just a quick message to make sure you do not release the version yet. The problem is not with the mod update logic but the game functions for updating sprites. When there is a large number of sprites (>200k) changing a sprite or tint may take up to 11ms. So changing it to be only around players would unfortunately not fix this if the player is in the newer parts of the base (higher rendering id). I will file a bug report in the evening and link it here.
As mentioned in #52 I've updated the code to use the new 0.17 rendering engine.
I've also rebased the branch on master to include the latest fixes, just fyi.