RCWeb Snake Pro App

The RCWeb Snake Pro App (app/snake-pro) is a heavily upgraded, analog-driven revision of the standard Snake game. Embracing the Asymmetric Pattern, it replaces strict grid restrictions with fluid, 360-degree vector steering and advanced procedural canvas rendering.

Icon

icon

Screenshot

screenshot

What it does

  • Smooth 360° Steering: Snakes are no longer locked to hard right-angles. They slither and bank smoothly in any continuous direction across the arena using an analog thumbstick controller.
  • Advanced Continuous Wrapping: If a snake exits the left border of the screen, the engine seamlessly reconnects their physical body segments across the right border with interpolated curved trails, never breaking the continuous visual line.
  • Intelligent Demo Mode: If no human players are connected, the game spawns three AI-controlled "Demo" snakes that endlessly roam, eat fruit, and engage each other, converting the lobby into an attractive living screensaver.
  • Polished Visuals: Implements procedural neon glows, fading ghost trails for dead players, and continuous background particle systems to create a highly premium presentation style.

How it works

The engine in script.js discards array-grid positioning in favor of pure 2D float physics and mathematical geometry rendering loops.

  • Delta Time Physics: The requestAnimationFrame loop calculates dt (delta time), guaranteeing that the variable speed values (cfg.baseSpeed, cfg.boostSpeed) and rotation interpolations (lerp) perform identically on a 60hz mobile screen versus a 144hz desktop monitor.
  • Vector Transformation: Interprets joystick input payloads (vectorX, vectorY, strength), rotating the target desired physical angle of the snake head and blending it toward the target.
  • Continuous Curve Slicing: Snake visual trails are no longer discrete boxes but massive continuous bezier curve (quadraticCurveTo) lines trailing the head. The buildContinuousPoints() system mathematically repairs points mathematically that have wrapped the screen edges, letting the global ctx.stroke() render them flawlessly across boundaries.
  • Procedural AI Engine: The logic inside updateDemoInput(player, time) governs the AI snakes. They continuously scan their environment, dynamically adjusting their steering vectors toward the nearest fruit (demoTargetTurnAt) and avoiding walls through randomized wobble logic parameters until an active native player establishes a WebSocket lock to hijack the lobby.
DocumentationServer TelemetryServer StatsServer HTTP LogServer WebSocket Log