This project is a real-time, multiplayer counter game built using Socket.IO. Players join rooms and can increment or decrement a counter in a turn-based manner.
- Real-time multiplayer gaming experience
- Turn-based game mechanics
- Username input and uniqueness check
- Room creation and invitation system
- Automatic game cleanup on disconnections
- Node.js
- Express
- Socket.IO
- HTML
- JavaScript
-
Clone this repository:
git clone https://github.com/Abdullah-Yilmazer/JavaScript-online-game.git
-
Navigate to the server directory:
cd server -
Install the dependencies:
npm install
-
Start the server:
node server.js
-
Open the client files in a web browser (e.g.,
index.html). (!! To add multiple users from the same device, you must log in from different browsers.)
- Enter a username.
- Create a room or join an invitation.
- Once the game starts, use the buttons to increment or decrement the counter when it's your turn.
- You will need to wait for the other player's move.
JavaScript-online-game/ ├── server/ # Server-side code │ ├── server.js # Main server file │ └── package.json # Dependencies └── index.html # Client file └── README.md # Project description
This project is licensed under the MIT License. See the LICENSE file for details.
Bu proje, Socket.IO kullanılarak oluşturulmuş gerçek zamanlı, çok oyunculu bir sayaç oyunudur. Oyuncular odalara katılır ve sıra tabanlı olarak bir sayacı artırabilir veya azaltabilirler.
- Gerçek zamanlı çok oyunculu oyun deneyimi
- Sıra tabanlı oyun mekaniği
- Kullanıcı adı girişi ve benzersizlik kontrolü
- Oda oluşturma ve davet sistemi
- Bağlantı kopmalarında otomatik oyun temizleme
- Node.js
- Express
- Socket.IO
- HTML
- JavaScript
-
Bu depoyu klonlayın:
git clone https://github.com/Abdullah-Yilmazer/JavaScript-online-game.git
-
Sunucu dizinine gidin:
cd server -
Gerekli bağımlılıkları yükleyin:
npm install
-
Sunucuyu başlatın:
node server.js
-
İstemci dosyalarını bir web tarayıcısında açın (örneğin,
index.html). (!! Aynı cihazadan birden çok kullanıcı eklemek için farklı tarayıcılardan giriş yapmanız gerekmektedir.)
- Bir kullanıcı adı girin.
- Bir oda oluşturun veya bir davete katılın.
- Oyun başladığında, sıra size geldiğinde sayacı artırmak veya azaltmak için butonları kullanın.
- Diğer oyuncunun hamlesini beklemeniz gerekecektir.
JavaScript-online-game/ ├── server/ # Sunucu kodları │ ├── server.js # Ana sunucu dosyası │ └── package.json # Bağımlılıklar └── index.html # İstemci dosyası └── README.md # Proje açıklaması
Bu proje MIT lisansı ile lisanslanmıştır. Detaylar için LICENSE dosyasına bakın.