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

Investigate rendering alternatives #11

Closed
jjant opened this issue Aug 21, 2022 · 7 comments
Closed

Investigate rendering alternatives #11

jjant opened this issue Aug 21, 2022 · 7 comments

Comments

@jjant
Copy link
Owner

jjant commented Aug 21, 2022

Description

Rendering is currently implemented using Glium. I picked this library initially because it was the only one I was familiar with.

My main concerns with it are that it looks like WASM is not supported (which we do want), and that compile times may be excessively long for what we need (we only need a handful of OpenGL functions).

Possible alternatives

@lesleyrs
Copy link
Contributor

I have to mention here that changing crates could introduce some problems for old intel graphics cards.

Not sure what exactly causes it but it's a known issue in Godot engine where people using GLES3 and 3d without lights with intel hd 620 causes screen to flash rapidly. And it's a very common old card.

And more relevant is that Macroquad using it's own graphics library has the same damn issue. It isn't even related to 3d or lighting in this case, I know this because I happen to have a laptop with intel hd 620. Literally just having a non black background or a few other colors already causes the flashing which makes it completely unusable. However building to wasm or changing screen dimensions circumvents this problem?

It's not the fault of the graphics libraries, it may be possible for Macroquad to make it work in these edge cases but I've never looked that deep into it. I just think this is important to mention because using this project is very fitting for low end devices.

Here's a link if you like flashing lights in your face: not-fl3/macroquad#520

TLDR: OpenGL drivers are broken on old cards and never got fixed, they mostly work though. For me the intel hd 620 on the current setup works but that could stop working if you add different OpenGL features I think. I believe if you use Vulkan it's supposed to always work on anything that supports it, which is almost everything these days.

I'm not saying you shouldn't try an alternative, but it's important to be aware of this. I'd be willing to test it out if you do change crates. Not sure how glow compares to glium but pixels uses wgpu so it supports things other than OpenGL which is good. I don't know what part about OpenGL causes the flashing so don't take this too literally do what you want.

Also I see your recent commit mentions wasm, so is it supported?

@jjant
Copy link
Owner Author

jjant commented Jan 31, 2023

This is a pretty stale issue, I stopped using glium in #28 in favour of glow for wasm support. pixels or wgpu are interesting alternatives to try, but I'm not sure if it's currently worth it to spend time on that, glow seems to work well enough, and the compile times are okay (and tbh I doubt they'll be better with the other crates) which is the main thing I was concerned about IIRC.

@jjant jjant changed the title Investigate rendering alternatives to Glium Investigate rendering alternatives Jan 31, 2023
@lesleyrs
Copy link
Contributor

lesleyrs commented Jan 31, 2023

Oh ok, in that case glow seems to work well on this bad driver. I've not had any issues so pixels doesn't seem needed, you could close this.

Edit: @jjant I know you said we should use serve, but what is causing the wasm build to fail on github pages? I ran the bash file then moved files to root. https://github.com/lesleyrs/runty8/tree/wasm-test

@jjant
Copy link
Owner Author

jjant commented Feb 11, 2023

I only mentioned serve because it's an easy to set up local server but it shouldn't matter what you using for serving those file.

I think yours might have failed because you had too many files in the deployment? I've configured GH pages to use the /docs directory in this branch, moving the generated files from the build script and it deployed successfully here.

@jjant
Copy link
Owner Author

jjant commented Feb 11, 2023

Btw, it's a cool idea to have some games deployed on push to master. Ideally I would like to not need to have these files commited in the repo (i.e, have a GH action run the build_script and deploy those files).

I'll make a separate issue for this.

Edit: See #56.

@jjant
Copy link
Owner Author

jjant commented Feb 11, 2023

Closed as stale/not worth diving into right now.

@lesleyrs
Copy link
Contributor

I only mentioned serve because it's an easy to set up local server but it shouldn't matter what you using for serving those file.

I think yours might have failed because you had too many files in the deployment? I've configured GH pages to use the /docs directory in this branch, moving the generated files from the build script and it deployed successfully here.

You're right after putting the files in a directory it started working, I haven't had that problem before.

Also your github pages is pointing to a custom domain that isn't loading: https://github.com/jjant/runty8/deployments

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

2 participants