Something went wrong. Try again.
Experimental canvas 2D engine for tile-based sidescroller/sandbox games, created strictly for educational purposes.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354// Messages a client sends to the relay.export interface JoinMessage { type: "join"; name: string;}
export interface ChatMessage { type: "chat"; text: string;}
export interface EffectMessage { type: "effect"; command: string; target?: string;}
export type ClientMessage = JoinMessage | ChatMessage | EffectMessage;
// Messages the relay sends back to clients.export interface WelcomeMessage { type: "welcome"; name: string;}
export interface ChatBroadcast { type: "chat"; name: string; text: string;}
export interface SystemMessage { type: "system"; text: string;}
export interface EffectBroadcast { type: "effect"; command: string; from: string;}
export interface UsersMessage { type: "users"; names: string[];}
export type ServerMessage = | WelcomeMessage | ChatBroadcast | SystemMessage | EffectBroadcast | UsersMessage;