A simple online multiplayer agario-style game built with Python SocketIO backend and HTML/JavaScript frontend.
- Real-time multiplayer gameplay
- Mouse-controlled blob movement
- Random collision outcomes
- Responsive web interface
- Visual collision effects
-
Navigate to the backend directory:
cd backend -
Install dependencies:
pip install -r requirements.txt
-
Run the server:
python server.py
The server will start on http://localhost:5000
-
Navigate to the frontend directory:
cd frontend -
Open
index.htmlin your web browser, or serve it with a simple HTTP server:# Using Python python -m http.server 8080 # Using Node.js npx http-server
-
Open your browser and go to:
- Direct file: Open
frontend/index.html - HTTP server:
http://localhost:8080
- Direct file: Open
- Enter your name in the input field
- Click "Join Game" to connect to the server
- Move your mouse to control your blob
- When two blobs collide, one randomly wins and grows larger
- If your blob gets too small, you'll respawn with the initial size
- Movement: Mouse-controlled, blob moves towards cursor
- Collisions: When two blobs touch, one randomly wins
- Growth: Winner gains 30% of loser's size
- Respawn: Blobs respawn when they become too small (size < 10)
- World Bounds: Blobs are constrained to the game area
- Backend: Python with socketio and aiohttp
- Frontend: HTML5 Canvas with Socket.IO client
- Communication: Real-time WebSocket connections
- Game Loop: 60 FPS server-side game loop
- Server runs on port 5000
- Game world is 800x600 pixels
- Initial blob size is 20 units
- Movement speed is 2 units per frame
- Uses UUIDs for player identification