https://github.com/dyspersja/websocket-tic-tac-toe
Multiplayer Tic Tac Toe game created using WebSockets.
https://github.com/dyspersja/websocket-tic-tac-toe
tic-tac-toe tic-tac-toe-game tic-tac-toe-javascript websocket-game websockets
Last synced: about 1 month ago
JSON representation
Multiplayer Tic Tac Toe game created using WebSockets.
- Host: GitHub
- URL: https://github.com/dyspersja/websocket-tic-tac-toe
- Owner: Dyspersja
- Created: 2024-06-02T06:45:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-04T10:40:18.000Z (about 2 years ago)
- Last Synced: 2025-01-10T17:53:29.615Z (over 1 year ago)
- Topics: tic-tac-toe, tic-tac-toe-game, tic-tac-toe-javascript, websocket-game, websockets
- Language: JavaScript
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebSocket-Tic-Tac-Toe
Real-time multiplayer Tic Tac Toe game created using WebSockets. It offers a variety of features to enhance gaming experience:
## Features
1. **Username Selection:** Users can choose a username that will distinguish them from other players.
2. **Play vs AI:** Users can play against an AI opponent.
3. **AI Difficulty Levels:** Users can choose from four different AI difficulty levels to match their skill level.
4. **Play vs Players:** Users can play against other real players.
5. **Random Opponent Queue:** Users can join a queue to find and play against a random opponent.
6. **Create a Room:** Users can create a private room for playing with friends.
7. **Join a Room by ID:** Users can join a specific room by entering its unique ID.
8. **Spectate Games:** Users can spectate all currently ongoing games.
## Setup Instructions
Below is step by step instruction on how to run this project on a local machine:
1. **Clone the Repository:** Start by cloning this repository to your local machine using the following command:
```
git clone https://github.com/Dyspersja/WebSocket-Tic-Tac-Toe.git
```
Alternatively, if you don't have Git CLI installed on your computer, you can download the repository by navigating to the **<> Code** tab and selecting **Download ZIP**.
2. **Install Dependencies:** Navigate to the project directory and install necessary dependencies using **npm install**:
```
cd WebSocket-Tic-Tac-Toe
npm install
```
**NOTE!** Please ensure that Node.js is installed on your computer. The project will not be able to run without it.
3. **Start the Server**: Launch the application by running the following command:
```
npm start
```
Now that the application is up and running, you can navigate to [http://localhost:8000](http://localhost:8000) to view the application and start playing!
To test real-time communication between players, you can open multiple browser tabs and simulate multiple players.
## Screenshots
The application was tested on mobile devices and it works great.

Of course, application also works in standard computer web browsers.
