The RCWeb Snake App (app/snake) is a local-multiplayer arcade game. Implementing the Asymmetric Pattern, it turns a primary display into a shared game board where anyone can scan a QR code to drop in and control their own colored snake simultaneously.


gridSize matrix. Multiple players compete for the same randomly spawning fruit emojis.The core script.js drives a centralized requestAnimationFrame game loop tracking native JavaScript object states rather than DOM elements.
update() restricted by a delay throttle (100ms per tick). Each tick unshifts a new coordinate into an array representing the snake's body blocks and pops the tail off if no food was eaten.[0] head coordinate against every segment of both their own body and every opposing player's body arrays every tick cycle.snakeGame.up(), snakeGame.left()). The engine sets snake.nextDx and snake.nextDy directional flags to constrain snake movement strictly to 90-degree locked grid orientations.rc.send("if (rc.client === '" + i + "') window.updateScore(...)", "snake-control") to surgically target specific players and update their personal phone interfaces.