Could use better time synchronization for game API
- Langage dominant
- Haskell
- Étoiles
- 1.3k
- Forks
- 201
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Currently, game clients are synchronized relative to the moment they receive the "game started" message from the game server. If that one packet is delayed (by a TCP drop and retransmit, for example), a client will persistently remain behind the others in time. That means other clients will appear jerky, as they keep going back to add events in the more distant past, then replaying their own events from that point. In fairness terms, the lagged client gets an unfair advantage, as it receives other players' events in the future before they actually occur, but other clients don't see its own events until well after they occur.
To fix this, we should add some kind of NTP-like time management code to revise each client's current timestamp toward a consistent value regardless of any original discrepancy. (But keep in mind that it's critical for correctness that time is monotonic, so we can never decrease a client's timestamp; only slow its rate of increase to allow other clients to catch up.)
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
L’issue ne mentionne aucun fichier, test ou point d’entrée. Commencez par localiser l’initialisation de l’horodatage du client et le code de synchronisation des événements de l’API du jeu, puis suivez la manière dont le message game-started établit le temps. Le travail est considéré comme terminé lorsque les clients convergent vers un horodatage monotone cohérent sans diminution du temps local, et que les tests couvrent les messages de démarrage retardés ou retransmis.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- haskell
- Domaine
- distributed-systems, game-dev, networking
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100