Skip to content

liwa-dev/RealTime-TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RealTime-TicTacToe

I created a real-time multiplayer Tic-Tac-Toe game built with Node.js and Socket.IO

Project Logo

Table of Contents

Introduction

RealTime-TicTacToe is a real-time multiplayer Tic-Tac-Toe game that allows players to compete against each other over the internet. The game is built using Node.js for the server-side logic and Socket.IO for real-time communication between clients and the server.

Features

  • Real-time multiplayer gameplay
  • Simple and intuitive user interface
  • Responsive design for both desktop and mobile devices
  • Notifications for game events

Installation

To run this project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/liwa-dev/RealTime-TicTacToe.git
    cd RealTime-TicTacToe
  2. Install the dependencies:

    npm install
  3. Start the server:

    npm start

Usage

Once the server is running, open your browser and navigate to http://localhost:3000 to start playing the game. You can also access the live version of the game at https://realtime-tictactoe.onrender.com.

Project Structure

  • client: Contains the client-side code (HTML, CSS, JavaScript).
  • public: Contains static files served by the server (images, stylesheets, etc.).
  • server: Contains the server-side code (Node.js, Socket.IO).

Server-Client Communication

The server and client communicate in real-time using Socket.IO. Below is an overview of the key events and messages exchanged between the server and clients.

Server-Side (Node.js with Socket.IO)

The server listens for various events from the clients and responds accordingly. Here are some key events:

  • connection: When a new client connects to the server.
  • disconnect: When a client disconnects from the server.
  • move: When a client makes a move in the game.
  • notification: When the server sends a notification to the clients.

Client-Side (JavaScript with Socket.IO)

The client connects to the server and listens for events. Here are some key events:

  • connect: When the client successfully connects to the server.
  • move: When the client receives a move from the server.
  • notification: When the client receives a notification from the server.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

  • liwahadri

About

A modern, real-time multiplayer Tic-Tac-Toe game built with Node.js, Express, and Socket.IO.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published