denoland / tic-tac-toe

A global, real-time multiplayer TicTacToe game for Deno 🦕
https://tic-tac-toe-game.deno.dev
MIT License
78 stars 8 forks source link

Unacceptable Latency #6

Open GirkovArpa opened 5 months ago

GirkovArpa commented 5 months ago

I built a turn-based game where the game loop is basically a kv.watch() loop, using this (and a chat app) as inspiration. The latency is just as bad; up to several seconds for a single turn.

If this is the best multiplayer game demo for Deno, multiplayer with Deno is a dead end.

GirkovArpa commented 5 months ago

According to the README:

https://github.com/denoland/tic-tac-toe/blob/2800ce2a5c3488e9469baa4f8a81104e2e364e07/README.md?plain=1#L13-L17

These are listed as pros. However, they are major cons (in this context). You don't want your TicTacToe move zipping around databases distributed across the globe before it arrives on your opponent's screen with the (up to 10 second?) lag of Deno.kv. This is the opposite of the impression conveyed by the term "edge".

What you want is for your TicTacToe move to make a bee-line to the server then straight to them.