Kaiju – General purpose 3D/2D game engine in Go and Vulkan with built in editor
Posted by discomrobertul8 6 days ago
Comments
Comment by MindSpunk 6 days ago
I don't understand why they're calling out the FPS of an empty scene as a useful number compared to Unity though. Ignoring that this engine will have a fraction of the features of Unity (the likely reason for the FPS number in the first place), it's just a useless benchmark because it's an empty scene. `while (true) {}` will get you the same thing.
I'd wish they'd highlight how the engine helps you make a game rather than arbitrary performance numbers on microbenchmarks that don't generalize to a real game project. You can absolutely be faster than Unity, but "9 times faster than Unity out of the box" is not a number people should take seriously without the context of where the number comes from.
I wish them well though. I'm always interested to see more work in implementing engines in GC languages. I'm personally quite interested to see what can be done in modern GC languages like Go or (modern) C# which provide lots of tools to limit GC pressure. Being able to write C-like code where needed in an otherwise managed runtime is a really powerful tool that can provide a best-of-both-worlds environment.
Comment by eek2121 6 days ago
I know a lot of different languages and frameworks, from C/C++ up, so I say this: The language is never the issue. Language is just syntax. ease of use is everything.
I've been wanting to make a game for a long time. I toyed with OpenGL/DirectX at multiple points since the 90s, even going so far as to creating a really cool tech demo/engine that scales with CPU core count. However, those days are in the past. I really want to focus on not writing a ton of graphics and sound code. I really want to focus on the game logic and the game itself.
The above is one of the reasons I'm finding it hard to get into Godot, even though I *really* like the project (and wish I could fund it, alas, I'm unemployed, permanently). Unity just happens to be robust enough that I might be able to scrap together a prototype. It has built in things like a terrain editor, tons of educational material, an asset store to get some placeholder assets, etc.
I saw a comment mentioning how Warcraft 2 was so awesome because it had a great editor. I saw that and also Starcraft had an amazing editor. Neverwinter Nights also had an amazing editor. We need something like that with a good license to build games. Every engine that even somewhat approaches that area blows up in complexity, has a super restrictive license, or doesn't allow you to build your own executables.
RPGMaker actually is pretty decent for 2D games, however the fixed resolution and constant dramatic shifts between versions, previous licensing issues (I haven't looked at their current license), and more make it a no go for a serious commercial game...and it doesn't do 3D.
Sorry for the rant. Don't even get me started on how much more complicated the transitions from DX8-DX12 or OpenGL 1.x/2.x -> Anything else have been. ;)
Comment by crq-yml 6 days ago
But none of the code is necessary to do game design either, because that just reflects the symbolic complexity you're trying to put into it. You can run a simpler scene, with less graphics, and it will still be a game. That's why we have "10-line BASIC" game jams and they produce interesting and playable results. The aspect of making it commercial quality is more tied to getting the necessary kinds and quantities of feedback to find the audience and meet them at their expectations, and sometimes that means using a big-boy engine to get a pile of oft-requested features, but I've also seen it be completely unimportant. It just depends a lot on what you're making.
Comment by theshrike79 6 days ago
TBH the weird C# version Unity uses has been an issue multiple times =)
Comment by doctorpangloss 5 days ago
HN: "Ah you're sweet"
"I'm authoring a new Golang based game engine that doesn't have the featureset of things with $100 million to $3 billion of product development"
HN: "Hello, human resources?"
Comment by cxr 4 days ago
Comment by chrisweekly 6 days ago
Hard to interpret w/out more detailed comparison but stack-ranking their featurefulness, is it Unreal, Unity, Godot?
Comment by ChadNauseam 6 days ago
(Though imo unity is the better engine. Unreal has so many bugs and so much jank that to make a real game with it you basically need a large enough team that you can have a dedicated unreal-bug-fixer employee.)
*Technically Unity has a visual scripting language too but IIUC it's tacked on and I've never heard of anyone actually using it.
Comment by BobaFloutist 5 days ago
The collision was clearly working, just some n% of the time you'd end up on the wrong side of the clean flat rectangle you were walking into.
I lost interest pretty soon after that.
Comment by superrad 5 days ago
Game development is full of domain knowledge like this because games need to make compromises ensure completing simulation updates at no lower than 30Hz.
Comment by BobaFloutist 4 days ago
Comment by superrad 4 days ago
The tutorial probably should have instructed you create box colliders for walls (giving a greater area for the physics engine to catch collisions) rather than a simple plane/quad which would lead to the exact issues you had, or at least explained why a box works better than a plane.
I guess you have to balance the necessary information with overload in your tutorial or at least have an aside or additional reading that really helps understand many of these internalized understandings.
Comment by bob1029 5 days ago
For performance/practicality, it's Unity > Godot > Unreal. Building something in Unreal that simply runs with ultra low frame latency is possible, but the way the ecosystem is structured you will be permanently burdened by things like temporal anti-aliasing way before you find your bearings. Unreal and Unity are at odds on MSAA support (Unity has it, Unreal doesn't). MSAA can be king if you have an art team with game dev knowledge from 10+ years ago. Unreal is basically TAA or bust.
Comment by johnnyanmac 6 days ago
But, I will always correct the cardinal sin of "using FPS to measure performance". Especially for an empty scene, this is pretty much snake oil. 200 fps is 5 milliseconds 1800 fps is a little pver half a millisecond. Giving back 4.5 milliseconds doesn't means much if any sense of real work will add it back.
Comment by james2doyle 6 days ago
Comment by ahZOTERESET 6 days ago
Comment by groundzeros2015 6 days ago
When an engine becomes useful is when it has to make a game. All your abstractions tend to get rearranged and hard decisions are made.
Comment by craftkiller 6 days ago
It could just be different interests. The kind of person who makes a game engine is a technical optimization-focused tech-focused person, sort of like a mechanic. In order to make a game, you have to deal with softer concepts like "is this fun" which is more like a designer/artist. Game studios need to bring these people together, but in the FOSS world the mechanics are happy to spend their time building an engine that runs beautifully without concerning themselves with the art side of things.
Comment by CooCooCaCha 6 days ago
I just need a few more years working on my 4D non-euclidian voxel MMO engine before I can make my game!
Comment by jayd16 6 days ago
A tool with a vaguely defined goals and no stakeholders is easier to make than a tool that must meet certain goals as defined by stakeholders.
Comment by ChadNauseam 6 days ago
Comment by fwip 5 days ago
Comment by 6SixTy 6 days ago
Comment by orangeboats 6 days ago
Well... the project calls itself a game engine. It's really not out of the world to make the assumption.
Comment by groundzeros2015 6 days ago
Comment by corysama 6 days ago
Making a game engine is a fun and highly-engaging means to learning high-performance programming. Yes, it would be better if you also were able to invest enough to ship a game. But, don't let the infeasibility of that goal stop you from learning and having fun.
Comment by groundzeros2015 6 days ago
I agree there is fun and learning to be had, but just note they are very different activities.
Comment by Sleaker 6 days ago
Comment by serf 6 days ago
somewhat past optimizing the frame count of an entirely empty scene.
on that matter : is it a game engine if there isn't a game?
I totally agree with other comments though -- if there is no pressure to meet specific metrics or accomplish certain things with the product then there is no real pressure to improve past a window or framebuffer drawn to video, just declare it's a game engine that makes a million FPS and throw it on the portfolio.
game engine work gets tough (and rewarding) with 1) goals and 2) constraints -- without those two it's more or less just spherical-cow style work that is too ambiguous or vague for real application.
Comment by groundzeros2015 6 days ago
Comment by johnnyanmac 6 days ago
The skillset and ontent is also just different. You don't see games on github (publicly) because they are being made for sale. Very few engine projects are serious commercial projects. I think I'd be safe to say that a commercial engine is harder than making a commercial game. Especially since Unity and Unreal have mindshare and are free to start and learn with.
Comment by groundzeros2015 6 days ago
Comment by starkparker 6 days ago
I usually look for games on websites like Itch.io. You might want to try that if you're having trouble finding websites that have games on them.
Comment by dexwiz 6 days ago
Comment by samdoesnothing 6 days ago
Comment by filleduchaos 6 days ago
Comment by samdoesnothing 6 days ago
Comment by filleduchaos 5 days ago
Comment by samdoesnothing 5 days ago
OP is trying to make it seem like some sort of failing, where people aren't cut out for game dev or something so they just make game engines instead. But I can guarantee that anyone who can create a game engine can also create a game. They just choose to do something they enjoy more.
Comment by pants2 6 days ago
https://unity.com/ leads with demos.
https://kaijuengine.org/ leads with a block of text claiming it renders cubes faster than Unity.
Comment by efskap 6 days ago
Comment by CJefferson 6 days ago
Comment by filleduchaos 6 days ago
You can push triangles and run shaders in pretty much every UI framework on earth and yet for some strange inexplicable reason people tend to want to see what the framework can actually do.
Comment by p2detar 6 days ago
> The engine is not released and is under heavy development.
Comment by chrisjj 6 days ago
Development includes testing. A game engine's test is games. Lack of games speaks volumes.
Comment by kunos 6 days ago
I wish Go didn't have this performance bottleneck because I really like the language and it would be a great middle ground for indie like games that don't want to follow the big engines route but sadly any kind of request of a faster path to call cgo was ignored by the Go team as games is not really something they are interested in.
Still best of luck to the guy but eventually he'll hit a wall and all the claims about performance will look funny.
Comment by nish__ 5 days ago
Comment by artur44 6 days ago
What is interesting, though, is that engines like this often reveal how much overhead comes from tooling, scene graph complexity, editor integrations, GC pressure, etc. Sometimes a very lean engine feels “faster” simply because it avoids all the layers that a mature engine needs to support large teams.
I’d love to see a demo that stresses real systems — entity updates, materials, batching, physics, etc. That would say far more about the architecture than raw FPS of drawing nothing.
Comment by drnick1 6 days ago
Comment by maccard 6 days ago
Comment by drnick1 6 days ago
Comment by jerf 5 days ago
This objection really needs to die. GC does not instantly mean you can't program games. At most it locks you out of the tip-of-the-tippy-top AAAA games, but if you were trying for that you weren't going to use "someone's GitHub project" anyhow. And most of them probably have meaningful GC in them anyhow.
Comment by maccard 5 days ago
Comment by maccard 5 days ago
The rendering code also isn’t “just” not garbage collected - it eschews all the normal c++ and is written in a totally different way. It might as well be in a different langauge honestly
Comment by efskap 6 days ago
Comment by mvdtnz 6 days ago
> The current version of the base engine renders extremely fast, faster than most would think a garbage collected language could go. In my testing a release mode build of a game in Unity with nothing but a black background and a cube runs at about 1,600 FPS.
But straight-up FPS is generally not the main concern with GC in a game engine, it's GC pausing which can make an otherwise smooth game feel almost unplayable. I don't know anything about Go so maybe this is less of a concern in that language?
Comment by bob1029 5 days ago
Comment by wredcoll 6 days ago
Comment by jedbrooke 6 days ago
This is also not mentioning that the by far more popular version of the game (by player count) “Minecraft Bedrock edition” is written in C++ precisely for performance reasons on low end mobile hardware
Comment by cxr 5 days ago
Comment by nullbyte808 6 days ago
Comment by bobajeff 6 days ago
Are there a lot of Unity/Godot devs unaware that their engines are using GC? I would assume they'd have accepted the cost of GC already.
Unreal devs I can understand having an issue with it though.
Comment by tapoxi 6 days ago
Other languages that bind into the engine do this too, (C++, SwiftGodot, Rust-Godot)
C# obviously does, Miguel de Icaza actually started SwiftGodot because he (ironically) ended up hating GC pauses after promoting C# for so long
Comment by tracker1 6 days ago
I was added late to a project working on a training simulation engine, similar to games, where each avatar in the game was a separate thread... man, the GC pauses on the server would sometimes freeze for literally 10-15s, and it was not good at all. I refactored it to use an event-loop model and only 2 other threads, which ran much better overall. Even though it wasn't strictly a game itself, the techniques still matter. Funny how running through a list of a few hundred things is significantly better than a few hundred threads each with their own timers, etc.
Comment by Rohansi 6 days ago
It has improved but the majority of games using C# are using Unity which does not use .NET (Core). It uses Mono or IL2CPP specifically with the Boehm GC so it performs significantly worse than .NET and even standalone Mono (SGen GC).
Comment by neonsunset 6 days ago
Comment by nottorp 6 days ago
State machines are not in fashion. Exposed event loops are not in fashion. Most frameworks do their damnedest to hide those components.
As for GC freezes, if you're doing a game like project you can always just allocate a few huge arrays at startup and reuse those with no deallocation/allocation in most garbage collected environments.
Comment by pjmlp 6 days ago
Comment by furyofantares 6 days ago
Comment by munificent 6 days ago
Of course, you might say, "Well, sure, but your reference counting implementation doesn't need to eagerly deallocate on dereference." That's true! You can write a ref counter that defers some of those deallocations or amortizes them across multiple operations.
And when you do that, now you really do have a garbage collector.
See: https://web.eecs.umich.edu/~weimerw/2008-415/reading/bacon-g...
Comment by pjmlp 6 days ago
Comment by tracker1 6 days ago
Comment by furyofantares 6 days ago
Comment by starkparker 6 days ago
most specifically, an ongoing attempt to understand and debunk frame generation (DLSS, etc.) as a performance gain due to introducing latency despite high FPS: https://www.youtube.com/watch?v=Nh1FHR9fkJk, https://www.youtube.com/watch?v=GDvfIbRIb3U
More broadly than frame pacing, https://www.youtube.com/watch?v=Fj-wZ_KGcsg is a recent example of one of _many_ interviews going back years on why both frame times and frame rates are all flawed for explaining why some games feel smoother/lag more than others (there are GN videos dating back to 2016 on the subject)
Comment by johnnyanmac 6 days ago
You need to be very disciplined to pull this off, though. LINQ is basically off limits, for example. And of course, Godot's C# is likely much older than these modern techniques to begin with.
Comment by tapoxi 6 days ago
Comment by Rohansi 6 days ago
Comment by johnnyanmac 6 days ago
But that effort on an active engine would quite a long time to comb through. Really comes down to if a highly invested contributor wants to push it through and gets the go ahead.
Comment by pjmlp 6 days ago
The times of pure manual memory management game engines, across all layers of what requires to draw a frame are long gone.
Naturally someone is going to point out some game engine using compiled C dynamic libraries for scripting, those are the exception.
Comment by johnnyanmac 6 days ago
That's what makes me curious about Rust engines like Bevy. Could is truly pull it off and bring back that kind of thought to game development? It's not "pure manual memory management", but the mindset of Rust requires that kind of thinking.
It will definitely be niche for times to come, since most (non-AAA) games simply aren't going to worry about performance. But it might carve a solid community for those concerned with optimization.
Comment by pjmlp 6 days ago
That is why games like Minecraft, Roblox, Celeste, Balantro make it big. None of them would have happened if the creators followed the advice 100% C coding (or C++ for that matter) was the only way, and yet their design is what made them shine.
Comment by johnnyanmac 6 days ago
Celeste isn't a game that would need to worry about performance in 2018. It's 2d sprites with box collisions and relatively minimal particle effects. Your toaster can run Celeste.
But a game like Factorio with heavy simulations and complex interactions and pathing absolutely needs to consider performance to pull off a seemless experience.
Those are the kinds of games I'd hope engines like Bevy could enable farther down the line. Design is still key, but some game types are a larger technical challenge than others.
Comment by jayd16 6 days ago
If you spend a week in these engines you're well aware of the garbage collector.
Comment by unclad5968 6 days ago
Comment by chekibreki 6 days ago
Comment by giancarlostoro 6 days ago
Funnily enough whilst trying to Google gdscript and godot, I found this post I wrote in 2018 (subcomments mention gdscript and gc).
Comment by jadsfwasdfsd 6 days ago
Maybe TinyGo can save their ass here?
Comment by liampulles 6 days ago
Historically Go was viewed as not the best choice for game Dev because it's GC process was known to cause periodic blips of load, but I wonder now how smooth it is now. I believe one can also plug in arena managed memory and alternatives of that I'll.
Comment by guywithahat 6 days ago
Comment by iamcreasy 6 days ago
If the author reading: I am curious to see an worked out example where writing the assembly code was necessary.
Comment by charcircuit 6 days ago
On Windows this only has a resolution of ~0.5ms (down from ~15.6ms when this frame limiting code was written). It also is not synchronized to when frames need to be submitted which means that depending on when the timer is created it can result in the game having stutter.
Comment by AmbroseBierce 6 days ago
Comment by etse 6 days ago
Comment by MindSpunk 6 days ago
MoltenVK has some extra interfaces you need to integrate with too, it's not a completely hands off setup.
Comment by system2 6 days ago
Comment by 999900000999 6 days ago
With such an outrageous and unfounded statement, I'm just going to assume the project isn't worth taking seriously.
Make a real game first, and then we'll talk.
Comment by chrisjj 6 days ago
Comment by Aeolun 6 days ago
Comment by jdc0589 6 days ago
10/10
Comment by slingexe 6 days ago
Comment by nsxwolf 6 days ago
Comment by JokerDan 6 days ago
https://www.youtube.com/watch?v=hWVKeKpNQto
The channel has a few videos on it, not watched any other than this introductory one but some of the titles look interesting.
Also the introduction video above states an initial requirement of 'every PR must have a video' but it looks like that got dropped a while ago.
Comment by TheDong 6 days ago
Comment by kgwxd 6 days ago
Comment by nsxwolf 6 days ago
Comment by numlock86 6 days ago
drumroll
Because people have been using a lot of emojis before LLMs in text already, and LLMs have been trained on those texts.
This whole "You have emojis in your text, it's LLM!"-trope got boring really fast. Amazing to see (and to think of the implications of) so many people apparently being in emoji-free social bubbles before this, though.
Comment by nsxwolf 5 days ago
Comment by tptacek 6 days ago