04 / Real-Time Multiplayer Web Game

Snake Battle Royale — built & deployed live

A real-time multiplayer browser game ("Last snake alive wins") engineered from scratch using HTML5 Canvas, vanilla JavaScript, and Ably Real-Time WebSockets with instant 6-character room codes.

Architecture & Playable Build
HTML5 2D Canvas Ably Real-Time 6-Char Room Codes Desktop + Touch D-Pad
Play Live Game ↗
Window 01 · Live Arena & Captures

HTML5 Canvas Engine & Live Multiplayer Arena

Snakes glide across a dark grid arena chasing colorful fruits (cherries, bananas, lemons, watermelon, strawberries) with segmented bodies, eyes, floating name tags, and live elimination tracking.

  • Bottom live player scoreboard pills mark eliminated players with ☠ status.
  • Last surviving snake triggers the live Victory banner across all connected players.
  • Use the monitor switcher tabs to inspect the live canvas preview or actual match screenshots.
HTML5 Canvas Collision Detection Last Snake Wins
Monitor View
Window 02 · Mobile Gameplay

Responsive Mobile Canvas & On-Screen D-Pad

Designed so desktop keyboard players and smartphone players can compete in the exact same room seamlessly without installing any app.

  • Responsive grid scales cleanly down to mobile viewports with zero clipped edges.
  • Dedicated on-screen ▲ ◀ ▼ ▶ directional pad lets touch players steer smoothly.
  • Live captured screenshot shown inside the phone frame directly from gameabubakar.netlify.app.
Mobile D-Pad Cross-Device Rooms Responsive Canvas
Mobile gameplay screenshot showing D-pad controls in Snake Battle Royale
Window 03 · Ably Room Sync

Instant 6-Character Room Creation & Live Lobby

No accounts or database signups required. Enter a player name, create a unique 6-character uppercase room code, and share it so friends join your waiting lobby live over Ably Pub/Sub.

  • Players receive distinct color badges automatically upon entering the room.
  • Host triggers a synchronized match countdown across every open client.
  • Switch monitor tabs to compare the Create/Join Entry UI and active 2-player Waiting Room.
Ably Pub/Sub Room Codes Countdown Sync
2-player Ably waiting lobby screenshot in Snake Battle Royale
Ably Captures