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

OS/Browser can't be detected from Lua/Love2D #5

Open
FormularSumo opened this issue Sep 10, 2024 · 0 comments
Open

OS/Browser can't be detected from Lua/Love2D #5

FormularSumo opened this issue Sep 10, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request specific to web platform minor Small impact on overall usability and none on game functionality upstream issue An issue with Love.js or a browser, that I'm unable to work around

Comments

@FormularSumo
Copy link
Owner

For a few things, the game needs to behaviour differently depending on the platform. For example, the pause_on_loose focus setting being off doesn't work on mobile very well because Android and iOS are very aggressive in suspending background processes (using the correct platform/web APIs it'd probably be possible to work around this.. but not very feasible to do from the Love2D/Lua environment), so ideally I'd like to remove the toggle so it's always on (like I do on the Android native app). Another example is how scrolling doesn't work consistently across platforms - it's way faster on Linux and ChromeOS. I would like to slow this down, but I can't when OS is always returned as "Web" by Love2D.

There is a bridge you can use to communicate between Love2D and Javascript, however it requires console wrapping to work, which is disabled on Github pages unfortunately.

@FormularSumo FormularSumo added bug Something isn't working enhancement New feature or request specific to web platform minor Small impact on overall usability and none on game functionality upstream issue An issue with Love.js or a browser, that I'm unable to work around labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request specific to web platform minor Small impact on overall usability and none on game functionality upstream issue An issue with Love.js or a browser, that I'm unable to work around
Projects
None yet
Development

No branches or pull requests

1 participant