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

AFK detection triggered on firefox #54

Closed
keyarz opened this issue May 15, 2022 · 19 comments
Closed

AFK detection triggered on firefox #54

keyarz opened this issue May 15, 2022 · 19 comments

Comments

@keyarz
Copy link

keyarz commented May 15, 2022

it will pop out AFK detection windows on firefox and activate auto draw & discard for you makes you lose the game

@Jimboom7
Copy link
Owner

Jimboom7 commented May 15, 2022

Did you minimize the browser or use another tab while the game was running?
It's okay to use other programs while the bot operates, as long as the game is open. But if you minimize the game it will be detected as afk.

@keyarz
Copy link
Author

keyarz commented May 15, 2022

No i didn't minimize or change tab, i have dual monitor, it just not compatible with firefox not sure why? Is there a chance my firefox addon (adblock) blocking it? It run smooth on chrome which is what i using now.
Also, what's the max value of these constants? i didn't see it in comments. Have no idea how far i can go with the value.

@cbrt729
Copy link

cbrt729 commented May 15, 2022

In my case, chiitoitsu strategy sometimes runs out of time and causes AFK warning, especially in tenpai.

@yangruihan
Copy link
Contributor

yangruihan commented May 15, 2022

In my case, chiitoitsu strategy sometimes runs out of time and causes AFK warning, especially in tenpai.

This happens to me too, run out of time three times will trigger afk pop-up window

@Naelle2
Copy link

Naelle2 commented May 15, 2022

same in some rounds it takes too long for the bot to take a turn and make the afk timer pop up. But in the following rounds it doesnt happen
idk about chrome cuz the latest bot is super slow all around and freeze the game if i use it on chrome.

@legomeaker101
Copy link

there are two things i believe are causing this: the standard afk (which always happens and causes the bot to restart the page) or the took too long to act. this one might be one of 2 things: your computer is too slow for the bot (causing it to take too long with each turn) the bot isn’t active

@yangruihan
Copy link
Contributor

These happen frequently on my mobile device

@keyarz
Copy link
Author

keyarz commented May 16, 2022

same in some rounds it takes too long for the bot to take a turn and make the afk timer pop up. But in the following rounds it doesnt happen idk about chrome cuz the latest bot is super slow all around and freeze the game if i use it on chrome.

try to activate the low spec mode in parameters

@keyarz
Copy link
Author

keyarz commented May 16, 2022

These happen frequently on my mobile device

How to use this in mobile? Mind to share?

@keyarz
Copy link
Author

keyarz commented May 16, 2022

there are two things i believe are causing this: the standard afk (which always happens and causes the bot to restart the page) or the took too long to act. this one might be one of 2 things: your computer is too slow for the bot (causing it to take too long with each turn) the bot isn’t active

I think find out what's the reason now, seems like it count as tabbing if I opening a new window(maximized) with same browser, even though I'm not tabbing or minimizing.
And the probable reason is it disconnected, after reconnecting the bot stop itself if you're not checking the autostart new game box

@yangruihan
Copy link
Contributor

yangruihan commented May 16, 2022

These happen frequently on my mobile device

How to use this in mobile? Mind to share?

Android:you can use kiwi broswer which can use tampermonkey plugin. You can download from Google play

iOS: you can download Userscripts safari plugin from App store, which like tampermonkey allow to run user script on Safari

Then open majsoul web page, enjoy yourself

@Naelle2
Copy link

Naelle2 commented May 16, 2022

same in some rounds it takes too long for the bot to take a turn and make the afk timer pop up. But in the following rounds it doesnt happen idk about chrome cuz the latest bot is super slow all around and freeze the game if i use it on chrome.

try to activate the low spec mode in parameters

is this thread talking about the old ai? If yes i apologize my problem is for the new 1.3.0 beta. i have no problem with the old ai.

@yangruihan
Copy link
Contributor

yangruihan commented May 16, 2022

same in some rounds it takes too long for the bot to take a turn and make the afk timer pop up. But in the following rounds it doesnt happen idk about chrome cuz the latest bot is super slow all around and freeze the game if i use it on chrome.

