Fruit Ninja - Multiplayer Game
Real-time multiplayer fruit slicing over WebSockets.
Details
- Role
- Author
- Started
- August 2025
- Language
- JavaScript
- Platform
- Web
Overview
A browser game built to work through the real problem in multiplayer: keeping several clients agreed on the same fast-moving state without the game feeling laggy or unfair.
The server runs on NestJS and owns the simulation — a 100×100 matrix updated at 60 FPS, with gravity applied to every fruit in play. Clients render through Pixi.js and send slice gestures back over Socket.io. Rooms are created with six-character codes, the creator controls start and restart, and matches run two minutes with a live leaderboard.
Most of the work went into the parts that make it feel good rather than merely function: slice trails that follow the cursor, particle bursts on a hit, scoring weighted by fruit rarity, and touch controls that behave properly on a phone.
Highlights
- Room system with six-character join codes and owner controls
- Authoritative NestJS server simulating a 100×100 grid at 60 FPS
- Pixi.js rendering with slice trails and particle effects
- Socket.io state synchronisation across all players in a room
- Live animated leaderboard and timed two-minute matches
- Rarity-weighted scoring, mobile touch controls, responsive layout
Built with
- NestJS
- Pixi.js
- Socket.io
- JavaScript
- HTML
- CSS