teamshooter

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

TeamShooterScenario is a scenario which is designed to emulate the approximate behavior to open match that a skill based team game would have. It doesn't try to provide good matchmaking for real players. There are three arguments used: mode: The game mode the players wants to play in. mode is a hard partition. regions: Players may have good latency to one or more regions. A player will

search for matches in all eligible regions.

skill: Players have a random skill based on a normal distribution. Players

will only be matched with other players who have a close skill value. The
match functions have overlapping partitions of the skill brackets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TeamShooterScenario

type TeamShooterScenario struct {
	// contains filtered or unexported fields
}

TeamShooterScenario provides the required methods for running a scenario.

func Scenario

func Scenario() *TeamShooterScenario

Scenario creates a new TeamShooterScenario.

func (*TeamShooterScenario) Backfill added in v1.2.0

func (t *TeamShooterScenario) Backfill() *pb.Backfill

func (*TeamShooterScenario) Evaluate

Evaluate returns matches in order of highest quality, skipping any matches which contain tickets that are already used.

func (*TeamShooterScenario) MatchFunction

func (t *TeamShooterScenario) MatchFunction(p *pb.MatchProfile, poolBackfills map[string][]*pb.Backfill, poolTickets map[string][]*pb.Ticket) ([]*pb.Match, error)

MatchFunction puts tickets into matches based on their skill, finding the required number of tickets for a game within the maximum skill difference.

func (*TeamShooterScenario) Profiles

func (t *TeamShooterScenario) Profiles() []*pb.MatchProfile

Profiles shards the player base on mode, region, and skill.

func (*TeamShooterScenario) Ticket

func (t *TeamShooterScenario) Ticket() *pb.Ticket

Ticket creates a randomized player.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL