Skip to Content

Last Updated: 3/18/2026


Play your first game of Snake and learn the core mechanics. This guide walks through starting a game, understanding the controls, and experiencing the unique features that make this version special.

Starting Your First Game

After running npm run dev and opening the game in your browser, you’ll see the main menu. Click New Game to begin.

The game starts in a paused state with your snake positioned at the center of a 10×10 grid. A red food block appears somewhere on the grid. The snake won’t move until you press a direction key.

Press any arrow key or WASD key to start moving. The game loop begins immediately, and your snake moves continuously in the chosen direction.

Basic Gameplay

Your goal is simple: eat food to grow your snake and increase your score. Each food item adds one segment to your snake’s length and increments your score by 1.

Movement — The snake moves continuously. Use arrow keys or WASD to change direction:

  • Up Arrow or W — Move up
  • Down Arrow or S — Move down
  • Left Arrow or A — Move left
  • Right Arrow or D — Move right

You cannot reverse direction directly. If moving right, pressing left has no effect. Turn up or down first, then reverse.

Collision — The game ends if your snake hits:

  • The grid boundaries (edges of the playing field)
  • Its own body (any segment including the tail)

Watch for collision risks as your snake grows longer. Early in the game, you have plenty of space. Later, navigating your own body becomes the primary challenge.

Understanding the Grid Expansion

When your snake fills 25% of the grid, the game automatically expands to the next level:

  1. The grid doubles in size (10×10 becomes 20×20, then 40×40, etc.)
  2. The level counter increments
  3. Game speed increases by 50%
  4. A new food block spawns

Your snake keeps its current length and position during expansion. The additional space gives you room to continue growing, but the increased speed demands faster reactions.

This mechanic ensures the game remains challenging regardless of how long you survive. In fixed-grid snake games, filling 70–80% of the board makes further play nearly impossible. Here, the grid grows with you.

Adjusting the Starting Grid Size

Before starting a game, you can customize the initial grid size for different challenge levels:

  • Press + or = to increase grid size (maximum 50×50)
  • Press - or _ to decrease grid size (minimum 5×5)

The current grid size appears in the game info area: “Grid: 10x10”.

Small grids (5×5 to 10×10) create intense early gameplay where you reach the first expansion quickly. Large grids (30×30 to 50×50) allow for longer strategic play before the first level increase.

This setting only applies when starting a new game. During gameplay, only the automatic expansion mechanic changes grid size.

Score and High Score

Your current score equals the number of food items eaten during this game session. It resets to 0 when you start a new game.

Your high score persists across sessions using browser localStorage. The first time you beat the current high score, it updates automatically. The high score appears on the menu screen and the game over screen.

High scores are stored per browser. Using a different browser or clearing browser data resets the high score to 0.

Pausing and Resuming

Press P at any time during gameplay to pause. A “Paused” overlay appears. Press P again to resume from exactly where you left off.

Pausing stops all game logic: the snake stops moving, the timer freezes, and the game loop suspends. Use this when you need to step away briefly or plan your next move in a tight situation.

Resetting the Game

Press R at any time to reset and start a new game immediately. This works during gameplay, while paused, or on the game over screen.

The reset is instant—no confirmation dialog. Use this for quick restarts when you want to try a different strategy or grid size.

Watching the Demo Bot

From the main menu, click Start Demo Bot instead of New Game. The game starts with bot automation enabled.

The bot uses AI pathfinding to play autonomously. You can switch between three bot profiles (Survival, Hunter, Explorer) using the dropdown while the bot plays. Each profile uses different decision-making strategies.

Bot mode includes auto-rotation — the 3D camera rotates slowly to provide a dynamic view of the gameplay. You can manually adjust the camera angle with Q and E keys, which pauses auto-rotation temporarily.

Press B to disable bot mode and take manual control. Press B again to re-enable the bot.

What You’ve Learned

You can now:

  • Start a game and control the snake with keyboard input
  • Understand the grid expansion mechanic and how it scales difficulty
  • Customize the starting grid size for different challenge levels
  • Pause, resume, and reset games
  • Watch the AI bot play using different strategies

What’s Next

  • Controls: Complete keyboard reference including view rotation and perspective adjustments
  • Game Mechanics: Deep dive into collision detection, food spawning, and grid scaling logic
  • Bot Automation: How the AI bots work and how to customize their behavior