try to activate the low spec mode in parameters

is this thread talking about the old ai? If yes i apologize my problem is for the new 1.3.0 beta. i have no problem with the old ai.

In new 1.3.0 beta, there also is a parameter to control AI level PERFORMANCE_MODE , you can change it to make it faster.

@keyarz
Copy link
Author

keyarz commented May 16, 2022

same in some rounds it takes too long for the bot to take a turn and make the afk timer pop up. But in the following rounds it doesnt happen idk about chrome cuz the latest bot is super slow all around and freeze the game if i use it on chrome.

try to activate the low spec mode in parameters

is this thread talking about the old ai? If yes i apologize my problem is for the new 1.3.0 beta. i have no problem with the old ai.

Where can i get the 1.3 version? I couldn't see it anywhere
I'm referring to 1.2.1 which is what I using now
1 2 1

@yangruihan
Copy link
Contributor

same in some rounds it takes too long for the bot to take a turn and make the afk timer pop up. But in the following rounds it doesnt happen idk about chrome cuz the latest bot is super slow all around and freeze the game if i use it on chrome.

try to activate the low spec mode in parameters

is this thread talking about the old ai? If yes i apologize my problem is for the new 1.3.0 beta. i have no problem with the old ai.

Where can i get the 1.3 version? I couldn't see it anywhere

I'm referring to 1.2.1 which is what I using now

1 2 1

You can find it in this PR #46

@keyarz
Copy link
Author

keyarz commented May 16, 2022

After a day of testing, I can now confirmed if you covering the windows with any windows(maximized) on top, it will became AFK.
Regardless what browser you're using
I'm on Win 10 64bit

@Jimboom7
Copy link
Owner

After a day of testing, I can now confirmed if you covering the windows with any windows(maximized) on top, it will became AFK.
Regardless what browser you're using

Thank you for confirming this. I had the suspicion something like this might the problem, but I could never exactly determine it.
To be honest, I think it's not possible to prevent this by code. It seems to be the "Occlusion Tracking" feature which is mentioned here, so it's not related to the game, but to the browser. I did a quick google search and there seem to be some ways to turn it off, I will check if that works and add it to the documentation.

In my case, chiitoitsu strategy sometimes runs out of time and causes AFK warning, especially in tenpai.

That was related to a bug in version 1.2.1 and will be fixed when 1.3.0 is released.

@keyarz
Copy link
Author

keyarz commented May 16, 2022

After a day of testing, I can now confirmed if you covering the windows with any windows(maximized) on top, it will became AFK.
Regardless what browser you're using

Thank you for confirming this. I had the suspicion something like this might the problem, but I could never exactly determine it. To be honest, I think it's not possible to prevent this by code. It seems to be the "Occlusion Tracking" feature which is mentioned here, so it's not related to the game, but to the browser. I did a quick google search and there seem to be some ways to turn it off, I will check if that works and add it to the documentation.

In my case, chiitoitsu strategy sometimes runs out of time and causes AFK warning, especially in tenpai.

That was related to a bug in version 1.2.1 and will be fixed when 1.3.0 is released.

I see, I wish this project will elevate to be a command prompt like bot in the future to get rid of this Haha
Btw, I really need that detail(documentation) on the constants value so i can know what to change, i have no idea how to make it more offensive
because i don't know how far the value can go or which value to change.

@Jimboom7
Copy link
Owner

I tested different things and found these browser settings:
Chrome: Go to chrome://flags/#calculate-native-win-occlusion and set it to disabled.
Firefox: Go to about:config and set widget.windows.window_occlusion_tracking.enabled to false.

That should prevent the browser from checking if another window is on top.
The game still needs to be the active tab and not minimized though, there is no simple way to turn that throttling off.

Btw, I really need that detail(documentation) on the constants value so i can know what to change, i have no idea how to make it more offensive
because i don't know how far the value can go or which value to change.

The parameters are reworked in the 1.3.0 version, I can't tell you much about the old ones besides "just try it out". If you want to make it more offensive raising the FOLD_CONSTANT is probably your best bet.

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

6 participants