A real-time multiplayer resource collection game built with React, Node.js, Socket.io, and TypeScript.
- Real-time multiplayer gameplay
- Resource collection mechanics
- Live leaderboard
- Interactive 2D map with fog of war
- Player tracking
- Resource gathering and scoring
game-client/- React frontend applicationgame-server/- Node.js backend servershared/- Shared TypeScript types
- Node.js (v14+)
- npm or yarn
-
Navigate to the server directory:
cd game-server -
Install dependencies:
npm install -
Start the server:
npm run dev
The server will run on http://localhost:3001.
-
Navigate to the client directory:
cd game-client -
Install dependencies:
npm install -
Start the development server:
npm run dev
The client will run on http://localhost:5173 (or another port if 5173 is in use).
- Enter your username on the login screen.
- Explore the map by clicking on adjacent tiles to move.
- Collect resources (Coal, Gas, Oil) by moving onto tiles containing them.
- Watch your score increase based on the resources you collect.
- View the leaderboard to see how you compare to other players.
- Coal: 1 point
- Gas: 2 points
- Oil: 3 points
MIT