-
Notifications
You must be signed in to change notification settings - Fork 212
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
GPS - Use distance the server received. #1627
base: mc-1.20.x
Are you sure you want to change the base?
GPS - Use distance the server received. #1627
Conversation
Fix fallback failure: we should check for both 3 and 4 arguments.
I feel like this is something that would need to be well tested.. Like is there actually meaningful difference between distance that GPS host gest vs distance that GPS locate call gets? |
So there is potentially some delay between the original message being sent and the response being received. On most systems I'd expect this to occur in the same tick (see some of the comments in That said, I still don't entirely understand the behaviour of GPS when the querying computer is moving. See also the discussion in #901, where I'm still very confused why Speaking of which, it might be interesting to do similar experiments like in #901 and see how it compares. |
I do have some concerns here about how this now requires a unique message for each requesting computer1, but that's probably niche enough it doesn't really matter. Footnotes
|
Ooh, yes. I did mean to account for that. In theory the IDs wouldn't need to be anything fancy. Just enough that a collision doesn't occur once per tick essentially -- a randomly generated number. Having an ID could also be beneficial so you don't receive GPS pongs meant for other requests. There's an easier solution to receiving pongs meant for other computers, though...os.queueEvent("clear") os.pullEvent("clear") local x, y, z = gps.locate()
I'm curious if this would be worth implementing into the GPS program. Something like |
Hmm, update on that. Including an ID would be a breaking change. Currently |
Sorry, I think I missed your latest reply! This is one of those cases where I'm not actually too worried about breaking custom GPS servers - as long as protocol changes don't cause crashes it's probably fine. I'm was a little wary about how this will interact with anonymised GPS, but it occurs to me that while the computer ID is hidden, it's still fairly easy to track players with the current system. I have mentioned some changes to long-distance GPS in #955 which I don't think affect this (compliant GPS servers can still choose not to broadcast the distance component), but worth mentioning. |
Perhaps it would be better to just create a |
I had a very random thought at 2 am today.
The GPS hosts receive a distance from the client, but then the hosts all send separate messages to the client. These separate messages may be sent at different times, meaning the player, turtle, or whatever, might have moved a slight bit in that time.
Thus, my thoughts are as follows:
This is a really half-baked idea and fueled by way too much caffeine, but I thought I'd get the thought out there before I forgot about it. I have no idea how I'd test if this actually is happening (or if these changes even mitigate anything), but I recall having minor accuracy issues with GPS in the past. In theory (if my theory is right), this would resolve some accuracy issues.