-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matchmaking starts autohost #529
Matchmaking starts autohost #529
Conversation
This is going to come handy when something needs an autohost (like matchmaking)
More setup required, so centralise the logic
This ensure that the each player stays in control of their domain, so that the matchmaking related function don't need to query anything from the players.
The same mechanism is going to be used for the player process
And also, only ignore messages that are maps, so that we don't ignore the valid messages like timeouts.
Instead of just the ID. This allow to pass the correct player ID when constructing start script.
fbee762
to
a720e98
Compare
@@ -105,11 +141,76 @@ defmodule Teiserver.Autohost.TachyonHandler do | |||
{:stop, :normal, 1000, [{:text, resp}], state} | |||
end | |||
|
|||
# Generic handler for when a response arrives too late |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am planning to refactor the transport bits, so that this logic about awaiting for the response and timeout management will be centralised and abstracted out of the Autohost and Player modules.
@@ -120,4 +216,29 @@ defmodule Teiserver.Matchmaking.PairingRoom do | |||
|
|||
{:stop, :normal, state} | |||
end | |||
|
|||
@spec hardcoded_start_script(state()) :: Teiserver.Autohost.start_script() | |||
defp hardcoded_start_script(state) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obviously, this is temporary, but we first need to put some thoughts behind assets management.
Integration with recoil-host
matchmaking-smol.mp4
I've added a few comments after this video was recorded.