-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Issues with RollbackSynchronizer taking input from multiple Nodes with different authorities #236
Comments
Hi @BtheDestroyer, Thanks for raising this! I see that merging per property instead of replacing the whole input reference does bite us in As for having multiple input nodes with different authorities, could you please expand on your use case? Rollback code was built with the assumption that all input nodes will be owned by the player, since they provide their own input. |
I'm looking to send rollback-aware events from the server which could influence players' resignation. This includes assigning a random spawn point, spawning random items, and creating random environmental hazards. Since these are all random events, they need to be driven by the server and while I could pre generate a handful of events or share a seed with each client so they'll all end up generating the same random numbers, having the server report "this event is happening now!" and all clients respond to it is honestly both theoretically easier to implement and prevents cheating through predicting future. I originally tried just giving a Singleton a RollbackSynchronizer to trigger resimulations if an event arrived late, but the problem there was that (as I understand):
Maybe if there was a way to signify to a RollbackSynchronizer "hey, another rewinder has changed your state, so you need to rewind as well" that would be sufficient? |
I think I've got a solution for my "server-side events" problem:
Still unsure if this is the best option and I still think it makes sense for a RollbackSynchronizer with multiple Nodes with different authorities providing input to not completely break, but I wanted to share an option for other people who run into this issue. |
If a RollbackSynchronizer has input paths from multiple Nodes with different authorities, a "Invalid assignment on read-only value" error in
_submit_input
(rollback-synchronizer.gd:248
) will be produced as the Dictionaries contained within_inputs
are made read-only. UsingDictionary.merged
may solve this?There's also an issue where
_latest_state
gets way ahead of the client if they don't have authority over all of their RollbackSynchronizer input Nodes. For example, if I have an "Input" Node with the client as the authority and an "Events" Node with the server as the authority which both are used by the "Player" Node for_rollback_tick
, the "Events" Node's inputs coming from the server cause the Player's state to be assumed as fully server-determined even though their local inputs should still be considered.The text was updated successfully, but these errors were encountered: