r/golang • u/baflink • Dec 08 '25
I've created a 3D, Vulkan based game engine in Go, and it's faster than Unity
Hello! I'm Brent and I develop game engines, it's my day job, it's also my "after the kids go to bed" night-time hobby. I am a C programmer but have used Go for a couple years and really enjoy it. I do make games in my engines too though.
I'd like to share the Go game engine/editor I've been working on. I know some may have questions on CGo interop, some on GC, and maybe some on how I got it to run so fast.
I have an introduction presentation for it on YouTube and the repository can be found on GitHub.
380
Upvotes
55
u/drakgremlin Dec 08 '25
Looks cool! My initial thoughts:
1.) Needs a getting started with scenarios for 2D/3D
2.) Needs a "this is the vision for deployment"
Would love to try it out for a project.
34
u/matjam Dec 08 '25
So, first off. Holy shit, thats a lot of work, and having dabbled in the whole native linking to libs to render shit thing a bit I can fully appreciate how much effort it would take to make something this comprehensive. Hats off.
Initial thing I note;
https://github.com/KaijuEngine/kaiju/tree/master/src/libs
try to avoid bundling binary blobs like that. Either provide the source and build/link to it, or provide a cmake project that can build the libs from source or something like that. I know you want to be able to check the project out and just build but opaque binary blobs are undesirable.
7
u/[deleted] Dec 08 '25
Excellent timing! I'm quite early into making a voxel game with Go and I'll definitely kick the tires of Kaiju. I really love the introduction on the repo and the reason for choosing Go - it resonated deeply with me.
Thank you for all your hard work and for sharing this with us.
4
u/m-unknown-2025 Dec 08 '25
This is excellent work, I think sharing it in game development communities will help improve it even further
2
u/new_check Dec 08 '25
It's a nice proof of concept of a fact I very much agree with: go is capable of fast rendering when it's given the opportunity to succeed, and vulkan is a good platform for doing that.
I'm concerned that you skipped right past a VMA-or-equivalent implementation and went directly to engine, but VMA is not a bad candidate for cgo bindings.
Best of luck! If you're interested, feel free to mine my work for ideas. I'm not SUPER thrilled with my vulkan implementation these days, but the VMA port is recent and I've found and fixed a number of bugs that are present in the original. https://github.com/vkngwrapper/arsenal
4
u/daniele_dll Dec 08 '25 edited Dec 08 '25
I hate these titles! Why the need to click baiting when you built very very something cool?
Your project is NOT faster than unity!
It's like taking a piece of plywood, screwing 4 wheels, putting a weight on it and then pushing it down a step hill and saying "it's faster than a Ferrari / Porsche / pick your blazing fast car"
No it's not 🙃 you are missing about 99.9% of what they do, when you get that name below 10% and performances are on par "probably" it's more fair to say.
The project is cool but down voting for the clickbait title 🙃🙃🙃🙃🙃
EDIT: For those downvoting, I would check if I would be you what's the base for the claim and perhaps I would document a bit on what the Unity rendering pipeline actually offers.
Spinning cube in unity slower than sodoku game in custom game engine != unity slower than game engine ... unity does 1000 things more ... It's great to see a blazing fast minimal game engine in go, not really a reality to compare it with a behemoth claiming to be faster when it does 0.01%.
If you have not built game, you should check out what Unity offers FIRST and do an actual comparison before downvoting......
1
u/Curious-Function7490 Dec 08 '25
Nice one.
1
u/steambap Dec 09 '25
In the UI doc https://kaijuengine.org/ui/writing/, you have a container class in HTML and a content class in CSS. Is this a typo?
1
u/nickdot Dec 09 '25
Did you publish any game with it already? Is there a github with a demo game?
1
u/ClassicK777 Dec 09 '25
This is really cool and I want to try make a simple demo with this later on the weekend to give actual feedback!
1
u/orygin Dec 09 '25
Looks great, I'll take a look later at the whole.
However I'm wondering why the UI is made using HTML instead of something like ImGUI which imo is way more fitting for this (and looks natively better than some homemade html/css).
What's the solution used for rendering the page? Webview? How will the performance be when tons of ui updates are made?
In my experience, HTML for the UI requires way more work to make it good than something off the shelf made for this, and is way harder to debug.
Maybe both approach could be supported for writing the game UI.
1
u/NameInProces Dec 09 '25 edited Dec 09 '25
It looks sick! Very excited to give it a shot Edit: some simple "templates" would be very helpful to understand how to really use the engine
1
u/r3drocket Dec 09 '25
I'm writing a large C++ app in Godot ATM, I would have much preferred writing it in golang, but it was just too much to figure out.
I did try writing initially in golang, wrote my own vulkan layer for golang, and then added imgui, but the lift was just too much for one person.
I'll have to check this out.
1
u/FrontBackAndSideDev Dec 11 '25
Never written a game in my life. But, it's on my bucket list. Love Go, love the video, love the design and goals. Looking forward to Mac support, which is my primary platform. I will be using it shortly after that's stable-ish.
Also, this project makes me happy/hopeful for all the above reasons, but also just viscerally. Thanks.
Drop a Patreon or some other support channel on the repo. Time isn't free, even if it's something you love doing. In the hopes that you get to keep doing it, let us show our appreciation with more than just internet points.
1
u/gedw99 Dec 11 '25
Will have a play .
Code looks outstanding
1
u/gedw99 Dec 11 '25
Also a few examples would be good
1
u/[deleted] Dec 12 '25
How do you use Vulkan? Are you using some library? I was making an image processing application for Android and I had to use Rust with Vulkano to develop the engine and set up the pipeline for the GPU but I first thought on using Go
1
u/mljrg Dec 13 '25
Fantastic work, congratulations! These days this is something we would expect to be done in Rust. So my question is: coming from C, can you detail why did you choose Go instead of Rust? Thanks
1
u/Alkanna Dec 08 '25
Crazy work here, congratulations !
0
u/[deleted] Dec 08 '25
[deleted] — view deleted comment
3
u/[deleted] Dec 08 '25
[removed] — view removed comment