Skip to content
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

Merged

Conversation

geekingfrog
Copy link
Contributor

@geekingfrog geekingfrog commented Nov 19, 2024

Integration with recoil-host

matchmaking-smol.mp4

I've added a few comments after this video was recorded.

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.
@geekingfrog geekingfrog force-pushed the matchmaking-starts-autohost branch from fbee762 to a720e98 Compare November 19, 2024 19:41
@@ -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
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@geekingfrog geekingfrog marked this pull request as ready for review November 22, 2024 15:12
@L-e-x-o-n L-e-x-o-n merged commit 65d2f15 into beyond-all-reason:master Nov 24, 2024
3 checks passed
@geekingfrog geekingfrog deleted the matchmaking-starts-autohost branch November 24, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants