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

port_detector gets it wrong half the time in a ditto #50

Open
altf4 opened this issue Aug 5, 2020 · 2 comments
Open

port_detector gets it wrong half the time in a ditto #50

altf4 opened this issue Aug 5, 2020 · 2 comments

Comments

@altf4
Copy link
Owner

altf4 commented Aug 5, 2020

In offline matches, what port your bot is playing on is pretty trivial to find. You have to configure it when you make the console and it doesn't change.

But in online matches, you're assigned a controller port essentially at random (it's not actually random, but it might as well be). So how are we supposed to know what port our bot and our opponent are on?

port_detector() is a little helper function that's pretty stupid. It just looks at the characters in the game and figures that your bot must bot on the port that is the correct character! If your bot plays Falco, then obviously it's the Falco in the Falco vs Marth.

But what happens when the match is a ditto? Well... we just sort of assume that the bot is on port one.

This is hard to fix, because the SLP spec only has player tags in the metadata field, which is computed after the game is over. We need to add it to the game start event, which is... tricky.

@altf4
Copy link
Owner Author

altf4 commented Oct 9, 2021

Port detector works by using character and then costume. Which is probably as good as we're going to get until connect code is added into the game start event.

@altf4
Copy link
Owner Author

altf4 commented Oct 9, 2021

oh, actually. Connect code and nickname ARE in the game start event.

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

No branches or pull requests

1 participant