Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

This will be possible in the next update fyi :-):


const ws = new WebSocket('wss://server.com/game');

ws.onopen = () => console.log('Connected');

ws.onmessage = (e) => console.log('Data:', e.data);

ws.onerror = (e) => console.error('Error:', e);

ws.onclose = () => console.log('Disconnected');

ws.send(JSON.stringify({ action: 'move', x: 10, y: 20 }));

Nice. I also see some utilising Bun for performance.