Home
Blog

Regarding Unity

Introduction

Today, Unity has reverted their runtime fee, and replaced it with a general price increase for Unity Pro and Enterprise. The runtime fee was first introduced exactly one year ago.

So I figured I would discuss the differences, experiences and opinions I've encountered since I started working with Godot much more about 1 year ago.

Scene Structure

In Unity, you have GameObjects and components. Components are used to define behavior and state in the game for an individual GameObject. In Godot, you have Nodes and... Nodes. With a Node, it defines behavior and state of everything the individual Node does. This is one of the reasons Godot can be difficult or a turn-off for people who have worked with Unity or Unreal and not so much with Object-Oriented Programming. The solution this isn't super obvious. Godot allows for any Node to have arbitrary metadata assigned to it, which can be used to store references to other Nodes, which can be considered like components. The main problem with this is all the components show in the scene hierarchy and not in the object inspector.

Scripts

Unity uses C# to script games. Godot can use C#, but mainly uses GDScript, a python-like language made specifically for the engine. I must say, while I like a lot of what C# has to offer in terms of the standard library and syntax (I like C style syntax), GDScript is really nice to use, especially when starting out with the engine. Being able to just reference parts of the scene without calling multiple functions is really nice. There is also a fully functional IDE builtin to the editor, no extra tools required! The main reason I don't primarily use GDScript is the standard library. It's limited to whatever the engine supports (which is still about everything you would want to use in a real-time application or game). Maybe I just like C# too much...

As for Godot's C# support, it feel 90% finished with regards to functionality and support. I am judging this based off my interactions with the engine and editor on Windows and Linux, as that is all Godot 4.x supports fully (I don't have a Mac, but C# is also supported on MacOS). The main problem I have with the Godot 4.x C# support is interactions with non-engine code. If you have addons or Native code that is written in GDScript or C++, you must write glue code to call the functions from C#, which I would assume has a performance impact. DllImport does work fine, but your .dll must manually be copied to the export directory, and this is isn't meant to be used with Godot-specific native code.

Platforms

Unity has the upper hand here. It supports Windows/Linux/Mac, Android/iOS, WebGL, and all major consoles with little friction. (From what I recall, Unity Pro is required for consoles). Supported graphics APIs include OpenGL 3, OpenGL 4, Vulkan, DirectX 11, DirectX 12 and Metal. This covers pretty much every desktop GPU people currently use, and every mobile GPU still used.

Godot 4.x without C# supports Windows/Linux/Mac and Android/iOS. While WebGL exists, it uses the lesser-supported Compatibility rendering pipeline, which does not support a ton of 3D graphics features. Supported graphics APIs are currently (Godot 4.3) Vulkan and DirectX 12 (Metal without MoltenVK is being worked on still), with OpenGL 3 as a fallback if needed, and a second fallback of OpenGL 3 translated to DirectX 11.

So, if you are trying to make a 3D game for modern PC or mobile devices, in terms of platforms Godot can provide. If you are making a 2D game, Godot is perfect.

Support

Godot is Free and Open Source Software (FOSS), just like the Linux kernel. As such, no commercial support is guaranteed. Unity and Unreal both have commercial support for if/when you run into issues. The upside with Unreal is that it's source code is on GitHub and you can legally modify it to your needs. Unity doesn't provide source without a big check coming their way. Just because there isn't commercial support doesn't mean others can't provide support. There is companies like W4Games, which will do some of the work for you if you pay them, similar in-theory to how Red Hat sells Red Hat Enterprise Linux. You don't need to pay them to use Linux, but if you do you gain support and software that you didn't have before.

Performance

Godot 4.x provides a ton of useful optimizations to make 3D rendering run smoothly. From my testing, Godot tends to run a bit smoother compared to Unity. Why this is exactly varies, but my two major theories are modern rendering pipelines/techniques and with regards to C# performance, the use of .NET core over a custom fork of Mono. While Mono does provide a lot of comfort for engine developers, it seems to have issues with garbage collection, often causing a lot of performance overhead compared to the garbage collector in .NET core. With that said, I've yet to properly test the actual performance differences with regards to 3D rendering and scripting.

Conclusion

I think Unity's decision to fully revert the runtime fee is a welcome change for me. I still will mostly use Godot for my projects, but Unity is back in consideration for any project of mine. Again, this whole post is based off my experiences with Unity and Godot, and merely my opinions.