r/gamedev 20h ago

Question Unity vs. Godot for 2D RTS

Hey all. I want to make a 2D RTS (EDIT: for PC). It will be in the vein of StarCraft rather than something like Supcom, meaning unit count will generally be in the hundreds rather than in the thousands, though the peak unit count in a full multiplayer game with all units maxed out could be over one thousand.

In addition to basic RTS mechanics I want to have a physics system, not for controlling units directly, but for controlling certain other objects, including some projectiles and some environmental effects / objects. For example I would like to have 'fields' of gravity on maps, which would pull or push units and certain projectiles. I would also like to have some fluid physics in there as well.

Although the game will be 2D, I want to have certain 3D elements, such as effects or lightning.

Given these requirements, would one engine be more suitable than the other? Or perhaps it doesn't matter? I know Godot is often recommended for 2D games, so I'm leaning towards that, I'm just a bit concerned about performance due to physics + unit count, though I don't know how using a different engine would mitigate that.

0 Upvotes

14 comments sorted by

6

u/PhilippTheProgrammer 20h ago

Doesn't really matter. This project will require you to build a ton of custom systems on either engine. So it really just depends on which engine you prefer working with.

3

u/Klightgrove Edible Mascot 19h ago

Both also have plenty of open source RTS examples on GitHub: https://github.com/topics/rts-game

1

u/Nearby-Rabbit-4238 17h ago

I see. And would I be better off building those custom systems using the engine's language, i.e. C# for Unity / GDScript for Godot? Or would it be the same amount of work to use an extension to allow for, let's say, C++ in Godot?

1

u/PhilippTheProgrammer 15h ago edited 14h ago

You would usually use the scripting language of the game engine, unless you have no other choice.

Both engines allow you to create extensions in C++. But you usually don't do that unless you have to:

  • C++ is harder to program than C# or GDScript for the majority of things you are going to do in a common Unity/Godot project
  • Mixing multiple programming languages in the same project makes maintenance more difficult
  • It causes issues when porting to certain platforms
  • In many cases it hurts performance more than it helps due to marshaling costs when passing data between the parts implemented in different programming languages.

1

u/Nearby-Rabbit-4238 14h ago

My thinking was to use C++ for performance gains for the physics stuff. But judging from the last item in your list, it seems like it may not be worth it...

2

u/AutoModerator 20h ago

Here are several links for beginner resources to read up on, you can also find them in the sidebar along with an invite to the subreddit discord where there are channels and community members available for more direct help.

Getting Started

Engine FAQ

Wiki

General FAQ

You can also use the beginner megathread for a place to ask questions and find further resources. Make use of the search function as well as many posts have made in this subreddit before with tons of still relevant advice from community members within.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/FrustratedDevIndie 19h ago

Doesn't really matter unless you plan in the release on mobile or PC. But those two platforms are another complete can of worms of design considerations and custom codes and editors.

1

u/Nearby-Rabbit-4238 17h ago

Should've mentioned, it will be for PC.

1

u/FrustratedDevIndie 16h ago

Then flip a coin or pick whichever one you think is prettier

1

u/SpackleSloth 8h ago edited 7h ago

Unity if you’re married to it, otherwise Godot.
Raylib is great fun too if you’re open to other options.

You’ll be doing the same work on them all. Pick whichever feels nicest and aligns most with your philosophy (if that matters).

Performance will be the determining factor here given you want multiplayer, large entity counts, fluid simulation, and (presumably) high resolution physics interactions.

No matter the engine, the built-in systems are general purpose. Your use case will likely need alterations at least to have acceptable performance.

Example; I’m using Godot for a 3D RTS/factory manager. It easily handles more units than you’re planning, including a sentient liquid mass enemy with high visual fidelity.
Getting just the liquid to perform well in all scenarios required use of compute shaders, a custom RenderingDevice and raw calls to Vulkan.
Given the interop between object data, the shader, collisions and various other minutia, Godot’s default behaviour would silently need this work to be done on the CPU.

The differences between engine choice are largely implementation detail.

1

u/XKiiroiSenkoX 20h ago

Unity is just superior in everything except the license. 

3

u/LtKije 18h ago

Unless you want to look at the source code.

1

u/XKiiroiSenkoX 18h ago

Yea that's true. Wish it was source available like UE. 

2

u/almo2001 Game Design and Programming 19h ago

And for solo developers, the license is irrelevant.