4 ms·
> I know I'm in a weird minority (most of the people who think like I do seem to be game engine developers). As an amateur game engine developer, I'm probably
by Razengan 7y ago
> I know I'm in a weird minority (most of the people who think like I do seem to be game engine developers).
As an amateur game engine developer, I'm probably in a weird minority for abhorring C/C++/C#/Canything. :)
I love Swift, and Rust or Dart would be my next choices if Swift wasn't available.
With first-class support for native APIs which do most of the work anyway, performance has not been a concern for me on Swift. I see only benefits, like making it hard for some types of bugs to creep in and code that is pleasant to read and a joy to write (though you can write beautiful/ugly code in any language, of course.)
- bulldoa 7y agoNot well verse in the subject, do people develop game engine in garbage collected languages? Intuitively I would think game engine requires absolute performance
- gameswithgo 7y agoSometimes. And sometimes the core engine may be in C++ but the game logic is in C# (Unity). There are plenty of games whose performance demands are not so high, that a GC language can work fine. There are also many examples of realtime 3d games, that used garbage collection, and were extremely successful (minecraft, subnautica). These were high quality games, though both do suffer from performance downsides, related at least indirectly to using GC languages.
- mratsim 7y agoThere is a growing community of game developers using Nim. But Nim doesn't have a single GC, it has multiple and the default one can be compiled with real-time latency constraints so that you can use to make sure that you don't stop the world for less than 1/200 of a second for example. Plus the GC is per type, you can mix raw pointers for manually managed memory and references for GC-managed objects. The GC can only be triggerred in code paths with references.
- Razengan 7y agoFor things like the latest Doom or pushing 3D hardware to its limits, I'd think no. I can't say how far you could get in pure Swift for 3D engines, but for 2D games Swift is more than good enough, and you can always interop with C/C++ when you really need to.
- nwallin 7y agoGame engines absolutely not. They're almost all written in C++ with exceptions and RTTI disabled and no STL. Gamdev C++ can better be thought of as C+. It's kinda sorta not the same language. However, a lot of game engines use GC languages to operate game logic. Lots of them use Lua, unity uses c#. The ubiquity of Lua in gamedev has resulted in luajit being shockingly good if you're pushing around a bunch of floats.