homegames-web
v1.1.2
Published
Play games at home- the web package
Downloads
227
Readme
Homegames - the web client
This repo contains the "official" Homegames web client, used to connect to game sessions created by homegames-core.
If you are just trying to play games, you probably don't need this. The best way to do that is downloading builds available at homegames.io
Setup
Requires: Node.js >= 18
npm install
npm run build
npm run start
This will run a homegames web client at localhost:80
. It will attempt to connect to a game server at port 7001
or HOME_PORT
if defined in config.json
Socket
src/socket.js
The socket connection stuff runs as a worker created by the web client. After an initial handshake with the game server, it receives squished game data over a web socket. The worker is also responsible for sending keyboard and mouse/touch input from the client to the game server.
Rendering
The web client uses an HTML canvas to render data after "unsquishing" or deserializing game data. This includes 2D shapes as well as images. Also supports playing audio.