-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Synchronise player tools and focus between clients #274
Synchronise player tools and focus between clients #274
Conversation
@kaenganxt I accidentally created this without setting it to draft. Would you be able to change this to a draft, I don't think I have permission |
1ae0590
to
cf949cf
Compare
What's the state on this? Are only the three remaining tools missing before this is ready? |
… local render passes.` - Fixes issue where the default NetTool's angle label is rendered over other client tools
Please continue working on this pull request :) |
e57abf1
to
fa05684
Compare
I changed/implemented the following things in my new commits:
The transport tool implementation is still not working correctly, but this is caused by the basic transport line synchronisation being bugged when two players build lines at the same time. The disaster tool will be looked at when implementing DLC features. The PR should build correctly once the Cities assemblies are up to date. |
I'll update the assemblies when I get home this afternoon |
Updated the assemblies, lets see how this goes |
Based on the feature request #198
Overview
This feature aims to synchronize each clients tool state with other player so players can see actions other players are performing. From some early attempts it is possible to share the internal state of each player's active tool and hook it into render loop of the game. There is no need to reimplement the render logic for each tool and only the state required for rendering each tool needs to be shared.
Features
^ These tools aren't normally available within the normal game. We would want to support it so if a mod exposes it in gameplay it will be synced.
^^ Doesn't have dedicated rendering logic.
Future Ideas
LineRenderer
Bugs
Technical notes
ToolSimulator
The
ToolSimulator
is the critical component that is responsible for holding onto the synced state of each tool. I have made this implement theSingleton<T>
class so it exists as aGameObject
in the Unity engine. Very useful for debugging with ModTools.Maintenance
Since this mod is reading and writing from private fields within the game's tools there is a risk that a change in a field name can break the syncing of tools. it would likely be on a tool-by-tool basis.