slice icon Context Slice

Code Size Check (REQUIRED)

Count total lines of code (excluding blank lines).

  • Minimum acceptable: 800 lines
  • Target: 1000-1500 lines
  • If under 800 lines, the game is underbuilt. Go back and add depth.

Game Loop Depth

  • Game loop has deltaTime calculation (not just timestamp)
  • update() function is 30+ lines with real logic
  • render() function is 50+ lines with multiple draw calls
  • State machine handles 4+ states (menu, playing, paused, gameover)

Entity System Depth

  • Player object has 8+ properties (x, y, vx, vy, speed, state, etc.)
  • At least 3 different entity types exist
  • Each entity type has distinct update behavior
  • Each entity type has distinct rendering (not just color change)

Collision System Depth

  • Collision function is reusable (not inline checks)
  • Collision responses vary by entity pair
  • Invincibility frames implemented
  • Hit effects trigger (shake, flash, particles)

Visual System Depth

  • Background is animated (scrolling, particles, or pattern)
  • At least one particle effect system exists
  • Screen shake function with decay
  • Screen flash function exists
  • Entities have animation or visual state changes

UI System Depth

  • Start screen has animated elements (not static)
  • HUD updates dynamically
  • Game over shows statistics (not just score)
  • State transitions have fade/animation effects

Input System Depth

  • Both Arrow keys AND WASD work
  • Touch controls implemented with virtual buttons or zones
  • Pause toggle works (P or Escape)
  • Restart works from game over (R or button)

Progression Depth

  • Difficulty increases measurably over time
  • At least 2 powerup types implemented
  • Score multiplier or combo system exists
  • High score persisted and displayed

Code Quality

  • No TODO/FIXME comments
  • No console.log statements
  • No empty function bodies
  • Constants declared at top
  • Functions are 10-50 lines (not 2-line stubs)

Gate

If ANY checkbox fails OR code is under 800 lines, STOP and go back to add depth.
Do not proceed to deployment with an underbuilt game.