Traditional Board Game Vanilla JS PWA · Offline

Changa Asta

A polished vanilla-web implementation of the ancient Indian board game. Supports local multiplayer, computer opponents with three difficulty levels, 5x5 and 7x7 boards, animated kaudi toss, synthesized audio, and offline install as a PWA.

Also known as:

Chowka Bara Ashta Chamma Chakka Katte Mane Gatta Mane

Why this game

Changa Asta has been played across Karnataka, Andhra Pradesh, and Tamil Nadu for centuries. It has no single authoritative digital version. Most implementations are either unpolished ports or miss key rule variants like Gatti blockades.

Complete rule fidelity

Both 5x5 (4 kaudis) and 7x7 (6 kaudis) boards are implemented with correct roll tables, safe squares, inner path entry conditions, and optional Gatti blockade rules — toggle individually in-game.

Pure web, no dependencies

Built entirely with HTML5, CSS3, and ES6 JavaScript — no framework, no bundler. The service worker enables offline play. A procedural favicon animates in the browser tab during play.

Features

Everything the game needs.

Board modes

  • 5×5 board — 4 kaudis, rolls 1, 2, 3, 4, and 8 (extra)
  • 7×7 board — 6 kaudis, rolls 1–6 and 12 (extra)

Pass & Play

  • 2, 3, or 4 players on one device
  • Turn rotation with toast notifications
  • Move previews and valid-pawn highlights

Vs Computer

  • One human, remaining slots filled by bots
  • Three difficulty levels: Easy, Normal, Smart

Custom rules

  • Gatti blockades — toggle on/off
  • Optional spawn requirement on high rolls

Game feel

  • Animated kaudi toss area with power meter
  • Web Audio API synthesized sound effects
  • Capture animations and victory stats
  • Turn and result toast messages

Persistence & install

  • Save and resume games via localStorage
  • PWA manifest for home screen install
  • Service worker for full offline play
  • Mobile-first responsive layout

Core rules

How the game is played.

Movement

Pawns travel around the outer ring from their starting side. A player may enter the inner path toward the home square only after capturing at least one opponent pawn.

Extra rolls

Rolling a high or extra value (8 on 5×5, 12 on 7×7) grants another roll. Three consecutive extra rolls cancel the turn and pass play to the next player.

Gatti blockades

When enabled, two same-color pawns on the same non-goal square form a Gatti. Opponents cannot pass or land on it unless they arrive with their own Gatti.

Player start positions

RedSouth start
GreenWest start
YellowNorth start
BlueEast start

Kaudi roll values

Roll value is determined by how many kaudis land mouth-up.

Board 0 up 1 up 2 up 3 up 4 up 5 up 6 up
5×5 (4 kaudis) 4 extra 1 2 3 8 extra
7×7 (6 kaudis) 6 extra 1 2 3 4 5 12 extra

Project structure

One game engine. Everything in one file.

index.html App markup, setup screen, game screen, overlays, and PWA registration
styles.css Visual system, board layout, responsive UI, overlays, and animations
game.js Game engine, state machine, bot logic, rendering, save/resume, and UI handlers
favicon.js Procedural animated favicon — updates live in the browser tab during play
manifest.json PWA metadata for home screen install
sw.js Offline cache service worker — enables play without network after first load
scripts/gen_paths.py Helper script for generating reference coordinate paths
docs/paths_output.md Reference 5×5 coordinate paths
docs/CHOWKA_BHARA.md History, setup, and core gameplay rules guide
docs/GATTI_RULES.md Detailed rulebook — Gatti formation, splits, movement, blockades, and protection
docs/changa_asta_research.md Research document: board math, paths, and kaudi probability analysis
tests/rules.test.js Dependency-free Node sanity tests for board and path rules