8000 Companion Mode + New MenuFlow by artosimonyan · Pull Request #716 · hectorgimenez/koolo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Companion Mode + New MenuFlow #716

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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

artosimonyan
Copy link
Collaborator
@artosimonyan artosimonyan commented Feb 28, 2025
  • Companion mode returns to Koolo
    • Companions wait until a leader has created a game. Will NOT join if leader started the game prior to companion launch.
  • Completely revamped creating/joining games logic
  • Greatly improved online check logic and eliminated a lot of edge cases
  • Improved failure to select Character with maximum attempts and a client restart.

- Companion mode returns to Koolo
- Completely revamped creating/joining games logic
- Greatly improved online check logic and eliminated a lot of edge cases
- Improved failure to select Character with maximum attempts and a client restart.
@davidfvsilva
Copy link
Contributor

The Leader seems to be idling in Lobby after X amount of runs. It can vary. I've been testing this and have seen nothing in logs, so it must be silent errors or an edge case. It can take 1 hour, it can take 8 hours, but eventually it stops. More logs through the process could help.

@davidfvsilva
Copy link
Contributor
davidfvsilva commented Mar 4, 2025

After testing it for a few days with groups, there is an issue where the Leader stops creating games (it usually doesn't take much time, can be less than an hour, but it can take more time). You can also have cases where the companion doesn't get the join request (it will skip a run and join the following one), and where a companion can get a join request for a previous game (it will try to join an old game name). If you restart the app, then it will start working normally again for some time.

@artosimonyan
Copy link
Collaborator Author

I didn't notice any such issues @davidfvsilva.

I recommend adding some comments on your end of every single step in out of game flow and see what's wrong. I won't be adding that in the PR as it will cause a LOT of logs that we don't really need for everyone once pushed to main.

If you can find a way to reproduce it, let me know. There's literally no reason aside something local on your end or some edge case why it will just stop working randomly after a few hours.

@Antizerg
Copy link
Antizerg commented Mar 5, 2025

I also encountered the issue where the leader stops creating games, but this was not a new bug for me so hard to say if the companion feature created the issue or not. I switched to not creating lobby games to solve this in the past, so I never went deeper with it.. but I don't think this is something we can get around with in companion mode, unless we switch to friend list joining perhaps?

@artosimonyan
Copy link
Collaborator Author

So ... it's just a problem when the leader creates Lobby games? If so, just create normal ones. And by stops do you mean he does nothing (idles for 10+ minutes) or what?

I really need you to provide more information here and not vague explanations

@davidfvsilva
Copy link
Contributor

So ... it's just a problem when the leader creates Lobby games? If so, just create normal ones. And by stops do you mean he does nothing (idles for 10+ minutes) or what?

I really need you to provide more information here and not vague explanations

it will idle indefinitely in lobby like I mentioned before. Unfortunately, there isn't anything noticeable in the logs.

@Antizerg
Copy link
Antizerg commented Mar 6, 2025

So ... it's just a problem when the leader creates Lobby games? If so, just create normal ones. And by stops do you mean he does nothing (idles for 10+ minutes) or what?
I really need you to provide more information here and not vague explanations

it will idle indefinitely in lobby like I mentioned before. Unfortunately, there isn't anything noticeable in the logs.

same, it will sit in the game creation lobby indefinitely. The leader has the "Create Lobby Games" option checked on my end.

@artosimonyan
Copy link
Collaborator Author

@Antizerg @davidfvsilva, test pressing escape to get back to the character selection screen and let me know if that will make it start doing stuff again.
Preferably if you can report back before tomorrow's reset, would be wonderful.

@davidfvsilva
Copy link
Contributor

@Antizerg @davidfvsilva, test pressing escape to get back to the character selection screen and let me know if that will make it start doing stuff again. Preferably if you can report back before tomorrow's reset, would be wonderful.

you need to manually enter a game to get it running again. from a distance you can also, stop-start the bot with a discord command

@RobotGaston
Copy link
RobotGaston commented Mar 9, 2025

upd.4

after, Antizerg's report, (thank you for that) I rebuild companion from scratch and now it seems like it's running also fine for me...

thank you very much, for all the changes, and for the work on this amazing feature.

20 games in a row (4 hours straight) leader-companion working without problem...(joining correct games. without any issue so far...)

if there any chance for a logic please - Leader left - Companions should also leave the game immediately (maybe as an option?) and go into the next one with the leader?

@artosimonyan
Copy link
Collaborator Author

The issue doesn't seem directly connected with the companion but with the out of game loop. I'll have to dig into it ... not sure how exactly but this needs work

@artosimonyan artosimonyan marked this pull request as draft March 10, 2025 18:44
- Added maximum number of retries if we can't connect.
- Added checks for error popups
- Added SetLastAction calls to set debug status, so we can tell if we're stuck somewhere.
- Updated d2go to latest
@artosimonyan
Copy link
Collaborator Author

@davidfvsilva, @Antizerg Updated the flow, added some more checks and added debug info via the SetLastAction. Please test again and let me know if there are any issues.

@Antizerg
Copy link
Antizerg commented Mar 17, 2025

@davidfvsilva, @Antizerg Updated the flow, added some more checks and added debug info via the SetLastAction. Please test again and let me know if there are any issues.

no issues after a 6 hour run.

A minor suggestion to help people not ask questions later:
If we change Leader Name to Character name, it will be a little more clear.
The "Set as Leader" terminology can stay the same, but changing Leader Name to Character Name is more clear.
I originally questioned which one was meant to go here and I feel others will question it as well; "Leader Name" is supposed to be character or supervisor name? This parameter naming convention also aligns with the "Character name" at the top of settings.

Copy link
@Neo-Silver Neo-Silver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm - seemed to be an connection issue.

@davidfvsilva
Copy link
Contributor

Still seeing the leader stop making games after a few runs. As for having the companion quit the game, you can send an event that runs the ExitGame method on companions when the runs are done, then give them a few seconds to leave the game. Companions sometimes stop joining games, but not nearly as often as the leader stops making them. Also, you have these wierd cases where a new game event is fired from nowhere (as if it had it in queue somewhere), and theses cases were the companion is trying to join the wrong game.

@RobotGaston
Copy link
RobotGaston commented Mar 18, 2025

after a 12+ hours of testing I also can confirm that, leader and companion still can get our of sync...

problem remains...:(

this is working much, much , better now, companions and leader can run more longer games streak together without getting out of sync now (70-80 games in a row, hours of communicating) but still...

companions keep on joining previous game with time, and not the new game where the leader is.

The game number is off by 1 for a companions , i. e.

leader is in "mygame2"

companions joined "mygame1" (already cleaned and played game). a previous game.

this state is not getting resolved until both koolo+game windows (mandatory) are getting full complete restart.
something is jamming in game creation for the companions windows...


"" You don't need to wait 80 games for it to break, as it can break after 2-4 games quite regularly""

yes, just witnessed it happened on 9 created game :(
companions went into previous game forgetting to add +1 to game's name counter...

maybe there should be a check on companions side.
We companions entered a game. Is Leader "by leader name" present? Yes? - Fine, we go with routine.
No? - leave the game, correct the game name to +1. Join the game. Check again for a leaders presence...

@davidfvsilva
Copy link
Contributor

Something seems wrong with the event system. Before this PR I had a companion system up without events that was mostly the game loop looking at common configs that were set by the leader, and that was working quite well, which makes me think that there's something wrong with the events. You don't need to wait 80 games for it to break, as it can break after 2-4 games quite regularly, and the way it breaks (keep in mind that I'm a .net architect, not a go developer, so I don't know how this event implementation works exactly) makes it look like there's either an event queue where events aren't being taken off sometimes, or a queue that is receiving events from some other source (like a supervisor that is running, and bugging out, and then it doesn't actually die, and another supervisor starts running, and then you have those issues with events coming from different sources). Sometimes, it also looks like the companion is just unsubscribing from the event stream. Other times, it seems like the leader supervisor is stuck in an unknown game state, and keeps hitting the continue to repeat the loop, or that it exits the loop and doesn't restart.

@artosimonyan artosimonyan changed the title Companion Mode + New Flow Companion Mode + New MenuFlow Mar 18, 2025
@RobotGaston
Copy link

with these changes - 4aea0c8

on my end Leader creating game and aborting immediately, getting into loop - spamming create game task...after 1st successful run.

@sogmko sogmko mentioned this pull request Mar 20, 2025
@Antizerg
Copy link
Antizerg commented Mar 26, 2025

A new bug is discovered:
I have 1 leader and 2 companions. Was running this for a few days with the usual sync issues and the companions would eventually stop joining.. but a new bug has surfaced.
One of my companions will try to join a specific game over and over, non stop. Even if my Leader is completely turned off. I completely restarted my computer and it still does this behavior. I can only turn on the companion that is bugged out and it will perform this behavior. It is also the same game name that it is trying to join for the last 24 hours, even between completely restarting my computer.

Supervisor-log-NewBlizzy-2025-03-26-07-12-45.txt

CarlPoppa1 pushed a commit to CarlPoppa1/koolo that referenced this pull request Mar 26, 2025
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.

6 participants
0