Crab Arena
by Badr
Check out "Crab Arena" by Badr - featuring Screen Particles, User Portrait, Canvas API and more. Try this Snapchat Lens on Easy Lens.
Features
- Screen Particles: A restrained five-fish backing layer using the muted blue-and-silver fish texture. Precise swim-zone motion and looping are controlled by the accompanying fish animation layer so fish never enter the arena, caves, or coral.
- User Portrait: Segmentation layer kept directly in front of the Screen Particles component, preserving its required particle-layer compositing structure.
- Canvas API: Produces the subtle pale blue-white coral bubbles and open-water fish as an offscreen texture for the existing Sprite Manager. That texture renders in front of the opaque arena artwork yet behind all game sprites, laser, and HUD.
- Sprite Store: Stores the full-screen opaque illustrated underwater arena background alongside the crab, treasure chest, yellow submarine hull, striped chest parachute, fallback bubble burst, gold coin, crab-shell-fragment, and muted blue-silver open-water fish sprites.
- Sprite Manager: Renders the fully opaque edge-to-edge arena background as the lowest Sprite Manager layer, an ambient bubble-and-fish layer immediately above it, then the animated crabs, carried chests, submarine shadow, outline, and hull. The background has z-index 0, ambient particles use z-index 1, and all gameplay sprites stay in front; chest outlines and the flattened submarine shadow retain their existing synchronized behavior. The smaller bottom-center dead zone is used only for chest placement and crab routing, never for touch input or firing.
- Touch Events: Captures full-screen touches to fire the submarine’s fixed conning-tower laser origin toward the touch location while blocking Snapchat’s default touch behavior.
- Text On Screen: A small anchored bold yellow arcade-style counter that displays chest-saving progress toward the 50-chest goal on one line.
- Text On Screen: A centered, initially hidden Game Over overlay that shows the final number of saved treasure chests when a crab escapes into its cave while carrying a chest.
- Canvas API: Draws short-lived hot magenta-pink laser beams with a thin white core, strong neon bloom, and matching magenta muzzle flashes procedurally over the game scene.
- UI Button: A large rounded RETRY button centered beneath the Game Over message. It is shown and made interactive only after a loss, then starts a completely fresh game run.
- Generated Music: Continuously looping upbeat retro arcade instrumental with a playful underwater-adventure feel, reduced to a very quiet ambient level at roughly 15% of its original volume so gameplay and sound effects remain prominent.