Тёмный

Unity DOTS vs Handbuilt: Sample Project 

Nick Caston
Подписаться 12 тыс.
Просмотров 675 тыс.
50% 1

Comparison between one of Unity's sample ECS/DOTS projects, and a "from scratch" cloned implementation using C++ and OpenGL. Bringing some data to the game engine discussions. Custom game engine vs Unity DOTS!
Unity sample project repo: github.com/UnityTechnologies/...
C++ clone source: github.com/ntcaston/AngryGL
You can watch me live stream game development at / nickcaston
OpenGL® and the oval logo are trademarks or registered trademarks of Hewlett Packard Enterprise in the United States and/or other countries worldwide.
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere.
The stylized “C++” logo is a trademark of the Standard C++ Foundation.

Игры

Опубликовано:

 

28 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 1,2 тыс.   
@NickCastonNZ
@NickCastonNZ 3 года назад
A few folks have pointed out that the Unity project I'm comparing against is converting from old-style GameObjects instead of being built as DOTS from the ground up, and that this impacts how much can be read into the results. This is a valid concern and it's something I should have done better to clarify in the video. I don't believe this completely invalidates the results, I personally still find the data very interesting, but I'm pinning this comment so (hopefully) future viewers are aware of this point.
@kunkerkar
@kunkerkar 3 года назад
And why u didn't build the game with IL2CPP enabled for unity it gives much more performance because when u run it in editor it gives bad performance
@sodaguy5835
@sodaguy5835 3 года назад
great comparison
@nandomax3
@nandomax3 3 года назад
I think that if you're a solo indie dev, use unity guilty free, I want to be a game dev, not a game engine engineer
@rathodpragnesh3738
@rathodpragnesh3738 3 года назад
@@kunkerkar true
@DejaimeNeto
@DejaimeNeto 3 года назад
@@kunkerkar He clearly stated he wasn't going to use run time because of the mandatory splash screen. He built the game, didn't run it on the editor.
@rojenmaharjan2033
@rojenmaharjan2033 3 года назад
"Let me open my fancy IDE" *opens notepad*
@gameginger5529
@gameginger5529 3 года назад
lol , only legends can code in notepad
@nonenone9002
@nonenone9002 3 года назад
IDE's are anyways bloat
@mustafazakiassagaf1757
@mustafazakiassagaf1757 3 года назад
Use vim
@algj
@algj 3 года назад
@@mustafazakiassagaf1757 Did you mean: *emacs*
@subliminalcastillo2126
@subliminalcastillo2126 3 года назад
@@sdrawkcabmiay Hey man, come on now. Notepad was the shit for writing batch script text based adventure games on your grandmas windows xp
@psyneur9182
@psyneur9182 3 года назад
12:02 no full auto in the buildings!!!
@pivotman319
@pivotman319 3 года назад
*"It's not full-auto."* "That's not full-auto?" *"This is."* *_12:03_* *"That's full-auto."* "Damn, bro! Okay."
@danielkolev
@danielkolev 3 года назад
This meme is useless though. Full auto IS for close quarter combat....so you spray everywhere and hit everything. Unless there is a hostage situation.
@ananttiwari1337
@ananttiwari1337 3 года назад
@@danielkolev Hi
@matheusgclassen
@matheusgclassen 3 года назад
@@danielkolev in IRL combat full auto is only useful for suppressing fire, control and accuracy is a lot more important.
@danielkolev
@danielkolev 3 года назад
@@matheusgclassen Read my message again. I was reffering to close quarter combat...
@joaohudsonlacerdaoliveira5253
@joaohudsonlacerdaoliveira5253 3 года назад
Difference between specific solution and generic solution, good video.
@vladmakarenko6641
@vladmakarenko6641 3 года назад
So what to drink?
@kristiyanivanov7414
@kristiyanivanov7414 3 года назад
@@vladmakarenko6641 wine
@neon_dev1l113
@neon_dev1l113 3 года назад
@@kristiyanivanov7414 wine drink only Linuxoids🌚
@kristiyanivanov7414
@kristiyanivanov7414 3 года назад
@AngryJoeIsRacist Super Racist me
@kristiyanivanov7414
@kristiyanivanov7414 3 года назад
@AngryJoeIsRacist Super Racist I definitely am.
@angrynerd2103
@angrynerd2103 3 года назад
Yeah it makes sense. The more layers you strip away between the hardware and the software the faster something can run. Now time to try it in machine code lol.
@adamw.8579
@adamw.8579 3 года назад
Assembly coding critical functions is very good solution, commonly used up to now, when any single opcode counts.
@Nexus-rt1bm
@Nexus-rt1bm 3 года назад
You would suprised by the number of people who write assembly for "fun"
@adamw.8579
@adamw.8579 3 года назад
@@Nexus-rt1bm Not surprised, I write firmware for relatively small devices and frequently insert assembly functions. No matter when main code in written in C++. Some critical operation as registry unlock sequences can't be made in C++ due time restrictions. Every cycle counts.
@Nexus-rt1bm
@Nexus-rt1bm 3 года назад
@@adamw.8579 Damn, sounds thrilling and at the same, incredibly boring. Still kinda cool though. I'll just sit back on the good abstraction layer that is rust.
@adamw.8579
@adamw.8579 3 года назад
@@Nexus-rt1bm ASM inserts are in fact some type abstraction layer, similar to driver functions. In desktop app programming these functions are yet implemented and programmer simply use it from library, but in microcontroller world coder is responsible to made all near from scratch. Of course there are advanced library frameworks as Atmel ASF. Simple use but very ineffective (as mentioned "rust"). Universal library = easy use, custom library = top efficiency. Ethernal truth in programming.
@Yhushe
@Yhushe 3 года назад
I didn't realize I just watched 28 minutes of this, you got me really engaged, great job.
@Hyraethian
@Hyraethian 3 года назад
What the heck, I didnt even scroll the comments until after the 20 minute mark.
@caxco93
@caxco93 3 года назад
time to learn that so called "Handbuilt" engine
@necrago
@necrago 3 года назад
I think you ought to move to unreal engine if you want to learn something
@necrago
@necrago 3 года назад
@Screw Kalergi In case you were asking me it's because it's a superior 3d engine compared to Unity. If you want 2d then I guess you could choose on your own.
@necrago
@necrago 3 года назад
@Screw Kalergi I did not mean... hmmmmmmmmmm
@TheMarovan
@TheMarovan 3 года назад
@Screw Kalergi nintendo gives you special tools for unity but doesn't actually require you to use it
@Goodpecker123
@Goodpecker123 3 года назад
@@necrago In case you're still available to comment on that, I'm interested on your thoughts on why Unreal Engine is superior to Unity. Or perhaps you'd refer me to an article or a post?
@danielb270
@danielb270 3 года назад
this video is just a flex on how good you are with Open GL, isn't it? (I will give it to ya, looks waaaay too good)
@danielb270
@danielb270 3 года назад
@Qrly Hey, all I ever did with OpenGL is a curve with a stickman on a bicycle and a ray-tracing collidoscope with only spheres and discs as supported shapes; so I have a very vague idea of how to even approach creating something of that complexity, furthermore with support of external models, animations and textures. Hats off to the dude. (Re-reading my original comment I thought it sounded a bit rude)
@shreksthongg
@shreksthongg 3 года назад
@Qrly Maybe for you making the video would have been way harder, but for many people, that is not the case. I would argue just based on the difference in complexity between the two, if you take someone with equal skill and experience in each, the video would have taken much less effort than getting all the lighting, texture mapping, etc working with opengl.
@kanjakan
@kanjakan 3 года назад
@Qrly Your reasoning is fundamentally flawed as different people have wildly different skill sets. For example, I am a professional animator and editor so making a video like this would take some time but would honestly be a breeze whereas coding a handbuilt engine from scratch is something completely out of my league even though I do have a bit of programming experience under my belt.
@kwoshent0
@kwoshent0 3 года назад
@@kanjakan bruh
@kwoshent0
@kwoshent0 3 года назад
@@shreksthongg bruh
@DejaimeNeto
@DejaimeNeto 3 года назад
I love the comparison. The performance gain is significant, given the same level of expertise. I must say though that there are a few other considerations I'd make, especially considering that the Handmade project used a much much different architecture. Let me start by saying that the "converting MonoBehaviour to entities" thing is not a big deal, as it is the de facto way of working with DOTS as per the documentation. There's no other way that doesn't involve building all entities by code, but that would increase code complexity by at least an order of magnitude, and the performance gain is negligible (I've tried). Secondly, the ECS example was made to show relative performance, i.e. compare the performance of creating, simulating and deleting GameObjects VS DOTS Entities. That said, this Unity Sample is an example of a badly performant codebase, simplified for clarity to be used in a Slides Presentation. When actually using DOTS in the real world you would add and remove the Disable component to bullets instead of deleting and creating new ones, for an example. The point is: comparing this code sample (bad performance by design) and an unreadable simplicity/performance first codebase does give some insight, but needs a very healthy pinch of salt. Thirdly, the DOTS example is a lot easier to build upon and contribute. And I don't mean only DOTS specifically, but ECS in general. If you were to integrate my favorite ECS library, EnTT, instead of directly hardcoding data manipulation, you'd instantly lose some of that ~10x performance. But then comes Jerry and wants you to add Walls, Conveyor Belts, Cameras, Alarms, X new enemies, Weapons, [...], you'll have a much easier time with EnTT/DOTS than the hardcoded specialized approach AND better performance in the end result, with the much much easier parallelizing. That also affects teams/contributors. If working on a team, ease of extendability is all that more important. Overall, I am actually impressed with how many lines you managed to complete this, I expected at least twice that number. This video is pretty old already, so it might also be interesting to state that DOTS changed a lot this year. So much that you'd need to rewrite most of the code from the original sample to get it running. The changes not only brought better performance, but also made the API a lot more sane than it was before. If I was to remake this comparison today, I'd make sure to use ECS on both sides, and would use the same optimizations on Unity whenever possible. Enable the burst compiler, and make sure to parallelize systems execution whenever possible. And lastly, but not leastly, make something a bit more complex as a test of extendibility; extend both Unity's prototype and the handmade counterpart with a few more features. And if you read all of this, congratulations! You are probably interested in seeing some code. Look me up on github and you'll find a DotS project that is a tad bigger than this prototype, and with the new v0.16 API.
@excitedbox5705
@excitedbox5705 3 года назад
Expansion/ adding more items etc should be easy since you already have all the movement mechanics etc. You are only adding a new item and the new functionality if there even is new functionality. A new enemy only requires a new model while using the same movement and collisions where a conveyor belt needs to perform specific function such as spawning and moving items. I agree that the unity example wasn't built efficiently and his time investment was building a "game engine" for HIS game instead of a game engine for EVERY game which unity has to support. I think that is where the biggest differences in performance come in. These game engines are like the F35 joint strike fighter. Good at lots of things but great at none because it has to fill many rolls and be adaptable. That is where a modular approach can help but then you need multiple versions of many features that can be interchanged. Instead of 1 global Data Structure you are building many etc. (I know you need many anyway it is just an example). I also think many people would lack the skills to even build their own game from scratch. Unity's most popular add-ons are still those node based low code solutions.
@DejaimeNeto
@DejaimeNeto 3 года назад
@@excitedbox5705 I'm not sure what you are referring to in your first paragraph, but I'll assume it is about an ECS version, and I would strongly agree. If it is not about the ECS version, then you clearly did not look at the source code before commenting if you honestly believe building up on that would be that trivial. Read that code, and if you still believe that all it takes to add a new enemy is to copy the new enemy's FBX then I must have no clue how C++ programming works; but I believe am proficient in C++. The Unity example wasn't just "not built efficiently", it was deliberately built inefficiently for both readability's sake and to make a good relative benchmark. It had to create and delete gameObjects and entities when it wasn't necessary, akin to a synthetic benchmark. And a relative benchmark at that. It created unnecessary workload just to test how one API fared against the other. The C++ project, on the other hand, was built to have "feature parity", comparing its performance to something that was intentionally built to have bad performance. This is akin to comparing the PI to the nth decimal using Gregory-Leibniz and _#define__ PI = 3.14159[paste all digits until the nth here]_ . Like comparing Cinebench and an image visualizer with a PNG. It simply makes no sense, these have different applications and different objectives. I'm not saying a specialized game engine won't have better performance, it probably will. I'm saying that this comparison does not reflect Unity's real performance. I'm also saying that a hardcoded programming style is not a good alternative for game development, whatever the *initial* performance gains are. So it makes no sense to pretend this hardcoded approach would work for anything other than a simple arcade game/demo. Don't get me wrong, the C++ code would not pass any code reviews here where I work, entanglement. Check what files would need to be changed if we wanted to add 3 new features: 1 - slow motion (without breaking playtime tracking) 2 - a triple form boss 3 - walls and doors In a less hardcoded C++ code, maybe even using ECS, this would be fairly easy with the boilerplate in place. In this example's hardcoded code, you'd need to change almost all source files. Imagine that list with not 3, but 300 entries. This complexity grows exponentially. This ends up misrepresenting both Unity's and C++’s performance.
@NickCastonNZ
@NickCastonNZ 3 года назад
Thanks for taking the time to share your thoughts. In terms of using the particular sample as a point of comparison, I mostly selected it because Unity Technologies themselves presented it as a "look at how good DOTS performance is" example, and also it looked fun enough for me to even bother going through this whole exercise :P. I'm certainly open to the idea that there's a more suitable project out there to compare against. It's true that if the scope of the game were to be changed then this comparison becomes less and less applicable. This is why I was very careful with my "for this particular game, for this particular developer, here's a single data point" disclaimers. I apologise if it still seemed like I was misrepresenting the situation. It would be interesting to do this again today! However, if I had the time to do something like this again I'd probably try do a different comparison, like with UE, or between rendering APIs or maybe ECS vs non-ECS in handmade. I'll take a look at your project on github! Happy coding!
@DejaimeNeto
@DejaimeNeto 3 года назад
@@NickCastonNZ They actually presented it as "look at how good DOTS API performance is compared to MonoBehaviour", and they made a comparative and readable benchmark for that. That was made to compare both APIs. If you ever want to make a follow up to this one, be it ECS vs OOP or revisit this Unity vs C++, I'd be up to lending a hand
@jayjaygolden5123
@jayjaygolden5123 3 года назад
As an artist Thank you for considering us and other team members hahahahaha
@error200http
@error200http 3 года назад
Wow good job reimplementing this complex shadows, models and animations in C++
@passivecryptoearnings3605
@passivecryptoearnings3605 3 года назад
OpenGL magic
@mattmmilli8287
@mattmmilli8287 3 года назад
@@passivecryptoearnings3605 black magic*
@MrIcer42
@MrIcer42 3 года назад
I would like to see this updated with the addition of UE4.
@MrBratkenSolov
@MrBratkenSolov 3 года назад
UE4 is crap like Unity
@spydergs07
@spydergs07 3 года назад
@@MrBratkenSolov UE4 over the last couple of years has really stepped their game up. I wouldn't say they are crap.
@gkato
@gkato 3 года назад
Me too, specially since they both use C++. Not sure if the difference would be that great but certainly it'd be interesting.
@maulikshah28
@maulikshah28 3 года назад
ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-avFP67EIYvo.html
@brickabang
@brickabang 3 года назад
@@gkato I thought unity used c#
@rkalla
@rkalla 3 года назад
12:04 the gun I dream about having in every horror survival game.
@algj
@algj 3 года назад
I fell asleep, 12:01 woke me up. Rewatched this, damn that is nice.
@ndrsg3013
@ndrsg3013 3 года назад
I thought the world was ending outside and jumped, like what the hell?
@mohammadazad8350
@mohammadazad8350 3 года назад
LOL
@SrSproductionsS
@SrSproductionsS 3 года назад
Great video! This is the kind of video you search for years without any success, and suddenly goes into your recommendations randomly. As I've never written an engine by myself, I am looking out for finding an answer if writing your own engine is worthy or not. You made an excellent comparison between how faster an in-house engine performs compared to a general-use commercial engine! Also, maybe another thing to take into consideration is that you don't have to pay any amount of money (in revenue) if the game comes out as a big hit for using your own custom engine. It probably won't be anyone's concern, but I think it is a thing to keep in mind. Subbed.
@joey199412
@joey199412 3 года назад
There are revenue free engines like Godot available out there. You can also freely customize the source code from Godot to fit your needs when needed. Basically I would only recommend building in-house engines if you're either trying to make something extremely unique that requires a new way of thinking about something that game engines didn't consider. Or if you want to either make a really big AAA product pushing the hardware. Or the polar opposite, building a really small indie project where performance is important. I don't recommend custom engines for basically all mid-sized projects. Anything from large indie to small AA studio is best off just using a generic engine.
@nilstrieb
@nilstrieb 3 года назад
Making your own engine for a game only makes sense when the game is either too weird or unique to do it in an existing engine or because you want to build an engine.
@billymonks7771
@billymonks7771 3 года назад
I promise, if you are an independent developer, making your own engine does not make sense. It only makes sense for educational purposes. The additional effort easily eclipses the performance gains. Recreating this sample scene might have only been 4x effort (for a C++/openGL expert), but adding weapons, enemies, and levels will become exponentially more difficult with the handmade approach.
@SchemingGoldberg
@SchemingGoldberg 3 года назад
@@billymonks7771 Would it be? Once you have the shader and material systems created, you can reuse them for all the things in your game, so at some point the amount of effort will be equal between the two engines.
@peytonfaz
@peytonfaz 3 года назад
The reason why I am building an engine is because I enjoy the challenge, I wanted to learn more about how engines work, and just to improve myself really and have fun. If you're interested in making a game then you should use a prebuilt engine, if you are looking for a challenge building an engine would actually be a nice pay-off as you know exactly how it works too. My honest answer would be, if you're making a huge complicated 3d game then you should probably use a prebuilt engine (unless you're like me and enjoy a fun challenge) although everyone forgets that 2D games exist while talking about game engines 2D games in my experience so far aren't too difficult to make while building your own engine. Sure it's still time-consuming, but not as time-consuming as a 3D game. And just to give an example I started a new 2D project completely from scratch and in 1 day I was able to get sprites and collisions and movement and stuff like that. Sure in a prebuilt you could just drag and drop a sprite in and probably do it in less than 30 minutes, but a day after work for all of that isn't a lot either. In one week I had a nice level laid out.
@KyleHarrisonRedacted
@KyleHarrisonRedacted 3 года назад
imagine being that comfortable that you're just like *a few days later* "Okay so I built the thing from scratch for this youtube video" and then doing so.. so much more than the average programming benchmarker
@andrewgilgallon8852
@andrewgilgallon8852 3 года назад
Phenomenal Nick. This problem is always happening in software development of all kinds. Great capturing the problem, constructing a problem setup, and putting the work in in attempt to reveal something instructive. Also learned what could be accomplished in the hands of an expert. Thanks for your video. I've walked away with a lot.
@NickCastonNZ
@NickCastonNZ 3 года назад
Thanks for the kind words! :)
@delphicdescant
@delphicdescant 3 года назад
Why is the algorithm just barely giving me this, over a year later? I would have loved to see it when it was fresh. Also, I agree. I've had more luck writing bare C++ than I have with a pre-made engine.
@mrjean9376
@mrjean9376 3 года назад
Btw, Very great video!!! Very love to see finally there is people make performance comparison on game made with raw/pure code with internal api's and compare it to game created using game engine.. im soo interesting to performance optimization topic like this, im sub man.
@tejonBiker
@tejonBiker 3 года назад
Thankyou very much for this effort, after some tweeks and hours I was able to compile your example, I Will make a pull request to extend the instructions for a more fast compilation phase
@NickCastonNZ
@NickCastonNZ 3 года назад
Oh nice! I chucked it on github in a bit of a rush before I went on my xmas break and looking back I see the instructions are a bit brief. Glad you got it working! I'm more than happy to accept a PR
@maxxim0071
@maxxim0071 3 года назад
​@@NickCastonNZ I can't launch main.exe, console outputs: bad png sig All textures used in main.cc are present in /assets/ folder.
@emersonharris142
@emersonharris142 3 года назад
I think this question of unity vs hand built is a general problem with all development. For me this is the "the right tool for the job" question. If my game requires a low amount of graphical needs, an adventure game, puzzle game, or whatever then yes unity might be a good option. It has all prebuilt code and based on the needs of your game you will never tax that system. If you are trying to make a fast paced FPS or top down that is using hordes of enemies while your player character is wielding 30 types of weapons at once at 4k resolution... then ya you may have to go hand built for that. The correct solution is always what will get the job done per the requirements in the fastest time possible.
@NickCastonNZ
@NickCastonNZ 3 года назад
I agree! There's definitely a place for both approaches
@woodbyte
@woodbyte 3 года назад
Interesting watch, but I'm left wondering how long it would take an experienced Unity developer to optimize that (intentionally brute-force algorithm to show DOTS strengths) sample further, and how much of a difference in performance that would achieve. Without those data points it's really hard to make any serious conclusions even just limited to this one project. I'd also love to see a face off between 2 people coding the same project - one experienced Unity developer and another experienced in C++/OpenGL - give them both a week and see what the results would be.
@fededevi1985
@fededevi1985 3 года назад
Yeah.. This is interesting but in the end it is just a single exceptionally marginal case where you instantiate thousands of objects in a single frame. THe point is.. nobody forces you to do this. If you really want to have this specific case where you shoot thousands of bullets you can easily handle all the bullets in a shot with a single gameobject and have pretty much the same performance of a custom built engine. This is also the perfect example where you are supposed to use object pooling and not create/destroy gameobjects.
@sirdiealot7805
@sirdiealot7805 3 года назад
@@fededevi1985 Somehow no one of all the hundreds of pro Unity devs here have stepped up and done it. More than a year later.
@BrunodeSouzaLino
@BrunodeSouzaLino 3 года назад
You still wouldn't be able to lower the Ram usage. If anything, the optimization would require even more ram.
@donovan6320
@donovan6320 3 года назад
@@BrunodeSouzaLino By lowering the amount of objects you absolutely could. Do not get me wrong you are not touching a custom built engine in terms of ram usage, That being said they're bloated for a reason. Those generic game engines hold Complete non biased Implementations of everything you need. With a custom game engine you can cheat. You can cut corners and make assumptions however these assumptions are not viable for a game engine that wants to support many different types of games.
@donovan6320
@donovan6320 3 года назад
@@sirdiealot7805 It's totally possible it's just not worth anyones time. Not to mention the results will still work better On a custom game engine for the reasons I outline above.
@dimanarinull9122
@dimanarinull9122 3 года назад
wow, that is actually inspiring. if it's only 4 times harder to build, but you end up with better control understanding and performance with margins this big(I know that results may differ, I've seen my coding skills). maybe going full rogue wasn't that much of a bad idea after all.
@ducky8075
@ducky8075 3 года назад
I bet that it takes him only 4x as long Because he has experience in the field, and lots of experience writing low level graphical renderers. If you want to jump in and do it for your first time, it’s likely going to be 10-100x as long as the math required to truly understand it all is *very* heavy.
@dimanarinull9122
@dimanarinull9122 3 года назад
@@ducky8075 no shit. It's not like I was coding myself for the past few years and have my profile picture be my first working GUI.
@krele14
@krele14 Год назад
@@dimanarinull9122 Past few years of coding shitty demos using SDL is not scratching the surface of low-level graphical renderers...
@dimanarinull9122
@dimanarinull9122 Год назад
@@krele14 yes because ALL I ever coded with was SDL and I definitely started only 4 years ago and never had ANY other experience with multiple OS and wanted a simple and mostly easy interface to work with instead of literally making everything from scratch whenever I move from Windows to Mobile to Linux or whatnot. it's not that I literally tried to search for tools that are easy to teach others and are a simple way to get away from "engine coding" into "real coding". and it's definitely not that I mostly code demoes and other things that are almost completely different to everything I have made prior and the things on the internet are explicitly from the first few revisions so they are less obfuscated by debugging and other things and can be reverse engineered into better products. I can show the revised Chess game I made but it's completely different and only uses the inferred logic from the original one. pretty much anything was exported into a LUT, the scoring system is revised, there are board hashing and multiple levels of optimization. anyone reading it would either need prior knowledge of the way chess engines work, or would need a lot of time to understand most of the "meaningless" changes that are there literally only for runtime optimization. it also moved to a fully portable codebase which includes the CLI using calls for system on both windows and linux depending on the system and uses the ANSI way of printing formatted text to the screen. I know it may seem like some of us are incompetent but for the most part it's something we want the newbies to think so they can believe "I can do this too", it's not for A-holes to lord over you with no knowledge of how writing a manual works. don't try to gatekeep if you are not even capable of knowing who is this you are gatekeeping.
@krele14
@krele14 Год назад
​@@dimanarinull9122 Hey nice essay scrub, makes you look like a hardcore script kiddie indeed.
@Morraak
@Morraak 3 года назад
And here I just learned how to create a prefab... Awesome video!
@DrakiniteOfficial
@DrakiniteOfficial 3 года назад
This was a VERY good video! I didn't know much about game engines or how it compares to making things from scratch, but this gives some great insight into it.
@mortkebab2849
@mortkebab2849 3 года назад
16:49 It's interesting that the progression of frame time against bullets is roughly a parabola (O(n²) for Unity and a straight line (O(n)) for handbuilt.
@ill4374
@ill4374 2 года назад
In unity - exponential progression. In my opinion.
@molewizard
@molewizard 6 месяцев назад
This is very interesting. Why does that happen? What is scaling at n^2 in Unity?
@Darkcatofmovie
@Darkcatofmovie 3 года назад
RU-vid recommended me this video; it's awesome ! greetings from Argentina !
@RobinCawthorne
@RobinCawthorne 3 года назад
the subtleties were the first thing i noticed. incredible performance increase with code optimisation. nice!
@yasin_karaaslan
@yasin_karaaslan 5 месяцев назад
This video was exactly what I was looking for. Nice clean explanation, such a good video. Thank you!
@thomasipad7719
@thomasipad7719 3 года назад
One of the best videos! Well done :)
@cihadturhan
@cihadturhan 3 года назад
I thought it's a clickbait and started watching this video with a bias but man this is very accurate comparison. Thanks for all your efforts (1084 EU (effort units) for unity and 3638 EU for handbuilt :)
@zigmar7
@zigmar7 3 года назад
I'm quite surprised it only took you ~4x time to do it from scratch. Given how hight level Unity is and complexity of writing shaders and rendering code yourself, I would have assumed different to be at least x50 if not x100. You ml must be really fluent in low level graphical development. For me it would have only taken couple of days reading articles and papers on how to implement basic techniques like shadows and bloom, something we take for granted with high level engines.
@Borgilian
@Borgilian 3 года назад
You see, that's the problem... People think that building a custom engine for your game is useless simply because IT MUST HAVE the same features! It's like an unwritten rule. "Gee dude, you're building a story driven, linear style FPS? ON A CUSTOM ENGINE? BLASPHEMY! You'll never release your game... you'll also have to code features XYZ that allow you to also create a third person camera open world game, because that's what -insert favorite commercial engine here- does. If you don't code those useless features that you'll never need or use, your engine will suck". The thing is, a large percentage of that commercial engine's features are simply dead code for you. What many don't understand is that, if you know what you're doing, it doesn't take that much more time to build a custom engine for your specific use case. Your engine might only be able to do FPS games (if those are the only features you insert), but it's gonna do a MUCH BETTER JOB at running your FPS game, with higher flexibility, than Unity or Unreal will ever be able to. True, the "startup" time of the project (aka groundwork) is going to be higher, but once you have all the basic tools, the overall time of the entire project is gonna match the time it would take to build it in a commercial engine.... sometimes it might even be lower. Not to mention the payoff at the end... having access to the entire codebase, being able to apply quick fixes and optimizations, not being tied to some company, being able to support your game for a long time and having a flexible code base etc. Another benefit is having the possibility to reuse that custom engine / functionality / libraries in the future on another project (no need to rewrite them... simply refine and optimize over time). Also, these big engines are GENERAL USE engines. Meaning they need to have a predefined framework (that most of the time restricts what you can or can't do inside the engine... which sucks big time) that you must respect. If you're trying to do something innovative / groundbreaking / interesting, the engine is going to make it hard to do anything other than generic/standard things for which it was designed. You might end up having to rewrite big portions of that engine trying to build your custom functionality (if you even get access to the engine code), which pretty much defeats the purpose of these big engines, and you might as well have written a custom one in the first place. Not to mention that this is EXACTLY what companies are going through when building their next game. P.S: Even if you use Unity, you'll still have to write your own custom shaders.
@pmoneyish6869
@pmoneyish6869 3 года назад
@@Borgilian I mean some people like to build their own cars so it has everything they specifically want, but most people just prefer buying existing cars because it can get them from point A to point B without them needing to do much work on how it got them there ya know. Their concerns isn't what the car is made up of it's to get them to their destination as soon as possible.
@ZigealFaust
@ZigealFaust 3 года назад
@@Borgilian *laughs in UE4 blueprints*
@Borgilian
@Borgilian 3 года назад
@@pmoneyish6869 I'll let you ponder more on why your car analogy is completely parallel with the idea of a graphics engine (aka dead wrong).
@pmoneyish6869
@pmoneyish6869 3 года назад
@@Borgilian Thanks for letting me ponder on that lol. What kind of pretentious response was that dude?
@raulrivadeneyra4627
@raulrivadeneyra4627 3 года назад
You somehow made a 28 min of nearly just text quite interesting and in part entertaining.
@hugocorreagomez3649
@hugocorreagomez3649 2 года назад
You really convinced me to learn C++ and OpenGL, thanks man 👏🏻👏🏻👏🏻👏🏻👏🏻👏🏻
@astroid-ws4py
@astroid-ws4py 2 года назад
Also check some interesting you low level languages like Zig, Rust, Nim and maybe even Odin, And do not forget after you learned OpenGL to use libraries like WGPU, BGFX or TheForge for cross platform rendering capabilities so you will have a uniform graphics API that targets all of the devices
@astroid-ws4py
@astroid-ws4py 2 года назад
** new low level languages , If I edit my comments to fix a typo RU-vid removes them for some reason.
@badjano
@badjano 3 года назад
this video never gets old
@hvanmegen
@hvanmegen Год назад
Very interesting videos, and I'm commenting on all of them to improve their metrics based on engagement.. thank you for all your effort, I love these videos!
@jomy10-games
@jomy10-games 2 года назад
Very thorough video. I love how you didn’t claim anything here, it’s usually “for this specific game”, etc.
@antipainK
@antipainK 3 года назад
Not gonna lie, making resource heavy application natively would probably make sense, due to performance benefits, but nowadays multi-platform'ality is kinda a must.
@TheR971
@TheR971 3 года назад
Just use SDL and some of the 1000s of libraries for GUI, ECS, pathfinding, etc. If your platform does not have a c++ compiler and SDL support it's probably not worth supporting. Though that said I only have experience with pretty small projects. And never done anything for a console. But another overlooked benefit of your own engine/rendering code is that it all belongs to you and you alone. And it will still work in 30 years when unity might be long dead. (or the effort of making it work will not be insane)
@androidgameplays4every13
@androidgameplays4every13 3 года назад
@@TheR971 Wrong, you must update your engine in order to make it work with new quickly changing technologies, now more than ever, using an game engine is a must.
@Danilocked
@Danilocked 3 года назад
@@androidgameplays4every13 Yeah, his comment doesn't make sense 😂
@SrIgort
@SrIgort 3 года назад
@@androidgameplays4every13 You will also have to update your game to use these technologies lol
@tomasbenders922
@tomasbenders922 4 года назад
This is awesome. I'm positive DOTs will be a nice change, but I'm very impressed by your hand-building! I can't wait to learn to build game engines someday.
@joey199412
@joey199412 3 года назад
You can start now. Learn SDL2 (window manager + sound library and input manager) and OpenGL (learnopengl is a good resource). If you are familiar with C or C++ you can probably build a small first project within a week.
@tomasbenders922
@tomasbenders922 3 года назад
@@joey199412 Thanks! Hadn't heard of SDL before. I don't have any experience with C or C++, but I have spent quite some time in monogame. From what I've read SDL is another step lower than monogame (not sure you'd say it like that). Would be a fun project to learn when I've got time, but I've been planning on learning C++ so that'll have to happen first.
@astroid-ws4py
@astroid-ws4py 2 года назад
@@tomasbenders922 After you learn OpenGL, It is best for you to move to using open source cross platform rendering abstraction layers like WGPU or BGFX, Also use cross platform audio libraries such as OpenAL or others, Enitity component system libraries like EnTT and physics libraries like PhysX or Bullet and others, And after that you will be in a good shape to make your own engines and engines tailored to specific games and use cases.
@tomasbenders922
@tomasbenders922 2 года назад
@@astroid-ws4py I've heard of all except WGPU and BGFX. Been watching some cherno which is fun. Have since been using c++ and opengl, mainly doing basic graphics stuf so I'm on my way :)
@natanaelrabello
@natanaelrabello 3 года назад
Thanks for sharing, really nice analysis.
@kevingardner8609
@kevingardner8609 3 года назад
This is a great video; thank you for this effort.
@Remy-mz5ug
@Remy-mz5ug 3 года назад
Amazing video, thank you!!
@andreasandersson7685
@andreasandersson7685 4 года назад
Thanks for sharing, very interesting results
@Julian_H
@Julian_H 3 года назад
Interesting video, It's cool to see an actual experiment being done on this. It would be interesting to see this done with a bigger project, as I imagine if you utilize more of Unity's features, you'll get less "wasted" memory.
@marcofe82
@marcofe82 3 года назад
Nick, really interesting video. I can define you approach like an engineereistic approach and I find this the best you could have chosen. Thank you so much!I think i will use the handbuild approach cause even if it's longer , I can learn a lot from it.
@Red-di7zb
@Red-di7zb 3 года назад
This is amazing video. Thanks, it was very interesting to watch.
@tehdave192
@tehdave192 3 года назад
Would be interesting to know how this scales going further into the project. Like, does the hand built version count as a lot of groundwork, or does the effort continue to be 4x the unity effort?
@spiritconsumer
@spiritconsumer 3 года назад
Thank you buddy. I appreciate your efforts
@demomanhighunit1790
@demomanhighunit1790 3 года назад
This is absolutely fantastic!
@8bvg300
@8bvg300 3 года назад
Every game studio i worked at used their own engines primarily. Cater it to what you need, genres, etc and then if you are lucky you have an engine which you can try to sell on or share across studios if you get bought out etc. Also, no licensing fees :)
@Scottx125Productions
@Scottx125Productions 3 года назад
True but running your own engine also incurs costs. You need to have engineers to develop it and add new features. And documentation to actually make the engine useable by employees. I worked with the Playstation phyre engine as part of a Uni project and it was one of the worst projects I've worked on. Poor documentation led to frustrating attempts of jerry rigging code together to try and get things to work. Also no 2 engines are equal. One engine might be focused towards FPS whilst another might be focused towards RPG's. Perfect example of when not to use a company made engine is with EA's Anthem. Forcing bioware to use that engine for a game it wasn't suited to, whilst also not having the engineering staff to make proper character creation systems within the engine caused major project issues. Aside from poor management decisions. Unity is great because it's a generic engine, pretty good at everything. Sure it's not the most performant but there's always ways around that. Where as developing your own engine from scratch takes additional time and money, neither of which you might have.
@KasperSOlesen
@KasperSOlesen 3 года назад
Yeah, its pretty much only AAA studios that make custom engines, and when that is not the case it usually means the game is some simple 2D game, or at least a simple 3D game, without advanced physics, animations, graphic effects and so on. There are a few examples where it has happened. Like Serious Sam. But its pretty rare an indie studio uses a custom engine for complex games.
@jackcottonbrown
@jackcottonbrown 2 года назад
"So let's just take a look, in my fancy IDE" *Opens notepad* haha
@emmanuelm361
@emmanuelm361 3 года назад
Amazing work, I followed the whole presentation to the end. You could say that this is a demonstration of what you could realise if money didn't matter 😉
@crowingmurder
@crowingmurder 3 года назад
This was pretty enlightening. Thanks
@bgwg80
@bgwg80 3 года назад
When we need to develop for general purpose, we need to balance between trade-offs. When we develop for single purpose, we can focus on single goal. The latter usually have more opportunity of optimizations. Generally, the observations made in this video makes sense, and I'm not surprised. Unless you have multi-person team that includes non-technical members, for small projects, the handbuilt solution seems the better option. Good to know.
@joey199412
@joey199412 3 года назад
Great demonstration and I appreciate you making this video. Another measure I think would be very important is the amount of development cost both demos would require. Something like (Amount of hours * median game dev salary) for both the Unity and handmade engine. My old manager said it perfectly: Making optimized quick code saves our customers money. Making unoptimized slow but working code saves US money. Thus this metric could argue in favor of using a pre-made engine simply because it's the most economical option. Lack of time and resources are the biggest bottleneck of every software project after all.
@dealloc
@dealloc 3 года назад
It depends on your goal as a business and a company. If your goal is just to use generic solutions for your product, then using pre-made solutions is obviously the way to go. However, if you also focus on other aspects rather than the specific thing a custom solution may be what you need. Pre-existing engines makes a lot of sense for a lot of game studios who just want to make games. But for studios which want to make innovation, they bet on their own engine because they can have control over the technology. It could also be that you want to be in the business of making your own engine, or technology around it.
@sdfsdfs13
@sdfsdfs13 3 года назад
I knew I would love this video, and so I did.
@razvantinca8665
@razvantinca8665 3 года назад
great video thx for all the info.and the part with the fancy IDE made me laugh so much haha
@UnidayStudio
@UnidayStudio 3 года назад
Alright, that's literally one of the best video I found on internet. Well done, please keep it up! Also, you're a very skilled game engine developer :)
@NickCastonNZ
@NickCastonNZ 3 года назад
Thanks for the kind words! I really appreciate it :) I'm glad you liked the video!
@ferroscraft3434
@ferroscraft3434 3 года назад
carai, vc aqui
@leonardomadona
@leonardomadona 3 года назад
I would have liked to see the footage of the c++ version tests
@FamastChannel
@FamastChannel 3 года назад
11:44 ?
@leonardomadona
@leonardomadona 3 года назад
@@FamastChannel Yeah, but i wanna see the framerate in realtime with it shooting 90 000 bullets per shot
@DejaimeNeto
@DejaimeNeto 3 года назад
@@leonardomadona recording software would affect the result.
@leonardomadona
@leonardomadona 3 года назад
@@DejaimeNeto i didn't mean for him to show it as a proof, just for our viewing pleasure of seeing what that looks like
@simoncodrington
@simoncodrington 3 года назад
Great performance comparison. The mixed version from unity that still uses gameobjects is a fair representation of how most developers will start with ECS.
@it_rooster
@it_rooster 3 года назад
Great Video, You did a great job showing some of the Big disadvantages of a game engine vs doing it from scratch. For the people reading this it's important to understand the value of maintainability and the ability for multiple people to work on it at once, as well as the abstraction of ideas. As a sole developer you may be able to get away with understanding every detail, but on a large scale project you would be better off being able to outsource some of the stuff you don't know how to do to either; the engine, or another person. I really enjoyed watching this though!
@TackerTacker
@TackerTacker 3 года назад
Now add the amount of effort it takes to bring a finished game to all platforms to your formula xD
@lordgraga
@lordgraga 3 года назад
This here is the reason Unity is king 👍
@luckylove72
@luckylove72 3 года назад
In modern world you can pay money for lack of skills. Ain’t that a good thing?
@wiktorwektor123
@wiktorwektor123 3 года назад
@@luckylove72 You always paid money for lack of skills or time. It doesn't matter if it is today or was 1000 years ago. Technology changed, professions changed but principle is the same.
@CYXXYC
@CYXXYC 3 года назад
So Unity is pointless when you are doing it single platform? Doubt
@KingJellyfishII
@KingJellyfishII 3 года назад
Zero, if you choose your libraries correctly. I'm writing a game in c++ and (once I got the IDE to work) it compiled just fine on windows (I usually run on linux) and even ARM Linux as well. Of course if you want to go to consoles it will be harder.
@GonziHere
@GonziHere 3 года назад
Thanks for the video, it was something I thought about recently (since my project doesn't really use much from the engine itself). I would maybe suggest some followup where you'll try to implement the bullets (and only bullets) in the optimized fashion in the Unity. I somewhat know the UE and the general workflow is to "build it fast" with the Unreal and then optimize away... just implementing "BulletManager" (instead of bullet actors) will be significantly easier than building the whole solution, but It still might not get as far as your fully native implementation. It would be interesting to see this, instead of the naive unity implementation, so to speak. That being said, would you expect your 3-4x effort ratio to go up, or down if the project would be bigger? I would argue that it might go lower, but I have no real frame of reference for it.
@NickCastonNZ
@NickCastonNZ 3 года назад
Thanks for the feedback! There's definitely a lot of room for other investigations to be done here. In terms of the effort ratio, I don't have any experience with large Unity games, so it's just my thoughts. I expect the ratio would go down as the project gets larger. Getting a 3D animated model running around and shooting is like Unity bread and butter, whereas a lot (not all) of the costs for building from scratch are front-loaded. Later on in large projects is where the lack of control in Unity might start to hurt (e.g. if you start running into serious memory problems). This seems to be reflected in industry with large AAA companies more skewed towards custom engine and indies skewed more towards third-party engine - of course there are plenty of exceptions and lots of factors at play, but it seems to be a general trend.
@donovan6320
@donovan6320 3 года назад
I would argue that depends on what your scope is in this case where it just needs to run on a single system on a single platform it's probably fine. However you do need to keep in mind Many publishers won't take you if you have a custom game engine Because they don't want to have to sit there and port your massive code base to xbox or playstation. Playstation in particular if I remember correctly has their own graphics API. Also it also would depend on how long you've been using the engine and how many engines you've made prior. If this is the 1st game with the engine and you've never made an engine before then trying to create a first person shooter without networking Is going to be a lot more time consuming if you are originally doing a first person shooter with no networking. So I would argue it really depends on what you're trying to do. Not to mention you also have no tooling, Every tool needs to be created by you which can add up But it can also mean that you can streamline your workflow.
@venumspyder
@venumspyder 3 года назад
This is why I coded my own 3D engine in C++ from scratch on my RU-vid channel. Like you I also get massive performance gains even on low end mobile devices.
@ThomasChen-ur2gt
@ThomasChen-ur2gt 3 года назад
very informative, thank you. For the difference of effort, I feel like the difference will be more significant if we include the time to learn Unity/OpenGL if you are not an export.
@joey199412
@joey199412 3 года назад
From my personal experience it's a lot harder to learn unity than it is to learn OpenGL. OpenGL feels like just a library of functions. While unity is a sophisticated tool that makes you feel lost in a forest. If you want to start you can just do so with OpenGL and only uncover features as you need them. With unity though you need to learn how to navigate the entire toolset. How they are used etc which is significantly harder.
@ThomasChen-ur2gt
@ThomasChen-ur2gt 3 года назад
@@joey199412 But unity has a huge community and tons of resources. My experience with OpenGL is limited but I had little place to look for help when in my game engine class when we were using it.
@saltybrick5643
@saltybrick5643 3 года назад
do unreal vs handbuilt next
@sacredgeometry
@sacredgeometry 3 года назад
Its not going to be much if any better.
@mikicerise6250
@mikicerise6250 3 года назад
I'm curious about that, too.
@cagefury3789
@cagefury3789 3 года назад
@@sacredgeometry I don't know about that. Sure it has a ton of overhead (abstraction, generalization, etc) just like Unity, but the user code is also C++ instead of C#. You might be right, but I certainly would like to see the hard data.
@NikolasMauropoulos
@NikolasMauropoulos 3 года назад
@@cagefury3789 Unity has IL2CPP, also unity is made with C++. Sure you would have performance differences, but that mostly comes from memory management which isn't an issue on this scenario .
@cagefury3789
@cagefury3789 3 года назад
@@NikolasMauropoulos Obviously it's made with C++, I specifically said user code.
@celivalg
@celivalg 3 года назад
I usually prefer to go the hand-built route for my projects, just because it's more fun and I get more experience with things I wouldn't have.. Plus I like having more control over my projects, yes it does mean that there a many more ways you can go wrong, but hey, at least now I know I'm actually gaining a significant amount of performances for my work, so it's quite reassuring!
@Micz84
@Micz84 3 года назад
Greate comparison. You had old information about the release date. DOTS was planned to be released on Q1 of 2020 a long time ago, it was pushed back. I think it is possible to write own rendering solution in DOTS instead one provided and reduce memory usage but it would require the extra effort of course.
@ksaweryglab
@ksaweryglab 3 года назад
Brilliant comparison - thanks a lot for this!
@liesdamnlies3372
@liesdamnlies3372 3 года назад
“So we can see the” DING DING “the character” DING “actually a little” DINGDINGDINGDINGDINGDING DING DING DING DING DING
@MotoCat91
@MotoCat91 3 года назад
Alright Mr Salamanca, no need to hurt yourself
@yrds96
@yrds96 3 года назад
look like a berserk episode
@davel101
@davel101 3 года назад
Thanks for this Nick. I did the same a while back when deciding to write a 2d game that's been in my head for 10+ years. I'm not a coder but know how to code, I'm old school (z80, 6800, Cobol, c, c++ and c#) and as such struggled with Unity structure. That said, I was prepared to learn Unity but wanted to make sure I was making the right decision as I had heard that performance was an issue for Unity. I did what you did but with not as much detail, I just wanted to know about memory usage and fps. I was so surprised by my results that I was sure that I'd made a mistake because the Unity results were so poor. Granted that this was a few versions of Unity ago but I'm glad that I decided to use c++ although writing a UI library sucked but I won't have to write one again. I used DirectX 11 with DirectXTK to aid with maths and audio. I'm not scared by the low-level nature of DirectX but I do understand that this scares a lot of people which is why Unity is great at hiding it all. Unity is great if you're not an experienced programmer or want to prototype something, but if want to write a complicated game, either in graphical or data detail, it may struggle. I'm aware of a few teams that had to almost start again as they couldn't get Unity to perform as desired, even sending their codebase to Unity didn't help.
@NickCastonNZ
@NickCastonNZ 3 года назад
Really cool to hear about your journey. Thanks for sharing! It's interesting to hear you went down a similar path and reached a similar conclusion. I'm also glad I went down the C++ path for my game, but I do totally understand the case for using an existing engine. Good luck with your project!
@senpaimememaster9202
@senpaimememaster9202 2 года назад
Thas awesome
@tanura5830
@tanura5830 2 года назад
Unity has bad performance for 2D why didn't you try out 2D game engines
@konstantinlevin5582
@konstantinlevin5582 3 года назад
Awesome compare!
@qbroms4
@qbroms4 3 года назад
love your content. Could you make another one of these, maybe go a lite bit more in-depth on how your handbuild vision works. And I would love to see how the two compare when the projects are a little bit more complex. All tho I understand that it takes a lot of effort.
@NickCastonNZ
@NickCastonNZ 3 года назад
Thanks for the feedback! I'll keep those ideas in mind when I get around to making the next one of these
@BjornMoren
@BjornMoren 3 года назад
Interesting, thanks for making this video. Ok so you spent 3-4x the time to make it work from scratch. But then you'll also have a code base to reuse in future games, you basically have a mini game engine you can reuse. So for the next game it will maybe take 2x the time compared to Unity. And then continue to be smaller for each project. I almost always code my stuff from scratch for this reason. You cut away the bloat, you get better performance, and you'll learn more too. But for something simple that doesn't require high performance, Unity is of course the way to go.
@kinguitar1987
@kinguitar1987 3 года назад
I wonder if this result scales. In my opinion, it does not. The effort can be 3 times for a small project, but it can be much greater for a more complex / complete game. The other thing that must be taken into consideration is that it is much easier to train someone to be Unity programmer than to be an C++ game programmer. The real effort is the cost of building that and it will be more costly to pay someone to build it from scratch than to use Unity. The last point is that you are cloning a project that was built on Unity. A fair comparison would be using a design document as reference. The good thing about engines is the ability to iterate over ideas, because you have access to a lot of resources and prebuilt components. Doing stuff from scratch with an ambiguous goal is very challenging.
@Radgerayden-ist
@Radgerayden-ist 3 года назад
To your first concern, I agree. But for small games (the kind you would make on your own anyway) and for specific genres (not asset heavy/procedural, mechanics focused for example) your own engine can still go a long way. About writing C++, you can very easily hook something like Lua into your own engine if you have more design/gameplay focused programmers in your team that you wouldn't want to be concerned with engine code.
@Lubieerror
@Lubieerror 3 года назад
​@@Radgerayden-ist On the other hand I'd say it also depends. If you have small team without much game engine related knowledge it's still might be worth to use Game Engine just because nowadays there isn't much difference if a game need 55 or 500... even about 800 MiB of RAM should be ok. It's because it "steals" your focus. It's not something running in the background that uses resources that other application could use.
@ded5736
@ded5736 3 года назад
You mentioned c# runtime. It would be interesting to see how this performs on IL2CPP
@dudenarima2528
@dudenarima2528 3 года назад
really good interesting pleasure to watch it thx dude
@381delirius
@381delirius 3 года назад
Vulcan: hold my beer.
@c0mbine536
@c0mbine536 3 года назад
yeah why he not using vulkan it does have lower performance on handbuilt?
@igorgiuseppe1862
@igorgiuseppe1862 3 года назад
@@c0mbine536 because its fucking hard.
@Lord2225
@Lord2225 3 года назад
@@igorgiuseppe1862 Vulkan is simpler and more fun than OpenGL. But for maximum performance it is just as complex as the dx12. But still Vulcan loves to work with high level C++ and std. OpenGL looks more like "uglest" C.
@Navhkrin
@Navhkrin 3 года назад
@@Lord2225 Vulkan is simpler than OpenGL? As far as i peeked, it looked significantly harder. If you have any good sources for learning Vulkan please do share.
@Lord2225
@Lord2225 3 года назад
​@@Navhkrin ​ @Navhkrin I used to learn from source. It wasn't my first graphic lib and all of them usually repeat same pattern so it wasn't so hard to learn for me. For someone that is new in CG learining vulcan from doc could be confiusing. Form my perspective it is more modern, gose with trends and it is intuitive.
@ibrahimrashwan
@ibrahimrashwan 3 года назад
Did you tried various performance tricks on unity before the build to sqeeze as much performance as possible same on the handmade build
@incole7041
@incole7041 3 года назад
Apparently, no. He thought that this sample project is the most optimized implementation of shown gameplay that Unity can make. It's sad to see how many people see this as a good comparison.
@nikhiltaneja6673
@nikhiltaneja6673 3 года назад
Great work on the hand built version. Just wanted to know while counting the performance of unity did you build and exported unity project OR you were running it inside editor only. There can be a significant difference between the two
@NickCastonNZ
@NickCastonNZ 3 года назад
Thanks! The Unity numbers were done from an exported release build of the game.
@acoolh2o
@acoolh2o 3 года назад
Hi - Thanks for the video. I enjoyed it and was easy to understand. Reminds me when using Frontpage(Dreamweave, etc) vs coding in html. Always preferred doing it by hand, especially when problems arose. Feedback - just a small point, would have liked to see a side by side comparison of the video game play footage. That would be a nice visual comparison.
@darrengrant8598
@darrengrant8598 3 года назад
The exponential growth in frame time in the Unity version doesn't seem to correlate to any of the other metrics gathered. I wonder what is causing that? Is it possible, for example, that something like lighting per particle in the Unity version is leading to some material*light complexity? (What happens if particle lighting is disabled?)
@user-lz2mu9uq4e
@user-lz2mu9uq4e 3 года назад
It's RAM bandwidth. You can't see it so it's ULTRA hard to find out and prove.
@f.f.s.d.o.a.7294
@f.f.s.d.o.a.7294 2 года назад
I was thinking it might also be an issue of CPU cache being exhausted at a certain point. Once CPU cache is exceeded for the critical code/data paths, you can really hit a performance wall. So, related to RAM bandwidth in the previous reply, but closer to CPU cores.
@OmegaF77
@OmegaF77 3 года назад
*Nobody:* *A-10 Warthog:* 12:02
@leonlysak4927
@leonlysak4927 3 года назад
This was enlightening
@douglasleathes9853
@douglasleathes9853 3 года назад
Very interesting video. I may have missed it but are the games being run in the game development studios or have they been built out, would be interested in the difference there.
@CyberQuickYT
@CyberQuickYT 3 года назад
A note for those who want to benchmark something: closing applications often isn't enough, from my experience even windows downloading an update can take up 30% of CPU. Just pause updates and check that there aren't apps that use much of system resources
@franchocou
@franchocou 2 года назад
He can code low level, what make u think he didn't know that?
@seraaron
@seraaron 3 года назад
I was not prepared for 12:00, I almost spat my coffee and laughed so hard my split lip started bleeding again! 😂 ouch
@owdoogames
@owdoogames Год назад
"It still performs pretty well" Unleashes bullet hell Armageddon.
@georged8644
@georged8644 3 года назад
This was a very interesting result for a single very simple level of an extremely simple game. How do the performance and work required metrics of the two techniques, Unity vs Handbuilt, compare for more complex games with many types of enemies, many types of weapons, and multiple complex environments organized into many different maps?
@simaocouto8106
@simaocouto8106 3 года назад
Unity: Q1 2020 full release Me in 2021:
@DanBrinkman
@DanBrinkman 4 года назад
Very cool! Any chance of posting the source of the handbuilt?
@NickCastonNZ
@NickCastonNZ 4 года назад
Sure! I'm traveling at the moment so I'll upload it in a few days. I'll admit it's pretty messy though 😅
@NickCastonNZ
@NickCastonNZ 4 года назад
I've uploaded the code to github github.com/ntcaston/AngryGL Reader beware you're in for a scare. I'll admit I didn't originally write it with the intention of anyone else reading it, so it might not be the cleanest. Regardless, I hope you find it useful!
@lm1338
@lm1338 3 года назад
​@@NickCastonNZ `void drawWigglyBois` 🤔
@NickCastonNZ
@NickCastonNZ 3 года назад
@@lm1338 wiggly bois gotta wiggle
@_not_real
@_not_real 3 года назад
My opinion on this (that this video also seems to support) is that pre made high level engines like unity are useful for smaller projects or prototypes, where it's mostly important to get the project working without it taking too much time and effort to make, while making a project from scratch is better for more advanced projects where optimisation is important.
@mikicerise6250
@mikicerise6250 3 года назад
Wow, that is a huge difference.
@kyleleblancvlogs3820
@kyleleblancvlogs3820 3 года назад
Did you ever consider comparing unreal engine 4 with c++ to unity and the hand-built? Would be fascinating to see how ue4 compares using c++ as opposed to handmade c++
@joey199412
@joey199412 3 года назад
It isn't the C++ that provides the speedup. Sure there's some overhead it removes from the C# runtime stuff but the real gain in performance is because you remove the overhead of engine features you're not really using but are still being applied behind the scenes. UE4 while performing better in optimal cases than Unity would still perform significantly worse than a special made engine for a single task.
@osamabahrouz3069
@osamabahrouz3069 3 года назад
Jim Browning's doing this now huh? For real he sounds really like him
@TheJeffybarrondo
@TheJeffybarrondo 3 года назад
I thought the same thing
@mahmuddin4226
@mahmuddin4226 3 года назад
That was awesome.
@samserious5483
@samserious5483 10 месяцев назад
Very interesting, thanx!
@andrew.r.lukasik
@andrew.r.lukasik 4 года назад
Thanks! Interesting comparison. Sour but needed reality check for state of DOTS. I'm aware of few optimizations that Unity version could employ (stripping bloat of data from bullet entities and changing how instancing happens to be more memory-friendly) but for sake of performance-vs-productivity comparison this is still a valid sample project to test.
@alterWarOfficial
@alterWarOfficial 3 года назад
are we all just skip the fact that unity uses a fully fledged particle system while he just renders some sprites for his guns?
@csakdee
@csakdee 3 года назад
exactly the comment i was looking for... awesome results and video, but still feels like comparing a "recorded video" with a "real time rendering" as for "particles system vs. sprite(sheet)"
@csakdee
@csakdee 3 года назад
@ i understand Your point and don't want to be too nit-picky, but since the video argues performance of a "pre-built vs handmade", it's not about being more clever and creative - it's about how a custom build can be less bloated than a "one size fits all".
@csakdee
@csakdee 3 года назад
@ i think we speak about different things here... @AmazingTurtle and me where merely pointing out the fact that without using the same techniques the comparison will be always a bit flawed, fruits against vegetables.
@superscatboy
@superscatboy 3 года назад
Isn't that kind of the point if the comparison? It shows that if you strip out 99% of the stuff you aren't using (a fully fleshed-out particle system) in favour of just the 1% you aren't using (a few triangles), you get better performance. I'm sure he didn't write a fully fleshed out general purpose physics system either, and again that's the point. It shows the significant runtime performance gains to be had by paying for it at development time rather than letting the user pay for it at runtime. It's all about the trade off.
@ffr4314
@ffr4314 3 года назад
And that's the reason that the graphics are improving more slowly. Because games are becoming more demanding due to easy production, using ready-made algorithms, and hardware is also becoming more powerful. This does not greatly benefit end-users, but it becomes easier and more profitable for developers, especially indie developers.
@novaria
@novaria 3 года назад
Subbed instantly.
Далее
Unity DOTS vs Assembly Benchmark - Which is fastest?
30:34
Are great games being ignored? An investigation
20:42
Просмотров 763 тыс.
1 Year of Indie Game Development - Starmaul
14:39
Просмотров 24 тыс.
One year of my C++ SFML journey
5:39
Просмотров 396 тыс.
Non-Euclidean Worlds Engine
5:15
Просмотров 11 млн
маленькие кошмары #вайб
4:9:33
Просмотров 427 тыс.