A semester project with six students: a real-time multiplayer Jump & Run for the web. The interesting parts were the ones a CRUD app never forces you to deal with — authoritative server state, latency, and a CI pipeline.
Technologies
JavaScript
Full-stack JavaScript. Node.js on the backend, Express.js serving static files, REST endpoints for game data in JSON. Real-time communication runs over Socket.IO on top of WebSockets. The frontend renders with Phaser, in WebGL where the browser supports it, falling back to an HTML5 canvas.
Interpolation between updates
The server is authoritative on player positions and sends updates over Socket.IO at a fixed rate. Rendering only what the server sends, as it arrives, would mean visible jumps between updates and stutters whenever a packet was delayed or dropped. The client keeps a short buffer of recent server states and interpolates the rendered position between them. Frames between websocket events get plausible in-between positions, and a missed packet smooths over instead of freezing.
Physics engine
Matter.js, a 2D physics engine written in JavaScript, runs on both the backend and frontend. It handles rigid bodies, physical properties (mass, area, density), and simulates collisions, gravity, and friction.
Continuous Integration / Continuous Delivery
The repository lives on ZHAW’s GitHub Enterprise. Every pull request kicks off automated tests and coverage checks. After passing, one or more team members review the code. Once approved and merged into main, the deployment pipeline runs unit tests again, analyzes the code with SonarCloud, and deploys via an Azure DevOps Self-Hosted Docker Agent to a public URL.
Architecture
Two components: the backend runs the authoritative game state on the server, the frontend renders it on the client. The interaction is illustrated below.
