New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Use entity status and script rendering #52
Comments
Thank you for the reminder. I've been looking forward to these changes, but haven't had much time to develop the idea. I've added a first attempt at it in the |
I would like to take a shot at the rendering engine to replace the spotlight entities. Would you be interested in me helping out with developing this? |
@Roang-zero1 I'll try to help out, but I cannot promiss much, since I'm a little strapped for time these days. The primary target feature is the per-player visibility. The new rendering api allows to specify a list of players for whom the graphics is shown. I suspect it might be fast enough to keep that list up to date in the mod, and then have the update function blindly destroy the old signal and draw the new signal with the up to date list of players. |
Just change it on the signal for better performance. I specifically made everything writable so that you don't have to destroy + recreate. |
As mentioned in the pull request (#53) there is still an issue with performance of the rendering engine call, this preventive of merging the changes. I've opened a request on the forums to address this: https://forums.factorio.com/viewtopic.php?f=28&t=69230 |
As per forum thread it will not be possible to use the new rendering engine for Bottleneck due to low performance on the number of renderings needed. |
Just a quick update was busy with work so no time to work on this, but I will continue work in the upcoming week. |
It's a shame that a functionality which almost seems specifically tailor-made for this exact kind of usecase isn't actually the best option. :( |
Finally had the time to complete the modification, so the part of the 0.17 API (entity status) that can be used is now included. See #62 . |
With 0.17, you can use https://lua-api.factorio.com/latest/LuaEntity.html#LuaEntity.status to get the entity status in a performant way.
Furthermore, you can use the script rendering for per player visibility.
The text was updated successfully, but these errors were encountered: