A lightweight, browser-based Tic Tac Toe game built using pure HTML, CSS, and JavaScript. It focuses on player vs player gameplay, clean DOM-based logic, and a modular structure that keeps the project easy to read, modify, and extend.
Tic Tac Toe PvP runs fully offline, adapts smoothly to different screen sizes, and can be played instantly in any modern browser. It follows a structured versioning approach with both standalone and modular builds, making it suitable for learning, experimentation, and iterative development.
- Download
dist/tic-tac-toe-pvp.html - Open it in any browser
- Start playing immediately
- Works offline
- No installation required
- Clone the repository
- Open:
src/index.html
- Edit files inside the
src/directory - Build the project when needed:
python scripts/build.py
Recommended for development, customization, and learning.
-
Classic 3×3 Tic Tac Toe gameplay
-
Player vs Player mode
- X = First Player
- O = Second Player
-
Detects wins, draws, and ongoing states
-
Highlights winning combinations
-
Match progress tracking using progress bars
-
Reset round or full match
-
Optional non-match mode for casual play
-
Multiple color themes for customization
-
Sound effects for interactions
-
Fully offline and self-contained
tic-tac-toe-pvp/
│
├── index.html # Entry / landing page
│
├── src/ # Development source code
│ ├── index.html
│ ├── script.js
│ └── style.css
│
├── dist/ # Final build (for users)
│ └── tic-tac-toe-pvp.html # Single-file app
│
├── scripts/ # Build tools
│ └── build.py
│
├── README.md
├── LICENSE
└── .gitignore
Run:
python scripts/build.py
This will:
- Combine HTML, CSS, and JavaScript
- Bundle everything into a single file
- Output the final build into the
dist/directory
This project uses two modes:
- Modular structure inside
src/ - Easier debugging and editing
- Ideal for learning and extending gameplay logic
- Single-file build inside
dist/ - Fully portable
- Offline-ready with no dependencies
- HTML5
- CSS3
- Vanilla JavaScript (DOM manipulation)
- No online multiplayer support
- No persistent storage of match history
- Some features may be incomplete or experimental
- Browser rendering may vary slightly across environments
- UI is intentionally minimal for clarity and learning
https://akpandey-dev.github.io/tic-tac-toe-pvp
- Open for learning and experimentation
- Bugs may exist due to ongoing development
- Improvements, suggestions, and fixes are welcome
This project is open for learning, modification, and experimentation.