Infects.io is a thrilling multiplayer game where one player starts as an infected (a zombie), and the others must run away to avoid becoming infected. The game features a variety of power-ups scattered across the board to keep the gameplay engaging and dynamic.
- Multiplayer Gameplay: Experience real-time multiplayer action where one player becomes infected, and the others must escape.
- Mobile Support: Enjoy a fully responsive design with joystick support for mobile devices.
- Service Workers: Leverage service workers for enhanced performance.
- HTTPS Security: Ensure secure communication between the client and server with HTTPS.
- SEO Optimized: Benefit from best practices in SEO, including
manifest.json
and other optimizations for better discoverability inindex.html
- Lobby Links: Easily copy game lobby links and send them to friends for quick game setup.
- Power-ups: Collect various power-ups to gain special abilities, enhancing your chances of survival or infection.
- Dynamic Environment: Navigate through an interactive game environment that adds an extra layer of challenge.
- Character Customization: Customize your character's appearance at the menu for a personalized gaming experience.
- Speed Boost: Increases your movement speed for a short duration.
- Invincibility: Makes you invincible to infections for a limited time.
- Invisibility: You can temporarily become invisible to other players.
- Giant: Increases the size of the infected player.
- Zombie Speed: Increases the speed of the infected player.
-
Ensure that Node.js is installed on your machine.
-
Clone the repository:
git clone https://github.com/tommysarkissian/Infects.io.git
-
Navigate to the project directory:
cd Infects.io
-
Install dependencies for the game server:
cd gameserver npm install
-
Install dependencies for the web server:
cd ../webserver npm install
-
Include the files from the HTTPS configuration (
index.js
) in the parent directory of/webserver
and/gameserver
:const fs = require('fs'); const options = { key: fs.readFileSync('private.key.pem'), // Private key file cert: fs.readFileSync('domain.cert.pem'), // Domain certificate file ca: fs.readFileSync('intermediate.cert.pem'), // Intermediate certificate file rejectUnauthorized: true // Reject unauthorized connections };
-
Update
servers.json
under/webserver/public/
with the appropriate hostnames. For testing, uselocalhost
.
To run the game:
-
Start the game server:
cd gameserver npm start
-
Start the web server:
cd webserver npm start
Whenever an update is made, modify the sw.js
file in webserver/views
to include the new version number.
- Join a Game: Enter a username and join a game.
- Avoid the Infected: Run away from the infected player if you're a survivor.
- Infect Others: If you're the infected, chase and infect the survivors.
- Use Power-ups: Collect power-ups to gain advantages and enhance your gameplay.
- Survive: The game continues until all players are infected or the time runs out.
We welcome contributions to improve Infects.io
! Please fork the repository and submit pull requests.