PixelGuys / Cubyz

Voxel sandbox game with a large render distance, procedurally generated content and some cool graphical effects.
GNU General Public License v3.0
365 stars 47 forks source link

Game crashes - ability to run on older OpenGL #228

Open glowiak opened 7 months ago

glowiak commented 7 months ago

Hello.

I would like to play this game, but when I try to run it I get this error:

GLFW Error(65543): GLX: Failed to create context: GLXBadFBConfig

GLFWFailed

/tmp/Cubyz-master/src/main.zig:616:74: 0x4d21c2 in init (Cubyzig)

  window = c.glfwCreateWindow(width, height, "Cubyz", null, null) orelse return error.GLFWFailed;

                                                                         ^
/tmp/Cubyz-master/src/main.zig:694:2: 0x53a468 in main (Cubyzig)

 try Window.init();

 ^

I have searched a lot, and found out that all your shader files are made for OpenGL 3.4, while my computer supports 3.2 at most.

I also tried on other computer, but with the same error, as its maximum GL version is also 3.2.

Is there a way to run it on older OpenGL?

Because if most computers don't support 3.4, then your audience kinda grows much slower.

IntegratedQuantum commented 7 months ago

I'm sorry, but I won't support older OpenGL versions. There is a bunch of things that I need from newer OpenGL versions, like compute shaders and shader storage buffers. Without these it would be a bit of a pain to implement many of my features, and in the future I would probably like to take more advantage of compute shaders.

According to wikipedia most GPUs that were made within the last ten years should support OpenGL 4.6, which I'm currently targeting. So in 5-10 years, when Cubyz turned into a playworthy game, most people will have a GPU that supports it.

However there might be a solution here still:

  1. If your GPU supports OpenGL 4.6, but your driver doesn't, then you could update your driver.
  2. It might be possible to use an API translation layer. For example Mesa Zink translates OpenGL commands to Vulkan, which might be supported on your PC(I doubt it though).
glowiak commented 7 months ago

Damn. My pc has been produced before 4.3 got released.

glowiak commented 7 months ago

Even Vintage Story and modern Minecraft can run on my pc.

glowiak commented 7 months ago

I have an intel integrated gpu. My processor is i5-3570, which was released in june 2012, two months before 4.3 got released.

glowiak commented 7 months ago

@IntegratedQuantum But really, new computers are expensive, and if something works good then why change it

Really, many people have such old (and even older) gpus/cpus. Not everyone is a gamer with sponsored latest hardware.

IntegratedQuantum commented 7 months ago

I get it, and I'm sorry. But I got limited time on my hand, and I'd rather spend that time working on game features, than working on compatibility with 12 year old hardware.

glowiak commented 7 months ago

:(

glowiak commented 7 months ago

@IntegratedQuantum Is there any way to emulate it or something?

You suggested mesa zink, but there aren't really any informations on how to get it working.

IntegratedQuantum commented 7 months ago

Honestly, I don't know much about it. Mesa was already installed on my linux machine and I could run it by setting some environment variable. It's probably much harder to get working on windows. Also I'm not sure if your GPU even supports vulkan anyways.

archbirdplus commented 7 months ago

I forgot where I saw this quote, but, "Zink can't expose more features than your hardware already supports". If your GPU doesn't physically have compute shaders, then you can't get GPU acceleration for compute shaders, no matter what translation layers you use. Compute shaders are more powerful than vertex/fragment shaders, so they can't be emulated via vertex/fragment shaders in general.

On the other hand, there is software rasterization such as Mesa's LLVMpipe driver, which offers OpenGL 4.6 without any GPU whatsoever. Only problem is, it doesn't use the GPU, so it renders Cubyz at 1 fps at a pitiful LOD. In theory you could mix hardware and software rasterization to take advantage of hardware acceleration when it is supported, but I doubt there is any work on this.