Skip to content

Matches

I-Al-Istannen edited this page May 12, 2018 · 1 revision

Matches

Description

A match is a currently running instance of a minigame. Depending on how far it has progressed, it might or might not have selected an arena yet.

At the beginning you can join a match and will be transported to a lobby. After the initial player gathering phase is over, the match will select an arena to instantiate and use. This is done quite late to ensure differing player counts can be accommodated — it will just pick an arena that fits.

The game will also take care of teleporting the players to a post-game lobby to allow them to see their stats and have a final chat with each other.

Creation

A match can be created using a command. This command should only need to be given the type of the minigame, though optionally a fixed arena should be able to be chosen.

Interaction with the minigame

The minigame should be fully able to control the strategy the Match employs for picking an arena as well as the pre- and post-game lobby it uses. This allows for minigames where the players are teleported to a lobby inside the minigame, though the need to do this should rarely occur — a first phase can be used instead.

Interaction with the arena

The match should be able to query all valid stored arenas. The maximum player count it finds during that is the maximum number it can accept, as there are no arenas that can fit more players.

Responsibility outline

  • Manage player joining and leaving
  • Pick a fitting arena when the game starts
  • Handle the pre- and post-game lobby
Clone this wiki locally