Endless Rooms Overview
Endless rooms provide a flexible real-time multiplayer experience where players can join and leave dynamically without disrupting the ongoing game. Unlike standard rooms with fixed player counts, endless rooms support variable player counts and persistent game sessions.
Key Features
- Dynamic Player Management: Players can join and leave at any time
- No Player Limits: No minimum or maximum player restrictions
- Persistent Sessions: Game state continues even as players come and go
- Drop-in/Drop-out Gameplay: Perfect for casual games and continuous play
- Flexible Matching: Support for invitation codes and auto-matching
When to Use Endless Rooms
Endless rooms are ideal for:
- Casual Games: Party games, social spaces, and mini-games
- Persistent Worlds: Game lobbies, waiting rooms, and social hubs
- Continuous Play: Games that don't have defined start/end points
- Variable Team Sizes: Games where player count can fluctuate
- Spectator Modes: Allowing observers to join and leave freely
Comparison with Standard Rooms
| Feature | Endless Rooms | Standard Rooms |
|---|---|---|
| Player Limits | None | Fixed min/max |
| Game Flow | Continuous | Session-based |
| Join/Leave | Anytime | At session start/end |
| Use Case | Casual/Persistent | Competitive/Structured |
Core Concepts
Room Lifecycle
Endless rooms follow a simplified lifecycle compared to standard rooms:
- Creation: Room is created and persists until explicitly closed
- Joining: Players can join anytime via invitation or auto-match
- Active Play: Game state continues with variable player counts
- Leaving: Players can leave without ending the session
- Persistence: Room remains active for new players to join
Player Management
- No Minimum Players: Games can start with any number of players
- Dynamic Scaling: Game logic adapts to current player count
- Graceful Handling: Player disconnections don't interrupt gameplay
- Reconnection: Players can rejoin the same session
Next Steps
- Create Endless Room - Learn how to create endless rooms
- Join Room - Join rooms via invitation codes
- Send Messages - Implement real-time messaging
- Handle Events - Manage room events and callbacks
Note
Endless rooms use the same underlying messaging infrastructure as standard rooms, so message handling and reliability features work identically.