Giter Site home page Giter Site logo

chess-game's Introduction

Chess Game

Overview

This is a simple live chess game where two players can play against each other while other users can join as spectators. The game is built using socket.io, Node.js, EJS, Express, and the chess.js engine.

Preview :

Demo -

Chess.Game.Demo.mp4

Player 1 -

Player 1

Player 2 -

Player 2

Spectator -

Spectator

Features

  • Two-player live chess game: Two users can play chess in real-time.
  • Spectator mode: Additional users can join and watch the game live.
  • Real-time updates: Moves are updated live for all players and spectators.
  • Chess logic: Utilizes the chess.js library for move validation and game state management.

Technologies Used

  • Socket.io: For real-time bidirectional communication between the server and clients.
  • Node.js: Server-side JavaScript runtime environment.
  • Express: Web framework for Node.js.
  • EJS: Embedded JavaScript templates for rendering views.
  • Chess.js: JavaScript chess engine for validating moves and managing game state.

Installation

git clone https://github.com/anandpanda/Chess-Game.git
cd Chess-Game
pnpm install or npm install
pnpm start or npm start
Open your browser and navigate to http://localhost:3000 to start playing.

Usage

  • Player Mode: The first two users to join the game will be assigned as players.
  • Set Assigment: First player to join will be assigned the white set, other the black.
  • Spectator Mode: Any additional users will join as spectators and can watch the game live.

chess-game's People

Contributors

anandpanda avatar

Watchers

 avatar

chess-game's Issues

Simultaneous Games Not Supported

Overview

Currently, the application supports only a single instance of a game at any given time. This means that when more than two users join, the additional users can only join as spectators. Furthermore, only one game can be played simultaneously.

To enhance the user experience and make the application more versatile, it would be beneficial to implement support for multiple simultaneous games. This would allow multiple pairs of players to play separate games concurrently, with each game instance handling its own spectators.

Proposed Solution:

  • Implement a game management system that can handle multiple game instances.
  • Each game instance should be able to accommodate two players and any number of spectators.
  • Ensure that game states are isolated and managed independently.

Additional Notes:

  • Consider potential impacts on server performance and scalability.
  • Ensure that the user interface allows users to select or create new games easily.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.