FluxyChat

Platform

Game

Match ticks as server_event — not a netcode engine.

Game module

Lobbies and matches live in D1. Input advances a tick and fans out game.tick on the lobby room_id. This is not rollback netcode.

npx @fluxy-chat/create-fluxy-chat@latest my-game --example game-tick
import { createWorkerFluxyGameClient } from "@fluxy-chat/sdk";

const game = createWorkerFluxyGameClient(client);
const lobby = await game.matchmake({ playerId, roomId, maxPlayers: 2 });
const { matchId } = await game.startMatch(lobby.lobbyId);
await game.submitInput(matchId, { playerId, actions: { move: "nudge" } });
useChat({
  roomId,
  onServerEvent: (ev) => {
    if (ev.name === "game.tick") {
      // ev.data.matchId, tick, events
    }
  },
});

startMatch needs at least two lobby players. Pair with war-room for chat + invokeAgent on the same socket.

On this page