
paper.io Clone
A fully authoritative multiplayer territory-capture game inspired by Voodoo's Paper.io 2. Built with a custom Rust server and Unity 3D client (URP) featuring real-time state sync, procedural trail rendering, flood-fill territory claiming, and client-side prediction.
Core Features
Draw trails outside your zone and return home to claim everything enclosed. Uses edge-based flood-fill to determine captured regions — including enemy territory.
Cross any player's trail (or your own) and they're eliminated. Head-on collisions, self-intersections, and boundary kills — all server-side.
Eliminated players respawn after a short delay with brief invulnerability. Spawn algorithm ensures safe distance from other players.
Procedural mesh generation for territory and trails in full 3D. Vertex-colored grid, glowing emissive trails, smooth position interpolation.
Local input applied immediately with pending input buffering. Server reconciliation replays unacknowledged inputs on authoritative state arrival.
Only changed cells and players transmitted per tick. Full state on join and periodically. RLE encoding for territory chunks minimizes bandwidth.
How to Play
Move your avatar across the grid. When you leave your colored territory, you start leaving a trail. Return to your territory to claim everything your trail encloses — including enemy land. If another player crosses your trail before you close it, you're eliminated.
Architecture
Designed around a strict authoritative server model — the client never determines game outcomes. The server owns simulation, collision detection, and territory state.
| Layer | Technology | Details |
|---|---|---|
| Server | Rust + Tokio | Async game server at 20 tick/s. Sessions, rooms, simulation, collision, flood-fill, protobuf broadcasting |
| Client | Unity (URP) | Universal Render Pipeline. Procedural mesh generation. New Input System. Object pooling |
| Protocol | Protobuf over UDP | Binary serialization with sequence numbering. State, delta, input, and join response messages |
| Transport | Custom UDP | Lightweight game-agnostic transport. Session management, sequence checking, duplicate filtering |
Server Responsibilities
| System | What it does |
|---|---|
| Tick Loop | Runs at 20 Hz (50ms). Processes inputs, advances simulation, broadcasts state |
| Movement | Grid-based. Direction changes apply next tick. Boundary collision handling |
| Trail System | Tracks positions outside own territory. Triggers claim on return home |
| Territory | Converts trail cells + flood-fill from edges to find enclosed regions |
| Collision | Trail crossing, self-intersection, head-on collision, boundary elimination |
| Respawn | Delayed respawn with invulnerability. Safe spawn distance algorithm |
Client Responsibilities
| System | What it does |
|---|---|
| Prediction | Applies local input immediately. Buffers pending inputs with sequence numbers |
| Reconciliation | Snaps to authoritative position, replays unacknowledged inputs |
| Territory | Procedural mesh with vertex colors per cell. Updates on delta arrival |
| Trail | 3D tube geometry with emissive glow. Per-player trail tracking and pooling |
| Interpolation | Smooths movement between server ticks for all remote players |
About the Developer
Danylo Golosov
Software Engineer / Game Developer — Berlin, Germany
4+ years of experience in software development with deep expertise in Unity Engine, C#, and C++. Professional background in AR/VR development, cross-platform mobile apps, and backend systems. Previously AR & Web Developer at Zaubar (Berlin), building and shipping 10+ projects with AR Foundation, ARKit, ARCore, and XR Interaction Toolkit.
| Status | Prototype |
| Platforms | HTML5 |
| Author | Waller |
| Made with | Unity |
| Tags | 3D, Multiplayer, Unity |
| AI Disclosure | AI Assisted |




Leave a comment
Log in with itch.io to leave a comment.