Send chunks to players connected to server

This commit is contained in:
2026-09-28 11:14:40 -03:00
parent 677ad8115a
commit ded9a7e5d0
26 changed files with 920 additions and 357 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ export type HostToGame =
export type GameToHost =
| { type: "ready"; seed: string }
| { type: "failed"; error: string }
| { type: "send"; conn: number; data: string }
// text is a json message, bytes a binary one
| { type: "send"; conn: number; data: string | Uint8Array<ArrayBuffer> }
| { type: "close"; conn: number }
// level.json and the chunks that changed
| { type: "save"; save: Required<WorldSave>; final: boolean }