This project is a server-side adaptation of a classic game, designed to support multiple players with additional functionalities like user registration, login, and scoring management. The game supports real-time gameplay with WebSockets and HTTP-based interactions, ensuring a seamless and responsive experience for all players.
- Server-side Game Processing: Transitions the game logic to the server, allowing for centralized control and management of multiple games.
- Player Input Handling: Receives player keypresses via HTTP requests and processes them on the server.
- Real-time Game Rendering: Sends only the current game state to clients via WebSockets (on port
8082
), rendered on acanvas
. - Ship Selection: Users can select a ship image, which is remembered per user session.
- Max Score Tracking: Maintains max scores both for logged-in and guest users.
- Parallel Game Sessions: Supports up to 1000 concurrent games.
- User Authentication: Allows users to register and log in, including input validation for email, login, and password.
- Session Management: Shares session data between the server and browser.
- Admin Interface: An admin can view, delete users, and view current games.
- CSV Import/Export: Admins can import/export user data (name, email, password, max score, and max speed).
- Object-Oriented Page Structure: The webpage structure is represented using an object-oriented JSON format.
- Static Content Delivery: Serves static content (
index.html
and JS files) and uses JSON for other interactions. - Input Validation: Validates user inputs to ensure email uniqueness, password hashing, and unique alphabetic logins. Unauthenticated users are given the login
[N/A]
.
- Node.js: Use either
node:23.0
ornode:lts
. - Docker and Docker Compose: Ensure both are installed and Docker is running.
-
Clone this repository:
git clone <repository_url> cd <repository_directory>
docker-compose build
docker-compose up