Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ Snake & Ladder

A modern, high-fidelity web implementation of the classic Snake & Ladder board game. Experience professional-grade animations, dynamic board layouts, and a premium paper-style aesthetic.

Snake & Ladder Game Preview

โœจ Features

  • ๐ŸŽฎ Local Multiplayer: Supports 1 to 6 players in a pass-and-play format.
  • ๐ŸŽฒ Classic Dice Rules:
    • Roll a 6 to unlock your token and start moving.
    • Rolling a 6 grants an additional turn.
  • ๐Ÿƒ Step-by-Step Movement: Tokens advance cell-by-cell for a realistic gameplay feel.
  • ๐Ÿ”Š Immersive Audio: Custom sound effects for climbing ladders and sliding down snakes.
  • ๐ŸŽ† Winner Celebration: Full-screen firework effects and color-coded winner announcements.
  • ๐Ÿ–ฅ๏ธ Responsive Design: Scalable board that fits any screen size with a dedicated dice interaction zone.
  • โŒจ๏ธ Keyboard Shortcuts:
    • Space: Roll the dice
    • N: Start a new game
    • S: Start game from home screen
    • F: Toggle fullscreen

๐Ÿ› ๏ธ Technology Stack

  • Frontend: HTML5 Canvas, Vanilla JavaScript (ES Modules), CSS3.
  • Audio: Web Audio API for low-latency sound effects.
  • Server/Runtime: Bun for lightweight static serving and fast development.

๐Ÿš€ Getting Started

Prerequisites

You will need Bun installed on your machine.

Installation & Usage

  1. Clone the repository:

    git clone <repository-url>
    cd "Snake & Ladder"
  2. Start the server:

    bun server.js
  3. Open the game: Navigate to http://localhost:5173 in your web browser.

๐ŸŽฒ Gameplay Rules

  1. The Goal: Be the first player to reach square 100.
  2. Start: Every player starts off-board. You must roll a 6 to move your token to square 1.
  3. Ladders: Landing on the base of a ladder automatically boosts you to the top.
  4. Snakes: Landing on a snake's head will cause you to slide down to its tail.
  5. Exact Landing: You must roll the exact number needed to land on square 100 to win.

๐Ÿ“ Project Structure

  • index.html: Main application entry point.
  • game.js: Core rendering engine and animation logic.
  • game-core.js: Game rules, state management, and board configuration.
  • styles.css: Visual styling and layout.
  • server.js: Static file server using Bun.
  • public/: Assets including the board image and SVGs.

Enjoy the game and watch out for the snakes! ๐Ÿโœจ

About

Snake & Ladder game on web.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages