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

Automatic Unity OpenGL workarounds #835

Open
fasterthanlime opened this issue Jul 26, 2016 · 2 comments
Open

Automatic Unity OpenGL workarounds #835

fasterthanlime opened this issue Jul 26, 2016 · 2 comments
Labels
compatibility Can we make more games compatible with the app without them having to change anything? linux Linux issues

Comments

@fasterthanlime
Copy link
Collaborator

I hear they're in the process of fixing it, but in the meantime, there's a bunch of games that don't run for a bunch of people without adding the -force-opengl3 or -force-opengl command-line arguments.

The Unity player has a log, which shouldn't be hard to find, and it could be grepped for typical messages, and the app could try relaunching using the -force-opengl option. That would fix about 3/4 of the Linux issues currently open on https://github.com/itchio/itch-compatibility-watchlist/issues

@fasterthanlime fasterthanlime added linux Linux issues compatibility Can we make more games compatible with the app without them having to change anything? labels Jul 26, 2016
@fasterthanlime
Copy link
Collaborator Author

fasterthanlime commented Jul 29, 2016

Thanks to Guillaume (@Sirithang on Twitter), I've discovered the -logFile option, which lets us tell the Unity player (ie. any export) where to write its log files.

The plan is now:

  1. To look for a file named *_Data/Managed/UnityEngine.dll
  2. If it exists, it's a Unity game, pass -logFile
  3. If the game exits too quickly, parse the log files
  4. If the log files contains some sort of OpenGL error, try applying workaround

I think the workarounds should be a 'Behavior' option in the app:

  • Try -force-opengl (should be Default as it works the most, but will make some games look worse)
  • Try exporting MESA_GL_VERSION_OVERRIDE=3.3 MESA_GLSL_VERSION_OVERRIDE=150 before launching game
  • Try nothing, just report the crash

We should also have a documentation page on https://itch.io/docs/itch that explains OpenGL problems on Unity and how to work around them.

(Additionally, while I'm handling that it would be nice to take care of optirun/primusrun)

@fasterthanlime
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Can we make more games compatible with the app without them having to change anything? linux Linux issues
Projects
None yet
Development

No branches or pull requests

1 participant