> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# End a multiplayer match and show results

> Your Summer Engine server decides who won, lost, drew or left. Summer records the result once, moves ratings and shows each player their own outcome.

A match ends when your game's server says so. The server decides how it went
for every player: a win, a loss, a draw, or leaving early. Summer records that
result once and moves ratings on a ranked queue. Each player sees their own
outcome, and the server closes the match so everyone goes back to your menu.

## Games like this

> [card] Counter-Strike, Valorant
>
> A whole team wins or loses together.

> [card] Chess.com
>
> Win, loss or draw, with your rating change right after.

> [card] Among Us
>
> One side wins, and everyone sees how it ended.

> [card] Rocket League
>
> Leaving a match early is recorded, not forgotten.

Every match needs an ending, including "everyone else left". If your game has a
results screen, a winner, or a rating that moves, this is the page for you.

## What your players get

![Four steps: the server decides every player's outcome, Summer records it once, each player sees their own result and rating change, and the match closes.](https://mintcdn.com/summer-18f03259/_ENGS2HrEIacSS6a/images/guide-art/match-results/flow-light.svg?fit=max\&auto=format\&n=_ENGS2HrEIacSS6a\&q=85\&s=3a10362ab60630f517349d363e8c3114)

**1. The match ends**

Your server decides the outcome for every player in the match, including
players who already left. They count as having abandoned it.

**2. Summer records it once**

Summer stores the result and, on a ranked queue, moves every player's
rating. If your server sends the same result again, for example after a
network hiccup, Summer keeps the first one and never counts it twice.

**3. Each player sees their result**

Every player gets their own outcome straight away, and their new rating as
soon as Summer has saved it. Players only ever receive their own numbers.

**4. The match closes**

After your results screen, the server closes the match and players go back
to your menu, ready to play again.

Your game decides what the results screen looks like and how long it stays up.
Summer handles recording the result, updating ratings and delivering each
player's numbers to them.

## Pick your setup

### Winner takes all

One player wins, such as the first to collect ten coins or the last one
standing, and everyone else loses. Good for free-for-all modes and duels.

**End my match with a winner.** The server picks the winner, everyone sees the result, and the match closes.

In my Summer project, end each match when \[WIN CONDITION, for example "a
player collects 10 coins"]. Use the Summer `summer-match-results` skill; if
you don't have it installed, find it in the Summer library.

* The server decides the outcome for every player: the winner wins, everyone
  else loses, and players who left count as abandoned.
* Show each player a results screen with their own outcome, and their rating
  change on a ranked queue.
* After a few seconds, close the match and send players back to the menu with
  a Play again button.

Read my project first and find where the win condition belongs before you
change anything. Then test it with Local Play and tell me what you saw.

### Team wins

On a team queue, every member of a team gets the same outcome. Summer scores
the teams it formed, so a ranked team match moves everyone's rating together.

![Every player on Team 0 wins and every player on Team 1 loses; a Team 1 player who left early is recorded as abandoned.](https://mintcdn.com/summer-18f03259/_ENGS2HrEIacSS6a/images/guide-art/match-results/teams-light.svg?fit=max\&auto=format\&n=_ENGS2HrEIacSS6a\&q=85\&s=ed765e6c1cd6ad3ba1babdc242d57043)

**End my team match.** The winning team wins together, the other team loses together.

In my Summer project, end each team match when \[WIN CONDITION, for example
"a team reaches 13 rounds"]. Use the Summer `summer-match-results` and
`summer-matchmaking` skills; if you don't have them installed, find them in
the Summer library.

* Every member of the winning team wins and every member of the other team
  loses. Players who left count as abandoned.
* Show each player their team's result and their own rating change.

Read my project first and tell me how my game knows each player's team before
you change anything. Then test it with Local Play and tell me what you saw.

### Draws and players who leave

A match can end in a draw for everyone, such as a timer running out with the
score tied. A player whose connection drops keeps their seat for a short time
so they can come back. A player who leaves for good still gets an outcome,
recorded as abandoned, so the result always covers everyone who played.

**Handle draws and early leavers.** Tied matches end in a draw; players who quit count as abandoned.

In my Summer project, make my match ending handle every case. Use the Summer
`summer-match-results` skill; if you don't have it installed, find it in the
Summer library.

* If \[DRAW CONDITION, for example "the timer runs out with the score tied"],
  everyone draws.
* A player whose connection drops keeps their seat until they come back or
  leave for good. Don't end the match just because someone disconnected.
* If everyone else has left, the last player still gets a proper ending.

Read my project first and list the ways my match can end before you change
anything. Then test them with Local Play and tell me what you saw.

### Matches inside a world that keeps running

In a [world that keeps running between sessions](https://docs.summerengine.com/build/persistent-worlds.md),
a match can end without closing the world. Players who joined just for that
match leave, everyone else stays, and the world keeps going.

## Not sure which fits?

**Plan how my matches end.** Your agent reads your project and proposes the endings. No code.

Read my Summer project and help me plan how its matches end. Use the Summer
`summer-match-results` skill; if you don't have it installed, find it in the
Summer library. Don't change any files yet.

Tell me:

1. every way a match in my game can end, and the outcome each player gets;
2. what each player sees from the last moment of play until they're back in
   the menu;
3. anything my design needs that match results don't cover yet, and how we
   can build around it.

## Testing it on your machine

Local Play runs the whole ending on one computer. Your server ends the match
and gets test rating changes back, and every game window shows its own
result. Real rating changes appear in a hosted game. Under Local Play, players
also stay connected after the match closes until they leave, so drive your
results screen from the result itself, not from the disconnect.

The results feed [Ratings and leaderboards](https://docs.summerengine.com/build/leaderboards.md).

## Technical reference

Exact methods, inputs and signals: [`Summer.authority.match`](https://docs.summerengine.com/api-reference/gdscript/authority/match), [`Summer.authority.ratings`](https://docs.summerengine.com/api-reference/gdscript/authority/ratings).

***

Does this not help you? [Reach out on Discord!](https://discord.gg/summerengine)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.