multyx
Version:
Framework designed to simplify the creation of multiplayer browser games by addressing the complexities of managing server-client communication, shared state, and input handling
23 lines (21 loc) • 603 B
text/typescript
import type { Server } from "http";
import type { ServerOptions } from "ws";
export type Options = {
tps?: number,
port?: number,
server?: Server,
removeDisconnectedClients?: boolean,
respondOnFrame?: boolean,
sendConnectionUpdates?: boolean,
websocketOptions?: ServerOptions,
};
export const DefaultOptions: Options = {
tps: 10,
port: 8443,
removeDisconnectedClients: true,
respondOnFrame: true,
sendConnectionUpdates: true,
websocketOptions: {
perMessageDeflate: false // Often causes backpressure on client
},
};