-
-
Notifications
You must be signed in to change notification settings - Fork 126
Variable Tick Rate #549
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
Variable Tick Rate #549
Conversation
|
A fix for |
|
|
I didnt notice these before :) |
|
Does this system handle players switching the view to the world map? I personally wouldn't consider a player checking the map as being active on a map. |
|
(This message is mostly me thinking about the future, it's not a request to change anything in here. Just discussing plans for the future.) I've got to say, this is a good system, but I personally feel it could be expanded to include periodically sending player camera info (once every few seconds at most if camera position/zoom level changed). Perhaps also configurable? Option to sync maps only or maps and camera data. As well as frequency of re-sending camera data. My reasons for syncing camera positions:
Perhaps we could make it work similar to how I've handled it in my Rocketman fork? I've use this simple data structure with a dictionary, which (excluding the map) we could perhaps use instead of just the player count on a given map: |
Currently yes, I'm not sure it would be worth it changing and informing everyone they are no longer on a map if they open the world map? |
I believe that space maps use |
|
Actually, looking back at my old Rocketman code made me think... Does this code properly handle player disconnections? If some were to join, open a map, and then disconnect, would the counter go down as expected? |
I don't think it will, another thing I'll have a look at |
I did initially have something like this, only taking into account the players mouse position though, camera is definitely a better way to do this. |
- Now removes a player count from a map tile if the player opens the world map.
- Added some static variables to avoid magic numbers ;P
|
@SokyranTheDragon
|
| public static int lastSentTick = -1; | ||
|
|
||
| // Vtr rates | ||
| public const int MaximumVtr = 15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just noticed these are already defined in Thing, we could probably use those.
- Changing maps to not work correctly. - Double counting when moving from world map into a new map
|
Thinking a bit more about this - perhaps we should change this in the future to keep a Again, just like with syncing the camera, this is mostly me sharing my ideas. Low priority and all that. |
I like this idea. |
Variable tick rate implementation
Updates:
NOTE: This will not work by itself, it needs other general 1.6 updates as found in my other PR
I separated this one as I think it could have some discussion around the best way to implement it.