mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
A fantastic multiplayer action browser game
http://chuck-game.tumblr.com
The old PUNKBUSTER check compared client-reported position to server position and snapped the player back when latency made them diverge, which felt like getting teleported under any real network conditions. Replaces that with proper client-side prediction + reconciliation: client tags each input with a sequence number and keeps an input buffer; server tracks the last processed sequence and reports its authoritative position via a per-user inputAck alongside each worldUpdate. The client only corrects when the actual disagreement exceeds what the unacked input time can explain — so steady-state movement runs purely on local physics, and only genuine unexpected events (collisions, being hit) trigger a smooth blend toward the server state. Includes adaptive threshold scaling so high-latency sessions don't false-positive corrections during normal running. |
||
|---|---|---|
| app | ||
| config | ||
| lab | ||
| scripts | ||
| snippets | ||
| static | ||
| .floo | ||
| .gitignore | ||
| channel.js | ||
| client.js | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| server.js | ||
chuck.js
Physical JavaScript Action Browser Multiplayer Game - it will be awesome!
Follow the development at http://chuck-game.tumblr.com/
How to run:
git clone https://github.com/logsol/chuck.js.gitcd chuck.jsnpm installnode server.js [port] [log level]
Open in browser http://localhost:1234
This game is licensed under the GPLv3 licence http://www.gnu.org/licenses/gpl-3.0.html