https://github.com/bearlikelion/cooties
An open source Godot 4 multiplayer tutorial
https://github.com/bearlikelion/cooties
game-development godot godot-engine multiplayer multiplayer-game open-source steam steam-games
Last synced: 5 months ago
JSON representation
An open source Godot 4 multiplayer tutorial
- Host: GitHub
- URL: https://github.com/bearlikelion/cooties
- Owner: bearlikelion
- License: mit
- Created: 2025-12-28T08:43:09.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-05T19:31:15.000Z (5 months ago)
- Last Synced: 2026-01-07T04:17:34.829Z (5 months ago)
- Topics: game-development, godot, godot-engine, multiplayer, multiplayer-game, open-source, steam, steam-games
- Language: GDScript
- Homepage: https://bearlikelion.itch.io/cooties
- Size: 49.3 MB
- Stars: 19
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Cooties
### **Checkout the game's [Itch.io page](https://bearlikelion.itch.io/cooties)** for downloads & releases.
P2P multiplayer tutorial for Godot using [Steam Networking Sockets](https://partner.steamgames.com/doc/api/ISteamnetworkingSockets) and traditional IP/Port connections through [ENet](https://docs.godotengine.org/en/stable/classes/class_enetmultiplayerpeer.html). This project utilizes RPC Calls, MultiplayerSpawner, and MultiplayerSynchronizer nodes with physics interpolation for other peers.
This repository is an open source [MIT licensed](LICENSE.md) tutorial to serve as an introduction for multiplayer in Godot.
### Gameplay Clips: https://www.youtube.com/watch?v=SyD0FYQca8s
## Overview
Cooties is a fast-paced infection/tag multiplayer platformer game where players compete to avoid catching cooties. One random player starts infected each round and must tag other players to spread the sickness. Non-infected players earn points for every second they are not sick. The player with the highest score after 5 rounds wins!
## Features
### Gameplay
- 4 playable characters (Virtual Guy, Pink Man, Ninja Frog, Mask Dude)
- Randomly selected characters that are synchronized and persist between games
- Round-based infection tag gameplay (5 rounds by default)
- Game round state management (Waiting, Playing, RoundEnd, GameOver)
- Score system: Non-infected players earn 1 point per second
- Random player selection for initial infection each round
- Dynamic particle effects and sound for infected players
- Automatic win detection and gameplay restart
### Platformer Mechanics
- Smooth acceleration-based movement
- Double jump ability
- Wall sliding and wall jumping
- Physics interpolation for smooth multiplayer movement
### Multiplayer
- Steam-based networking using [GodotSteam's SteamMultiplayerPeer](https://godotsteam.com/howto/multiplayer_peer/)
- Authoritative server architecture
- RPC-based state synchronization
- Automatic player name fetching from Steam
- Host/join lobby system
- Graceful disconnection handling
## Technical Details
### Engine
- [Godot 4.5](https://godotengine.org/download/archive/4.5.1-stable/)
- [GodotSteam 4.17](https://godotsteam.com/getting_started/what_are_you_making/)
- [Rapier2D Physics with Cross Platform Deterministic](https://godot.rapier.rs/)
- Steamworks v1.63
- Staticly typed GDScript
- (Decently) commented code
- Mobile rendering backend
### Project Structure
```
cooties/
├── Assets/ # Game assets (sprites, sounds, etc.)
├── Scenes/
│ ├── Game/ # Main game scene and player spawning
│ ├── Lobby/ # Multiplayer lobby
│ ├── MainMenu/ # Main menu
│ ├── Player/ # Player character scene
│ └── UI/ # HUD, character select, scoreboard
├── Shaders/ # Shaders
└── Singletons/ # Global autoloads (Global, SteamInit)
```
## Installation
### Setup
1. Clone or Fork this repository
2. Open the project in Godot 4.5+ (with the GodotSteam module)
3. Run the project
*Steam must be running to use Steam features*
## Development
### Key Scripts
- [Scenes/Game/game.gd](./Scenes/Game/game.gd) - Main game loop, round management, infection logic
- [Scenes/Player/player.gd](./Scenes/Player/player.gd) - Player controller with platformer movement
- [Singletons/Global.gd](./Singletons/Global.gd) - Global state management and player data
- [Singletons/SteamInit.gd](./Singletons/SteamInit.gd) - Steam API initialization
- [Scenes/Lobby/lobby.gd](./Scenes/Lobby/lobby.gd) - Multiplayer lobby management
- [Scenes/UI/character_select.gd](./Scenes/UI/character_select.gd) - Character selection UI
### Contributing
I would love for you to contribute! This project is meant to teach! If you have an idea for a feature or a fix, *please* fork the repo and submit a pull request for me to review!
## Credits
Project by [Mark Arneman](https://arneman.me) <[bearlikelion](https://bearlikelion.com)>
Asset usted listed in [CREDITS.md](CREDITS.md)