Skip to content

Conversation

@VirxEC
Copy link
Collaborator

@VirxEC VirxEC commented Dec 26, 2025

Fixes #37

@VirxEC VirxEC changed the title Properly update Renderer.can_render (Fixes #37) Properly update Renderer.can_render Dec 26, 2025
Copy link
Contributor

@NicEastvillage NicEastvillage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think this solution is ideal as it couples the renderer to the manager and it will not work correctly without it, thus reducing flexibility. For example, I cannot make a custom renderer and have its can_render flag update, unless I store it as self.renderer in my bot or override the msg handler.

I suggest putting the can_render flag on the RLBotInterface and then have the managers and the renderer read that flag instead.

E.g. in the renderer:

@property
def can_render():
    self._game_interface.can_render

@VirxEC
Copy link
Collaborator Author

VirxEC commented Dec 28, 2025

ah, probably a good idea

@VirxEC
Copy link
Collaborator Author

VirxEC commented Jan 3, 2026

Done, moved can_render to SocketRelay; Bot/Hivemind/Script integration is still required a bit for the post-match-start render enable/disable messages because SocketRelay itself doesn't know who it represents.

@NicEastvillage
Copy link
Contributor

The server will respond with a status change message to confirm the change though, right? So you don't need the extra integration if you just update can_render when receiving a RenderingStatus message.

EDIT: Just checked, and no, the server never sends the RenderingStatus message under any circumstances. That seems like a bug.

@VirxEC
Copy link
Collaborator Author

VirxEC commented Jan 3, 2026

I was under the initial impression that render status updates were broadcast to all connections, not just the updated connection. This means that bots need there own filtering logic and the integration is required. If the update is only sent to the updated connection then you would be correct. The RenderingStatus message not being sent ever definitely seems like a bug.

@NicEastvillage
Copy link
Contributor

The relevant snippet: https://github.com/RLBot/core/blob/master/RLBotCS/Server/FlatBuffersSession.cs#L423-L435

My understanding is that it was supposed to be sent to the relevant process and possibly the match host (e.g. the GUI). The FlatbufferSession has to check the index anyway, so it would be easy to insert a message here.

@VirxEC VirxEC merged commit 8537bfa into master Jan 3, 2026
@VirxEC VirxEC deleted the can_render branch January 3, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renderer.can_render has the wrong initial value

3 participants