Multiplayer - IP-2025/waves-of-the-fallen GitHub Wiki
Multiplayer Overview
Lobby System
- In the main menu, players can choose between "Singleplayer" and "Multiplayer"
- Selecting Multiplayer gives two options: "Join Game" and "New Session"
- "Join Game": A text field appears where players can enter a session ID. Clicking "Join" connects them to that lobby
- "New Session": A new session is created and the session ID is displayed permanently on the screen
- Once 2 to 4 players have joined the game can be started with "Play"
- Players in the lobby can change their name. Only ASCII letters and numbers are accepted. The maximum length is 10 characters
Round System
- Once a round starts, players fight together against mobs
Death / Quitting
- If one or more players die, they are revived at the end of the wave (as long as at least one player survives)
- If all players die, the game ends, and they return to the lobby menu
- A death player is visually indicated (with something like a tombstone) so teammates can recognize it
- If one or more players leave the game, it continues as long as at least one player remains. If all players leave, the lobby is closed
- Leaving a game returns the player to the main menu
- The difficulty adjusts accordingly for the remaining players
Rewards (Gold, XP)
- Each player has their own independent inventory and earned XP
- Each player gains the same amount of XP per kill of a standard mob
- In boss fights (before visiting a shop) all players receive the same amount of XP and gold
- Players cannot trade items or currencies (Gold, XP) with each other
- All players who reach Endless Mode receive their earned gold as a reward
- Players who leave before reaching Endless Mode receive no gold as a reward
UI/UX
- If a player is off screen, a small player icon appears at the edge of the screen
- If a player is on screen, they are fully displayed
- Their name and health are shown above them
- All current players are permanently listed at the edge of the screen, making it clear when a player quits
Shop System
- The shop (weapons and upgrades) is independent for each player
- Each player receives a unique selection of weapons and upgrades
Backend
These are initial assumptions and may change depending on the software stack, such as the game engine
- A central server hosts the multiplayer game
- When starting a lobby or joining an existing one, the players device connects as a client to the server
- The server hosts the game, streaming enemy and player positions and other necessary data
- The client renders the game based on this data and sends its own updates, such as position changes and player actions back to the server
- Latency should be kept low and stable
- In case of connection issues, a timeout will automatically send the player back to the main menu
- A corresponding info screen will be displayed
- Rejoining during a round is not possible