Godot vs. Unity in 2D: Who will win?

Поділитися
Вставка
  • Опубліковано 19 лип 2024
  • In this video we take a quick dive into 2D performance and push Godot 3.3.2 to its breaking point. We benchmark GodotPhysics 2D versus the Box2D Physics Engine used by Unity for 2D Physics. We also take a look at some gotchas/issues that were found in the Godot 2D Physics engine.
    Contents:
    ---------------
    0:00 - 0:15 Intro
    0:16 - 0:46 Quick 3D Recap
    0:47 - 2:08 Is 2D important?
    2:09 - 3:24 Godot Nodes
    3:25 - 4:08 Issues in Godot
    4:09 - 6:23 Godot Performance
    6:24 - 7:51 Godot Summary
    7:52 - 8:56 Unity Performance
    8:57 - 9:33 Performance Comparison
    9:34 - 10:24 Final Thoughts
    #godot #unity #2d
    Music from Tunetank.com
    RocknStock - Power (Copyright Free Music)
    Download free: tunetank.com/t/28fn/1458-power
    Icons made by Freepik from www.flaticon.com/

КОМЕНТАРІ • 353

  • @DejaimeNeto
    @DejaimeNeto 2 роки тому +164

    On a separate note, BulletHell games like the ones shown in the video don't usually use full Rigid Body Physics. They are limited to _Layered One-Way Non-Continuous Collision Detection_ with simple _Convex Collision Shapes_ . Phew! That was hard to type. But what I mean is that usually interactions between the thousands of similar objects are not relevant for this type of game. The number of physics interactions in a single frame is very low, and the cost of complex physics is also eliminated. What we do have are the potential thousands of bullets, some static level geometry and more dynamic actors such as items/props and NPCs/players. The bullets collide with everything that's not a bullet, and those tend to be just a few, very rarely reaching the hundred count.

    • @xXYannuschXx
      @xXYannuschXx 2 роки тому +7

      Mh, would be interested to see a "bullet hell benchmark" in both engines now :D

  • @likeich
    @likeich 2 роки тому +325

    Everyone is talking about how you should test 4.0 after it's out. Instead, you should test 3.4 soon because it has 2d performance improvements. I ran a very similar test to yours and got 1303 balls before dropping below 60 FPS in 3.3.3.. The same test in 3.4 beta 4 got 3133 balls before dropping below 60.

    • @___________482
      @___________482 2 роки тому +16

      Damn, I gotta update to 3.4

    • @AlfredBaudischCreations
      @AlfredBaudischCreations 2 роки тому +4

      That's a massive improvement.

    • @wimeradus
      @wimeradus 2 роки тому

      Lol. I can easily get a million balls in Unreal

    • @forkerion
      @forkerion 2 роки тому +5

      @@wimeradus We are talking bout' 2D

    • @wimeradus
      @wimeradus 2 роки тому

      @@forkerion Unreal can do it all

  • @hudsonator7259
    @hudsonator7259 Рік тому +43

    Being a Godot person and have experienced Unity in the past, I can say that Godot is more beginner friendly, as the nodes make much more sense paired with the simple GDScript language. Also, Unity takes too many resources. I had to uninstall most of my programs before I could laggily run Unity, meanwhile Godot I could immediately install with no downsides, and actually runs smooth. Edit: It's also on Steam. (Big plus)

    • @Random006
      @Random006 10 місяців тому +3

      Yes, my potato laptop could barely run unity 2018, but it runs godot 4.1 compatibility mode great. Usually

    • @vexyrz
      @vexyrz 9 місяців тому

      @@Random006what is ur laptop requirements

    • @Random006
      @Random006 9 місяців тому +1

      @@vexyrz I had a Intel core i3, 1.7 ghz GPU or something, 4 GB of ram, 600 GB of memory. Its not really great.

  • @DeusAlgor
    @DeusAlgor 3 роки тому +324

    I actually a bit shocked with result knowing how in 3D Unity easily outperforms Godot.

    • @robertonome2448
      @robertonome2448 2 роки тому +102

      that's not much of a surprise tho. godot's 3d current api is pretty outdated
      4.0 is gonna change quite a lot about that tho
      however, for 2d, it's a nobrainer nowadays. Not only performance wise, but in overall terms of practicality, functionality and workflow

    • @fabrice1533
      @fabrice1533 2 роки тому +21

      Probably because the problem in 3D was not only due to the Physic Engine, but I suspect for a good part, the Renderer, especially because there is no Occlusion culling (big difference). It will be interesting to run the same test in 3D without rendering the scene to see the difference.

    • @DeusAlgor
      @DeusAlgor 2 роки тому +10

      @@fabrice1533 Occlusion culling is coming to 4.0, if remember correctly. We need to just wait and test it there.

    • @clearcontentment3695
      @clearcontentment3695 2 роки тому +3

      The selling point on godot was never it’s physics engine. But the under the hoood capability

    • @ShiloBuff
      @ShiloBuff 2 роки тому +6

      I wasn't that shocked. I know Box2D is very mature and so is Unity. But Unity doesn't have a dedicated 2D engine. Disappointed that Unity beat Godot in one of the tests.

  • @theplaymakerno1
    @theplaymakerno1 2 роки тому +242

    For all indie devs that are watching this, please do not let this stop you from using Godot for 3D. You probably would never need that many objects anyway in your 3D game as an indie dev. Godot is alright for 3D as well. Please just know the limitations of the tool that you are using and you will be fine.
    Godot is objectively easier to work with than Unity. Unity on the other hand has more features out of the box, but lacks features that are required for freelance work. Godot suffers from the same issue.
    Also Godot developer, take a look at Silent Wolf which is extremely useful for creating Godot games with a backend. Useful for freelancing.

    • @abhishek-farswan
      @abhishek-farswan 2 роки тому +9

      truth... maybe soon they will enhance their 3D physics as well

    • @intergalacticGM
      @intergalacticGM 2 роки тому +5

      I use Godot for 3D, although I do need to render hundreds of thousands objects simultaneously, but luckily without physics. I use multimesh mixed with particles, so far it worked fast enough.

    • @theplaymakerno1
      @theplaymakerno1 2 роки тому +13

      @Tonypec1974 For a AAA dev, yes. For indie devs, 3D in Godot is fine.

    • @intergalacticGM
      @intergalacticGM 2 роки тому +7

      @Tonypec1974 I see, but I know godot. So I use godot, and it works fine.

    • @intergalacticGM
      @intergalacticGM 2 роки тому +3

      @Tonypec1974 awesome! I don't have much time, so I work with what I know.

  • @Yar3920
    @Yar3920 3 роки тому +21

    TOTALLY UNEXPECTED RESULTS!! Awesome video, thanks!

  • @HiHi-iu8gf
    @HiHi-iu8gf Рік тому +8

    would be interested in seeing how 3d and 2d physics stacks up now, considering Godot just recently released 4.0, and DOTS just recently released fully released :)

  • @Crisisdarkness
    @Crisisdarkness 2 роки тому +39

    Wow this has been one of the most interesting analysis I have seen, I'm glad to see that on the 2D side, Godot is quite good, I wish that when the Godot 4 version appears, you can compare the 3D approach again

  • @DashieDasher
    @DashieDasher Рік тому +7

    Glad to see that the most common advice you see about Godot vs Unity (use Godot for 2D, Unity for 3D) holds up. I hear Godot 4 intends to be a big improvement all around as well. Really looking forward to see how Godot develops

  • @ItsSageCertified
    @ItsSageCertified 2 роки тому +8

    Im like 80% sure the reason unitys boxes were so squishy is because the collision type was set to dynamic instead of continuous. Fixing that would give way different results

  • @Rin-qj7zt
    @Rin-qj7zt 2 роки тому +45

    They fall different. The unity version is accelerating with gravity. Godot isn't. That means the formula being used to describe their motion is different. Perhaps In a way that favors godot in this example. I think it's worth investigating.

    • @fartfish1880
      @fartfish1880 2 роки тому +4

      idk, i'm pretty sure they are. It looks like the space between ones at the bottom and top increase as they fall, until collision

    • @downey2294
      @downey2294 Рік тому +6

      also looks like these tests were performed on linux.
      wouldn't surprise me if unity had poor Linux support.

    • @maxmustermann3938
      @maxmustermann3938 Рік тому +2

      Godot's unit in 2D is pixels. I think this is not true for Unity. So he likely messed up converting the units to use the same gravity in both of them. He probably set gravity to 9.81 or something as per the usual, which in Godot would be 9.81 pixels/s^2, while in unity it is 9.81 units/s^2, where one unit spans many pixels.

  • @FinaISpartan
    @FinaISpartan 3 роки тому +3

    I love the benchmarking content. Good stuff!

  • @ZEN467
    @ZEN467 3 роки тому +18

    nice video and also do not forget to compere with godot 4 and unity

  • @DerClaudius
    @DerClaudius 2 роки тому +14

    Thanks for doing this. Great work.
    I don't think bullet hell games really suffer from the 50Hz bug though as even with massive amount of bullets, you don't get that much overlap and the bullets don't try to push each other away

  • @MarcV_IndieGameDev
    @MarcV_IndieGameDev 3 роки тому +35

    interesting, thought Unity would tear it on the 2D xD

    • @leukk_
      @leukk_ 2 роки тому +7

      Was indeed suprising, this video didnt contain a DOTS sample unlike the 3D one tho, wouldn't that change things ?

  • @whiterose7055
    @whiterose7055 2 роки тому +13

    I use Unreal Engine, so I have no horse in this particular race but I do ask myself "Is there really a winner and loser to this?". Just choose the tool that fits the job, there's plenty of room for many solutions.

  • @jonathansaindon788
    @jonathansaindon788 Рік тому +2

    People focusing only on performance to compare engines are people who never finished any game. The workflow between each engines is very different and this is mostly what pulls people towards an engine or the other. As a Unity dev for years, i’m starting to lean towards Godot for the speed of of iteration. In Godot it’s so much faster to change code and test the game.

  • @Nanox19435
    @Nanox19435 2 роки тому +2

    Thanks for the great video! This was the best comparison between the two engines that I've seen.
    You could expand it by testing both engines physics separating them from their rendering. I think that it is possible that GodotPhysics is bottlenecked by the rendering of the engine.

  • @learning6356
    @learning6356 2 роки тому +34

    Great work, thank you! Would be nice to see a similar comparation between Godot and Gamemaker. I'm curious about that because, even Godot being a great engine and the developers don't have to pay to use, looks to me that developers prefer to use Gamemaker to producer commercial games (considering the quantity of successfully 2D games the engine has in comparation with Godot). Could this decision be related to performance?

    • @DeusAlgor
      @DeusAlgor 2 роки тому +10

      Nope. Gamemaker just was better advertised so more people knew that it is better option for 2D games compared to Unity. And most people don't like to learn new things after dedicating entire career to one tool. Hence why jQuery is still alive somehow.

    • @robertonome2448
      @robertonome2448 2 роки тому +4

      Gamemaker performs terrible vs. pretty much any other engine, except for maybe Construct
      It’s just older and more famous… and supposedly more “beginner friendly”, what nowadays isn’t even true anymore

  • @theoneechanman
    @theoneechanman Рік тому +3

    Enter the Gungeon is technically 3D from what I recall

  • @user-yo6xb6ud6d
    @user-yo6xb6ud6d Рік тому

    Love the video! One suggestion if I may! Look towards the camera hah!

  • @pekuja
    @pekuja Рік тому +4

    That's pretty interesting. Given the 3D results, I expected the 2D results to be similar, with Unity clearly outperforming Godot, especially since Unity can handle a lot more 3D objects than it wound up being able to do in 2D.

    • @madjunir
      @madjunir 8 місяців тому +1

      Not really. Godot 4 is way better now. Specially Jolt physics

  • @odo432
    @odo432 11 місяців тому +2

    There's an Asset for Godot which replaced the Godot physics engine with Box2D. I personally haven't tried it but I'd be curious to see a comparison a new comparison.

    • @charlesabju907
      @charlesabju907 4 місяці тому

      Also Rapier2D, which is supposed technically (although not really) than Godot's Physics engine

  • @goldkat94
    @goldkat94 Рік тому

    A comparison of the pathfinding in 2D and 3D with godot and unity/dots would be nice!

  • @MohamedSeada215
    @MohamedSeada215 2 роки тому +1

    I am not a game developer, and didn't try using unity or godot ... in the end of the video with 4 tests on the same screen, I notice that unity droping object has some sort of acceleration while godot droping in fixed speed, could that affect the results?

  • @tictactoc9311
    @tictactoc9311 2 роки тому +1

    Great video!

  • @MajatekYT
    @MajatekYT 2 роки тому +2

    Honestly surprised at how much better Godot is at high-frequency physics calculation despite how "new on the block" it is. Looking forward to its 4.0 release!

  • @Baekstrom
    @Baekstrom 2 роки тому +3

    If I was to make a bullet hell game, I don't think I would worry too much about 2D physics performance when choosing a game engine, because my appetite for more physics objects would run out long before the engine stops being able to keep up. The game would have to look something like your little benchmark test before it makes a difference, and you almost filled the entire screen with objects. Also, the bullet hell games you showed only used the collision detection part of the engine. You don't need to run an expensive rigid body simulation hundreds of times per second to do collision detection well.

  • @LedoCool1
    @LedoCool1 2 роки тому +1

    Godot allows usage of multiple physics engines. I just read they're working on box2d support and they also have choice "godotphysics" vs "bullet" in 3d already. So things might change in future.

  • @MeshVoid
    @MeshVoid 3 роки тому +19

    Just a question how using GDNative will affect the performance? Will it stay the same? Shouldn't it be used in these scenarios when you have so many rigidbodies in the scene instead of GDScript or am I wrong?

    • @DeusAlgor
      @DeusAlgor 3 роки тому +10

      Well, he is using built in physics and GDScript only to "spawn" rigid bodies. In case if anyone will try to code own physics for KinematicBody/KinematicBody2D then using GDNative or Mono over GDScript will give you huge performance boost if done right. May be even better then built in one, if you are really skilled or compromise some accuracy in a sake of more performance.

    • @MeanGeneHacks
      @MeanGeneHacks  3 роки тому +22

      I don't see how GDNative will help much if you are using the built-in physics engines, as I'm only using GDScript to spawn the physics object (in a physics server). I did try re-writing the spawning code in C#, but saw no performance improvement so I didn't include it in the video.
      One area where GDNative could help is through the integration of a different/faster physics engine.

    • @MeshVoid
      @MeshVoid 3 роки тому +7

      @@MeanGeneHacks Thank you for your reply, good to know!

  • @matthewg.garcia9415
    @matthewg.garcia9415 2 роки тому +1

    Cool test! Might try Godot, still learning Unity, but def want to specialize in 2D.

    • @caresvlbdjz
      @caresvlbdjz 2 роки тому +1

      im working in a 3D game in Godot. as good as unity in my opinion

  • @kleberleite3401
    @kleberleite3401 2 роки тому +3

    Desculpa a pergunta, mas usar ECS na Unity não deve dar um boost de FPS? ,_, não entendo bem de ECS, mas sei q isso aí faz milagres na Unity em termo de desempenho '-'

  • @elwnbkan6954
    @elwnbkan6954 2 роки тому +11

    the godot project is a solid package (editor+game engine) and you can use/mod/etc... :) ... i dont know unity, because i was triying to use it but i use linux, and the "editor" is slower, the coding is in other editor, much unnecessary config... the unity can be better in one or much more areas that godot, but godot download open and OK its ready to go... extremely easy to use, and the logic scene in scene is simply and amazing, in conclusion (for my) godot as tools is much better than unity, but (for now) unity is more powerful game engine than godot

    • @isaacdiaz4174
      @isaacdiaz4174 Рік тому +1

      Word! Setting up Unity in linux is painfully slow, even in ubuntu.

  • @ted_van_loon
    @ted_van_loon 2 роки тому +4

    it is strange that unity can handle more objects in 3d than 2d.
    in godot I also noticed that it first mostly stays the same then slowly goes down and then suddenly starts to drop in a quadrant shape, so this might also be some bug or it might be a nice space where the physics engine can be optimized.

    • @syriuszb8611
      @syriuszb8611 2 роки тому

      * cough cough * optimization and DOTS * cough cough *

  • @nicholastheninth
    @nicholastheninth 2 місяці тому

    This is why I made my own physics engine, and it beats both of those by a mile (pile of 10K circles on a single thread @ 60 Hz with ~45 FPS), and I am still using a brute-force broadphase, albeit very well optimized. I also partition the world into 256m squares so float precision won’t be a problem at huge distances, which is nice having.

  • @KnedlikMCPE
    @KnedlikMCPE 2 роки тому +4

    I must say, considering the simplicity of Godot, it’s worth it.

  • @simmzzzz
    @simmzzzz 2 роки тому +2

    dropping the boxes with different gravity can have an effect since boxes that "settle" will take up less processing

    • @MeanGeneHacks
      @MeanGeneHacks  2 роки тому +3

      Agreed; however, the mass and gravity settings were the same in the two engines. Godot's physics just behaves differently at those settings.

  • @fernandobrandt7230
    @fernandobrandt7230 2 роки тому +10

    You know, Component Based Systems have far more performance than OOP, since it handles cache and memory the right way. If I remember, Godot has even a different node for rendering multiple meshes in a better performance, which should be the default way to do it. Well Godot still misses some functionalities.

    • @nullvoid3545
      @nullvoid3545 2 роки тому +2

      I think he used multimeshes. If that's what you meant.

    • @fernandobrandt7230
      @fernandobrandt7230 2 роки тому +2

      @@nullvoid3545 That's just a curiosity actually. I think that the normal Mesh node should be the same performance as the MultipleMesh node.

  • @sbypasser819
    @sbypasser819 2 роки тому +1

    WHY THE FRAME DROPS SO SUDDEN? 5:45 I dont understand why its not gradually decreasing like the first test. Please somebody answer would be very appreciated!

  • @shamzfk
    @shamzfk 2 роки тому

    @1:15 there is a game shown @the kingdoms of avalae" there is 0 info on it, google gives nothing, is there a link?

  • @Maetschll
    @Maetschll 2 роки тому

    Awesome investigation

  • @sebastianwardana1527
    @sebastianwardana1527 2 роки тому +2

    this is still a fixed amount of physics objects, what if we preload these objects? or are these already preloaded? forget what i said in the beginning, what about preloading?

  • @tristunalekzander5608
    @tristunalekzander5608 2 роки тому +1

    I'd love to see a raw 3d rendering test, no physics just tons of polygons

  • @Theraot
    @Theraot 2 роки тому

    Godot 4 is officially in Alpha and it the issue mentioned on the video fixed. Would you repeat the tests with it?

  • @Endangereds
    @Endangereds 2 роки тому +2

    It appears, as if, Unity has some sort of easy-in animation by default (which feels good). Possibly because the generator is with in the frame, at the top. In Godot, it feels like cubes are floating (Weight lessly) down to the bottom.

    • @nullvoid3545
      @nullvoid3545 2 роки тому +2

      those should be changable on ether engine with little to no difference in performance.

    • @syriuszb8611
      @syriuszb8611 2 роки тому +1

      It's called gravity. In Gadot it has constant speed, in Unity it is accelerated.

  • @UninstallingWindows
    @UninstallingWindows 2 роки тому +1

    I wonder why the FPS drop is so sudden. Is the engine running out of memory and switches to some kind of disk cache.

  • @GonziHere
    @GonziHere 3 роки тому +6

    30% better, my guess. Edit.. well, color me surprised.

  • @tozpeak
    @tozpeak 2 роки тому +1

    From your experiments I may suppose, that Godot have troubles to handle 2k objects any way. Maybe custom layout in memory while using C could help. Also if you try DOTS in Unity, you may try data oriented plugin for Godot named Godex. It's in development, but still.

  • @ThatElfNerd
    @ThatElfNerd Рік тому

    I think both engines work great. It's all dependent on what you need your game to be. And more than likely, you won't ever need to summon this many physics bodies in one scene, regardless. Not to mention that both engines are constantly getting updates. So problems that are showing up in this video and others like it might not even show up in future versions of the programs. It's just fun to see what happens when you bring an engine to it's limit.

  • @AnityEx
    @AnityEx 2 роки тому +1

    is there a size difference? i can see boxes in both engines falling at different speeds, idk if that would change anything

    • @MeanGeneHacks
      @MeanGeneHacks  2 роки тому +1

      they fall at different speeds because of the way the engines work. Gravity and mass were identical in both engines.

    • @nyeeesss2424
      @nyeeesss2424 2 роки тому

      @@MeanGeneHacks are you certain the unit masses of both the engines are the same?

    • @MeanGeneHacks
      @MeanGeneHacks  2 роки тому

      @@nyeeesss2424 Yes. Unit mass and gravity were set to the same values in both engines.

  • @suvetar
    @suvetar 2 роки тому

    I don't have any horses in this race, just a geek who's interested in the context - but I do have to say, it really feel like the Godot boxes fell in a more natural position than the Unity ones!
    For example. compare 5:48 to 8:18, the Unity boxes appear to have a lot more straight lines emerging ...
    In fairness, I don't know what to expect from the distribution of where the boxes end up, but it's that whole thing about straight lines and nature ...
    Either way, thanks for the video - I found it quite fascinating!

  • @nac9880
    @nac9880 2 роки тому +3

    Doesn't Godot run on OpenGL and Unity on DirectX? I heard Godot is switching to Vulkan in the next major release 4.0. Will that have an effect in the performance?

    • @dangputerz
      @dangputerz 2 роки тому

      Certainly not on Linux or OS/X :P

    • @ishdx9374
      @ishdx9374 2 роки тому

      no, it wont, because opengl and directx as well as vulkan are only responsible for rendering

    • @theobserver4214
      @theobserver4214 2 роки тому +1

      @@ishdx9374 It actually does. Modern APIs like Vulkan and Direct3D 12 are supported better by AMD and Intel drivers resulting in better performance on those GPUs, and generally are designed with modern GPU's hardware in mind. OpenGL was designed for hardware from the 90s. It's most evident with DOOM 2016 where Vulkan mode runs a lot better than OpenGL but looks almost the same.

    • @PySnek
      @PySnek 2 роки тому

      @@dangputerz ??? Vulkan runs great on Linux

    • @dangputerz
      @dangputerz 2 роки тому

      @@PySnek I meant DirectX Bro. I'm aware Vulkan can and does. I only use Linux since 1998ish except when programming.

  • @grittynerd
    @grittynerd 3 роки тому +12

    I wonder what is limiting the physics at some point, like after few more objects everything stops drastically, i'd expect a slower drop rate. Interesting that with Godot even with double the calculations you are reaching roughly the same results, it seems there's that drastic limit in place instead of something else (certainly with more stuff to do in a frame that double cost would impact differently).
    I don't know if there's something in the internal data structure that is optimized to handle some max ammounts or other conditions. Maybe some tweaking in the code to arrange larger sets is possible? Another idea would be spawn the same critical number of objects in a grid pattern without them touching at the beginning, then release them and see if collisions slow them down or the speed is the same. See if larger spacing cripple less (maybe objects fall into different spatial areas in the engine and works better?). Just some ideas i'd try.

    • @MeanGeneHacks
      @MeanGeneHacks  3 роки тому +5

      Definitely the object collisions are slowing things down, because when the objects go to sleep, the frame rate jumps back up.

    • @fernandobrandt7230
      @fernandobrandt7230 2 роки тому +7

      Maybe is the OOP design they choosed for the engine, OOP is not cache friendly which is important for game engines.

  • @Falney
    @Falney Рік тому

    I'd be interested to see this experiment redone with godot 4 now that they have upgraded their physics engine.

  • @cassiusharju5047
    @cassiusharju5047 Рік тому

    Well the thing is that DOTS is an Entity Component system and ECSs are designed to be performant. There is an ECS library for godot called Godex

  • @rybotekk
    @rybotekk 2 роки тому

    wow. thankyou.

  • @trollingisasport
    @trollingisasport 2 роки тому

    What's that 2D shooting game at the beginning? That actually looks pretty cool.

  • @relaxandlearn7996
    @relaxandlearn7996 Рік тому +2

    can you test this again with 4.0 ?

  • @xXYannuschXx
    @xXYannuschXx 2 роки тому +7

    I have started making games with Godot since 2 weeks, before that I tried Unity and was already put off by the TUTORIAL. The reason being that Unity (in their infinite wisdom) tried to enforce dot and comma use depending on the country (in Germany we use comma as a decimal seperator), the problem was that the built-in tutorial expected you put in a decimal number, but the engine AUTO-CORRECTED it to a comma, causing it not to detect the correct value, getting me stuck....
    But that wasnt the end: I found a thread in the official Unity forum where people noticed this problem, which broke their games. There was one particular developer, who complained that this broke their custom shader and caused them to lose 3 weeks of work, because nobody noticed that Unity replaced all the dots with commas in their script, which was done at compiling time. To finally put the nail in the coffin, the Unity devs then started defending their decision, despite the outcry of everyone (and ignoring that program code should always use dots and be indepentent from what the OS uses). They however never replied to the beginner, who pointed out that this broke their tutorials for everyone from a country that uses commas as a decimal seperator... I think this took them MONTHS to finally fix....
    To sum up: Unity might be more performant for 3D games, but the way Unity seems to care about their devs and how much better designed the workflow in Godot seems to be, not to mention the far better license of the latter and open source nature, its hard not to got with Godot as a beginner (IMHO).

    • @xXYannuschXx
      @xXYannuschXx 2 роки тому +2

      @@kishirisu1268 ....dude what? You have COMPLETELY missed the point.

    • @foreignwarren7361
      @foreignwarren7361 2 роки тому

      You must be joking, there is hardly any help in Godot, still! Unity has 10x the tutorials on youtube.

  • @Stylpe
    @Stylpe 3 роки тому +11

    I see a number of issues with your methodology, and noticed some oddities you didn't address. I'll try to give some friendly critique for your consideration 😀 Keep up the good work!
    The numbers are suspiciously close to some of the 3D test results. Can you try to do something to determine if there is some other bottleneck than the physics engine itself that masks the numbers (i.e. are you sure you're measuring the right thing)? I'm suspecting the object tree most of all, and the event handling especially, since physics collisions can have event handlers (at least in Unity). Idea: keep everything the same but remove the physics completely and just do a basic movement implementation that slowly accelerates downwards until it hits a set height and then stops instantly. No collision detection. This will show if/where the game engine itself starts slowing down.
    The framerate drops are very inconsistent, and in one test drops from the thousands to under 10 in about one second. That smells of some kind of O(n^2) or probably worse computation reaching a breaking point, which could be due to the compounding collisions caused by all the boxes being in one big pile. If that's what you were targeting on purpose though, that's fine! But it's a bit disingenuous to judge the whole physics engine based on such a particular case, and again I'm missing comparison simulations to rule out other reasons for the drops. Idea: Instead of a bin that holds all the cubes, spawn them gradually in one direction to minimize (but not completely avoid) boxes colliding with each other.
    The side by side comparison shows that the boxes aren't falling at the same speed, which suggests that there's still a difference between the two test implementations that may or may not make a difference. This might be just plain scale, that the Godot scene has larger boxes but is also zoomed out more, or that there are other parameters than physics framerate that should be compared, like timescale, gravity, weight/mass, air resistance, I don't really know, just speculation. Idea: This can be tested in two ways just like you've done in the video: Change stuff in the scene (size up or down) and compare to previous results in the same game engine, and change stuff to get the two game engines to either match up all possible variables and/or to produce a visually similar simulation. This might also affect the squished and jittering boxes in the Godot 60hz test, see if making everything larger (and zooming out) gives any improvements!
    Last, I think the comparison to bullet hell games doesn't fit the test scenario. Bullets often have constant velocity or very simple movement logic, they don't collide with each other (usually just players, enemies and destructible s by calculating distance plus world geometry which is static), and they have no geometry (just point or circles which is very fast computationally) so a full general physics simulation is overkill and most games use or make something more specialized and optimized like a particle system. So you could make another video about that, but that's not the use case you've tested in this video 😉
    Hope you find my comments useful! Looking forward to your next video 👍

    • @MeanGeneHacks
      @MeanGeneHacks  3 роки тому +2

      Thanks for the helpful insights! I agree with your point that even bullet hell games would probably not require full physics simulation and either engine would be suitable for such a game. This comparison was mainly to satisfy my curiosity as to whether Godot's 2D could hold its own against Unity2D.
      You also bring up a good point about the different speed of the falling bodies in Godot vs. Unity. The physical parameters (mass, accel due to gravity, etc) were consistent between the two engines, its just Godot Physics seems to require much higher gravity to match the falling speed of Unity at 9.8 m/s^2. For this comparison, I decided to keep the variables ( gravities and masses ) the same between the two engines, which results in the objects falling slower in Godot. I also tried larger collision shapes in Godot at 50Hz and still encountered the bug with large stacks of objects interpenetrating each other.
      Thanks again for the comment, I'll definitely take into consideration your ideas for any future comparisons!

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p 2 роки тому +1

      @@MeanGeneHacks also, it seems like the fences are farther apart on unity? That could change the number of collisions, couldn't it?

  • @prodevus
    @prodevus 2 роки тому

    Does Godot use chunks for its 3d physics calculations?

  • @betarakhmadi554
    @betarakhmadi554 2 роки тому

    @Mean Gene Hacks, great video, btw what is the title of the game at 1:28? Many thanks

  • @spacechannelfiver
    @spacechannelfiver 2 роки тому

    This is an extremely specific use case.

  • @zheli2417
    @zheli2417 2 роки тому

    Any one can give me a link about the game at 1:06 I search for 'game kip' but can't find it

  • @DanielKierkegaardAndersen
    @DanielKierkegaardAndersen 2 роки тому +1

    Seems there's missing a DOTS sample ;) Just wanted to say that Unity does have 2D physics and a 2D renderer, tho really experimental xP

  • @AlrhadenJavier
    @AlrhadenJavier 2 роки тому +1

    what i like in GODOT is it's fast to load a project in my low spec laptop, while UNITY takes forever

  • @piotrkucharski465
    @piotrkucharski465 3 роки тому +4

    What about Godot v4?

  • @ZeldaxLegacy
    @ZeldaxLegacy 2 роки тому +2

    Thanks for this. I've been working on a little Metroidvania type game in godot (2d) and was wondering if I'd really have to worry about running into issues having possibly a max of 10 physics bodies going at once. I think you've solved that for me lol.

  • @pencilcore6457
    @pencilcore6457 Рік тому

    unexpected result, but I think if you writes the codes well, both of them are great.❤

  • @vickylance
    @vickylance 2 роки тому

    Godot 3.4 is out can you run the same 2D test in 3.4?

  • @serhiid3758
    @serhiid3758 2 роки тому

    Yes it will. Someday.
    Just wait for few more updates!

  • @thomasanderson1416
    @thomasanderson1416 2 роки тому

    Is there a DOTS 2d Physics for Unity?

  • @Sergey95GameTesterrr
    @Sergey95GameTesterrr 3 роки тому +4

    My first comment got deleted, prob because of the link to gh i posted.
    I think it is also important to mention that godot is FOSS and you can add any physics engine given enough time and experience. Take a look at extrawurst/godot-vs-rapier repo which address the issue you were talking about with collisions overlapping and giving a better perf.

  • @Destroyerpan
    @Destroyerpan 2 роки тому

    Can we get an update comparing godot 4 now?

  • @tommj4365
    @tommj4365 2 роки тому

    How many objects are they're usually in bullet hell games and are they really all physics objects like this? Seems they could be a simpler type of object

  • @averageanon007
    @averageanon007 2 роки тому

    can you post the project files for these benchmarks?

  • @vishnuviswanathan5308
    @vishnuviswanathan5308 2 роки тому +1

    Subscribed

  • @hornetdc
    @hornetdc 3 роки тому +7

    Can you also benchmark 2d performance for things other than physics? Like drawing 1000s sprites at the same time.

    • @matteotallevi8490
      @matteotallevi8490 Рік тому

      I can already tell you that for this kind of benchmark, frameworks like monogame and raylib outperform unity and Godoy by a large order of magnitude (on my pc, something like 25000 sprites for unity vs 150000 for raylib and monogame)

  • @user-sl6gn1ss8p
    @user-sl6gn1ss8p 2 роки тому

    How come 2D collisions seem to be running slower than the 3D counterparts? Are things interacting more, or are there optimizations being left behind on 2D?

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p 2 роки тому

      I think it would be interesting to see the results of scenarios in 2D and 3D which controlled for this

    • @jesussanchezpalma6937
      @jesussanchezpalma6937 2 роки тому

      I don't know much about these topics. But I guess it's because the game engine doesn't render all the boxes at the same time for 3D. You know, you only need to render the objects that appear in the camera.

  • @creatcodebuild7180
    @creatcodebuild7180 2 роки тому

    into the gungeon is a 3D game secretly. 2D images in 3D world with a orthogonal camera

  • @pliniomourao
    @pliniomourao 2 роки тому +2

    What about using DOTS in Unity for performance in 2D?

    • @thomaspais1873
      @thomaspais1873 2 роки тому +1

      DOTS is so powerful, with DOTS unity can win easily.

  • @310thebank
    @310thebank 2 роки тому +1

    unity is hard for beginners at the first time but they gave you many free asset playmaker is a strongpoint for game dev who would not like to coding , Godot good for beginner but lack of asset in long term and you need to coding .

  • @cedricharris5262
    @cedricharris5262 2 роки тому

    Is it possible to use both . ?

  • @emberdragons8244
    @emberdragons8244 Рік тому

    that's true, but aren't there many ways to also optimise it in unity?

  • @juhamukari5270
    @juhamukari5270 2 роки тому

    How about Godot v4? Could you Make new comparison with newest Unity and Godot versiona + unreal

  • @Deliveredmean42
    @Deliveredmean42 2 роки тому +1

    Given Godot is getting updated Godot 4 will provide s lot of improvements in both 2D and 3D.

  • @DalpakaNBA
    @DalpakaNBA Рік тому

    7:42 answer beat by 2000 with 60hz

  • @vladkostin7557
    @vladkostin7557 10 місяців тому

    Are you running in editor??

  • @ro-ce8vg
    @ro-ce8vg Рік тому

    i like godot a lot, really hoping they can nail the physics down with godot 4 and beyond

  • @darthnegativehunter8659
    @darthnegativehunter8659 2 роки тому

    the reason why 2500 works is not just bc of a better engine. there is probably a lot of inaccuracy added just to keep the engine going smoothly. things like different collision margins.
    basically you aren't testing the same things if your margins aren't exactly the same

  • @lordlin
    @lordlin 2 роки тому

    Anybody knows the name of the games shown on 1:23

  • @komuisam6549
    @komuisam6549 2 роки тому

    Please share this godot code, I need to solve the problem of min 3:25

  • @Badral-Din_S
    @Badral-Din_S Місяць тому

    There is 2 physics engines in godot, I don't know if you tried both of them or not, you missed somethings in Godot Engine

  • @johnleo7
    @johnleo7 2 роки тому

    1:05 where can i download this game? Kip

  • @vectoralphaSec
    @vectoralphaSec Рік тому +2

    3D -Unity
    2D -Godot

  • @SFoX-On-Air
    @SFoX-On-Air 2 роки тому

    What does that first test means with the 25k red blocks? Because.. not only one of them fall in a almost correct physical angle. It seems like someone was trying how many blocks he can get on screen and not how accurate the physic simulation is. Build a Steam machine, where hot air forces a cone to move over a joint. Driven through fire that heats up water.
    Then change the waterpot from copper to concrete. Lets see how much physic these computer programs really bring to the table.
    Or make a gaschamber filled with oxygen and cool it down until the oxygen goes fluid.
    Aside from no Information which airpressure, gravity or weight these boxes are simulatet in, it looks like these boxes are made of rubber in the second program.
    I dont really know what falling blocks, where most of them glitch through the ground or through other blocks, have to do with physics.. its more like how magic this can be. Usual you need an supercomputer to make exact calculations for things like this. Therefore I have a hard time follow up, what I see here.

  • @rizekishimaro
    @rizekishimaro 11 місяців тому

    now godot is optimized and much more performance are added

  • @garrukthewildspeaker262
    @garrukthewildspeaker262 Рік тому +1

    What's the game on 1:10?

  • @bigsmoke8344
    @bigsmoke8344 10 місяців тому

    Please do it with Godot 4.1

  • @felipesuarez4820
    @felipesuarez4820 Рік тому +1

    My sad prediction (because I am a Godot fan): 75k in Unity.