fishfolk / bones

An easy-to-use game engine for making real games.
https://fishfolk.org/development/bones/introduction/
Other
210 stars 20 forks source link

matchmaker: Allow finding match with any player count (within allowed range of game) #425

Open MaxCWhitehead opened 1 month ago

MaxCWhitehead commented 1 month ago

Right now player count must be specified explicitly. A player in a game that supports 2-4 players may not care how many players they play with, but currently are forced to select either 2/3/4 size match. If players don't make similar selections, we are kind of splitting the match making pool which may not be ideal.

Should allow a range in matchmaking protocol so player could select "Any" player count during matchmaking.

MaxCWhitehead commented 1 month ago

So right now for a 2-4 player game, we have 3 queues (rooms) (2/3/4 player) on matchmaker, and each match request is hashed into those adding a player. Players are immediately placed into room, and room starts immediately as they fill and cycle continues.

Thinking about some changes in how matchmaker processes requests / rough logic:

Store queues of players based on hard requirements, instead of queues based on player count that flush as soon as they are full (what we currently have.) With an update loop we can flush possible matches with some strategy: