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 ¶
- type TeamShooterScenario
- func (t *TeamShooterScenario) Backfill() *pb.Backfill
- func (t *TeamShooterScenario) Evaluate(stream pb.Evaluator_EvaluateServer) error
- func (t *TeamShooterScenario) MatchFunction(p *pb.MatchProfile, poolBackfills map[string][]*pb.Backfill, ...) ([]*pb.Match, error)
- func (t *TeamShooterScenario) Profiles() []*pb.MatchProfile
- func (t *TeamShooterScenario) Ticket() *pb.Ticket
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 (*TeamShooterScenario) Backfill ¶ added in v1.2.0
func (t *TeamShooterScenario) Backfill() *pb.Backfill
func (*TeamShooterScenario) Evaluate ¶
func (t *TeamShooterScenario) Evaluate(stream pb.Evaluator_EvaluateServer) error
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.