Discussion Imagine Making game engine With Lua
Imagine building a 3D or 2D game engine from scratch using only Lua
0
Upvotes
Imagine building a 3D or 2D game engine from scratch using only Lua
View all comments
Show parent comment
1
u/VidaOnce Mar 28 '26 edited Mar 28 '26
Yeah my OpenGL support is honestly not very useful considering it relies on some more modern concepts like the DSA apis and separate sampler objects which already kind of rules out using it on any platforms without modern OpenGL versions which is rarer than even Vulkan 1.1 support these days. It's cool as a benchmark comparison and easier to start with for sure though
I was definitely gonna go Vulkan for MacOS since I know MoltenVK and KosmicKrisp are solid there and Metal is not really worth targeting right now. I know just from my brief research it's possible to create windows with some internal Objective C apis but I just never got to that point and it doesn't help that I don't have a Mac and Apple does not make it easy to work with their ecosystem without one.
I see you went with Wayland bindings for Window creation on Linux? I just could not get myself to bother with that lol. It seems like too much of a hassle when everyone has XWayland and if anything wayland native seems to perform worse for me testing on vkcube. But that is pretty crazy effort
As for shader compilation, at the moment I'd just assume you would ship spirv to your users but in the future I wanted to additionally create my own shader language targeting spirv natively so the compiler could also just be shipped with your app. Already facing some pains with OpenGL and VK glsl desync in functionality (can't split sampler and texture objects in OpenGL) that might be diminished by an intermediate language.
On a fun note, I think its actually really easy to get your own shader language id registered as an official spirv SourceLanguage so I kind of want to shoot for that: https://github.com/KhronosGroup/SPIRV-Headers/blob/00898b201b4153d7198c3e0134dbf953c83bbfd7/include/spirv/unified1/spirv.lua#L38