Skip to content

bearlikelion/cooties

Repository files navigation

Cooties

Checkout the game's Itch.io page for downloads & releases.

P2P multiplayer tutorial for Godot using Steam Networking Sockets and traditional IP/Port connections through ENet. This project utilizes RPC Calls, MultiplayerSpawner, and MultiplayerSynchronizer nodes with physics interpolation for other peers.

This repository is an open source MIT licensed tutorial to serve as an introduction for multiplayer in Godot.

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
  • Authoritative server architecture
  • RPC-based state synchronization
  • Automatic player name fetching from Steam
  • Host/join lobby system
  • Graceful disconnection handling

Technical Details

Engine

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

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 <bearlikelion>

Asset usted listed in CREDITS.md