Creating a third-person zombie shooter with DOTS - Unite Copenhagen

  Рет қаралды 47,028

Unity

Unity

Күн бұрын

Far North Entertainment is working on a third-person zombie horde shooter using the Data-Oriented Technology Stack (DOTS), which has brought great performance improvements and influenced the development team's mindset to be more data-oriented in general. This beginner to intermediate level talk explains why DOTS is able to process data much faster by examining two specific implementations within the game. It also gives a concrete example of how DOTS can be implemented as part of an otherwise traditional Unity application.
Speaker: Simon Eliasson - Far North Entertainment
Learn more: on.unity.com/37DOzWF
Slides available here: www.slideshare.net/unity3d/cr...

Пікірлер: 55
@Ne0mega
@Ne0mega 4 жыл бұрын
My favorite part is definitely when he gets down to L1 cache amount and explains the exact amount of memory needed. It appears a Unity transform takes 36 bytes (1 float = 4 bytes, position, rotation and scale take 3 floats each, so 12 x 3 = 36) of memory in L1 cache. (not that it matters, since it takes up the entire L1 line of 64). With ECS, you calculate take what you need/want to change. in 3d games that is usually only 3 floats for position (xyz) and a rotation around Y axis, for a total of 16 bytes. (he is only using 12 bytes because his game is 2d, so he also does not need the y position). Things like scale rarely change, so you can have varying scales on your entities, but that doesn't matter, because you aren't changing them, so set up your system to only calling the entities xyz positions and their y rotation. Yeah, I think that's when the lightbulb on this ECS thing finally went on. Thanks Simon Eliasson.
@Bunji2k6
@Bunji2k6 4 жыл бұрын
Excellent presentation. I can't believe that this was his first time presenting. Very calm and collected. Didn't rush or stutter. And they packed in so much information in a fairly short time. I haven't even watched the whole video, but I'm just very impressed. Bra jobba!
@armpap1
@armpap1 4 жыл бұрын
By far the best presentation on DOTS. Short, concise, explaining the whys and giving intuitive tips.
@cfffba
@cfffba 4 жыл бұрын
The best talk so far.
@Hawkadium
@Hawkadium 4 жыл бұрын
Im surprised people aren't cheering and clapping for that performance gain.
@tiredlocke
@tiredlocke 4 жыл бұрын
Right!? Is his audience asleep? I get that things like this are often contrived examples, and 2250x performance gain would not represent any actual real-world results. But still! If all of this could realistically give a simple 10x performance boost over the traditional methods in Unity and effectively use all the compute power in a high-end multicore device...it could totally transform Unity. His audience must be asleep. *yawn*
@Chris_t0
@Chris_t0 4 жыл бұрын
@@tiredlocke Asleep? no this is just old information, its not as exciting anymore
@Hoowwwww
@Hoowwwww 4 жыл бұрын
​@@tiredlocke this is called respect, they wait for the presenter to finish his presentation before applauding in Europe interrupting someone who presents his work is seen as disrespect
@Hoowwwww
@Hoowwwww 4 жыл бұрын
you see that in Asia too
@tiredlocke
@tiredlocke 4 жыл бұрын
@@Hoowwwww Lol. Oh, right. Because people in "Europe" are homogeneous and do everything the same way, and they are so different from Americans. All Europeans are just so classy and respectful.
@lumeronswift
@lumeronswift 4 жыл бұрын
This makes a lot of sense - one of my first questions that came to mind when I started game development was about the overhead of each of the "on_update/_process/_physics_process" call added per game object.
@ahappyharry5177
@ahappyharry5177 4 жыл бұрын
How did you work with animation on ECS?
@simoncodrington
@simoncodrington 4 жыл бұрын
Great video mate. Really keen to see more real world examples of ESC / DOTS and the performance gains you can pull from using it.
@StephenWebb1980
@StephenWebb1980 4 жыл бұрын
awesome. I've been examining the use of DOTS for a mount and blade / Total war style hack and slash...though I'm having some trouble with wrapping y head around the animation component implementation as well as how to get the characters to attack preferred targets with an equiped weapon...
@peterpavlin6715
@peterpavlin6715 4 жыл бұрын
Thank you, awsome talk, by far the best DOTS example I've ever seen. Very informative, I've learned a lot.
@Carrion-Crow
@Carrion-Crow 4 жыл бұрын
HOW to make animation system in DOTS technology???
@musabkara1684
@musabkara1684 10 ай бұрын
Really nice presentation 👏
@r1pfake521
@r1pfake521 4 жыл бұрын
I would love to see how the handled the pathfinding of all these units with ECS.
@bernardo_olafson
@bernardo_olafson 2 жыл бұрын
there was mentioning that the pathfinding is done on server side, so the client just receives a current and.a target position for the enemies and interpolates the position between them. no need for pathfinding with ECS in this case.
@phobos2077_
@phobos2077_ 4 жыл бұрын
What I don't understand is how to do collisions and animation for ECS entities. How do I make ECS objects collide with non-ECS colliders?
@letai1776
@letai1776 4 жыл бұрын
This explained the whole thing better than all of the official document.
@sabaa.vahidi9097
@sabaa.vahidi9097 4 жыл бұрын
i was struggling with raycasts in dots for the last 4 hours,hope this video is a saviour
@clipartinc
@clipartinc 4 жыл бұрын
That game looks amazing!!!
@gregoryfenn1462
@gregoryfenn1462 4 жыл бұрын
The 27:40 reveal made me gasp. I'm trying to learn DOTS asap. Any game build using classic OOP in a few years will feel sluggish and unresponsive compared to what a DOTS-based application can run at.
@MalikenGD
@MalikenGD 4 жыл бұрын
It's insane. 9ms (or 9ms*10) down to .04ms. INSANE
@Chris_t0
@Chris_t0 4 жыл бұрын
Not true most games dont need this much CPU usage, most bottlenecks are GPU related
@gregoryfenn1462
@gregoryfenn1462 4 жыл бұрын
Chris true but it’s hard to deny that CPU work can be improved from our current OOP approach.
@gregoryfenn1462
@gregoryfenn1462 4 жыл бұрын
Chris -0 also you’re assuming the application uses heavy gpu work. Some simulation games don’t need much graphics work at all but invest heavily into simulating thousands of independent objects interacting. Also some machines, such as most MacBooks, don’t even have GPUs, they just use CPUs to compute graphics.
@asiseverything3404
@asiseverything3404 4 жыл бұрын
not just performance, even if it is elephant in the room. I actually like the way of writing the code. it is much more intuitive than oop (with games this is case, not sure about softwares) if you have right mindset. want something to behave that way?add that component, which holds data to achieve the behavior. system will do the work.
@romanjambor4505
@romanjambor4505 2 жыл бұрын
Nice presentation. Just.. I was a little confused when he was talking about CPU caches and 3 floats and in the picture there are 12b (bits). Images are wrong. b = bit, B = byte. He is talking about bytes.
@rustyryan4473
@rustyryan4473 3 жыл бұрын
Anyone know what the intro song is?
@nakkalokesh725
@nakkalokesh725 4 жыл бұрын
i feel like unity achieving ultra instincts
@Umer-
@Umer- 4 жыл бұрын
Wow!
@ConAim
@ConAim 4 жыл бұрын
Any sources or examples for testing purpose?
@mikejlr
@mikejlr 4 жыл бұрын
genuine question, how is this different to implementing a pooling system in non ECS?
@kayomn
@kayomn 4 жыл бұрын
One of the ways ECS gets its performance benefit is from memory alignment and data locality. As C# classes are reference types, they can each be stored anywhere in memory. C# structs, however, are value types and due to this when they are stored in linear collections they are tightly packed and located next to each other in memory. This allows the hardware to pre-fetch entire buffers of data at once into a higher order of memory built into the CPU for quicker data interaction. There are other things DOTS does such as avoiding lots of virtual functions but data locality is definitely one of the big ones I would say.
@mikejlr
@mikejlr 4 жыл бұрын
@@kayomn I'm aware of that - I was mostly talking about the first half of the talk where he mentions the performance of using Instantiate to make his trees, which is obviously a bad idea. I'd be interested to see a comparison between the ecs and a more traditional pool. I'm still blown away by the burst compiler in the second half though.
@kayomn
@kayomn 4 жыл бұрын
For a pooling system versus Unity's ECS? That difference would depend on the pooling implementation, would it not?
@shunia
@shunia 4 жыл бұрын
I think he's talking about per frame update performance, not creating objects. So pooling won't work here cause it's totally about looping all these objects.
@mrvzhao
@mrvzhao 3 жыл бұрын
So, DOTS lets you use the CPU the same way you would use a GPU. If you've done things like CUDA before, this will all feel pretty intuitive.
@SlayPlenty
@SlayPlenty 4 жыл бұрын
The hillarious thing is they could just take the n of enemies down and have destructable enviroment Have interesting mods that could make the guns behave more like weird poe or diablo skill manipulators. And have the same performance maybe? Like a shotgun whos bullets explode at the end of their range. Or maybe a lazer that leaves a trace of fire a gun that fires guns that explode when empty crazy things
@farnorthentertainment7518
@farnorthentertainment7518 4 жыл бұрын
Why not both? ;)
@diliupg
@diliupg 4 жыл бұрын
The first view! :) :)
@erikpro0073
@erikpro0073 4 жыл бұрын
ECS + Jobs + Burst Compiler + Quantum Computers = ?
@modernkennnern
@modernkennnern 4 жыл бұрын
That's not third-person though? That's birds-eye view, although I guess that's technically 'third person' but I wouldn't call it that.
@0FOCUSS
@0FOCUSS 4 жыл бұрын
i really dont think thas the thing you should be focusing on
@gregoryfenn1462
@gregoryfenn1462 4 жыл бұрын
This is about DOTS and a new, thousand-fold improvement in code execution time kenny. No one cares about the pedantic details of game design terminology at the moment.
@phirewind
@phirewind 4 жыл бұрын
Bird's eye view, satellite view, side view, or over the shoulder, is all "third person" The location of the camera is not inherent in the concept, just that the camera is not the perspective of the character being controlled. You are likely thinking of over the shoulder, which is a specific third-person perspective, but not the only one.
@0x1337feed
@0x1337feed 4 жыл бұрын
i mean he's right LOL
@lieQT
@lieQT 4 жыл бұрын
First person means from the perspective of the person. Third person means from an outside perspective. That includes birds eye view, it's a third party view, as if you were a bird watching.
@oOcrashOo.
@oOcrashOo. 4 жыл бұрын
The moment when you realize that the fancy sh*t everyone talks about is something good programmers do since years.. lol. I guess the world would be a better place when people would start learning programming in assembler and not unity's gameobject/component system.
@spiral9316
@spiral9316 4 жыл бұрын
This talk it's baseline good. But it doesn't say anything new or that we couldn't very easily abstract from other more 5 or 10 official talks simply about the same theme: "our implementation of the ecs system" others have even been more in depth. I would prefer more talks about syntax and hands on tutorial that you can follow coding along the presenter. I applaud every new ecs related video, but the title it's very misleading. Like a vulgar KZbin tutorial with very low interest in actually sharing the knowledge but only interested on mechanically completing the task. It's should be more like "how we gained more performance with our dots implementation". Three title make it look as a tutorial, but they deceptively put it knowing that ambiguity. It just makes me angry, this presentation could have been much better, I can see that the presenter is not lacking in ability. It just feels like he's morally down for some reason. *Sigh* I'm just expecting I don't know.. like lucas meijer coming up and talking about his new anti boiler plate way of writing the dots way. They guy could have posted the video like on KZbin on his personal channel. But I don't think what he showed and how he showed isn't on part on what one should expect on the unity channel. After everything I consider just something positive unity opens his doors to people to talk about ecs, but I would expect for him to put more soul into the damn thing. One thing which is due it's his page about memory chunks and I can see he has a real compromise with understating what's he's using and it's one of the downfalls of him in this presentation.. I feel he let him that take him away from his main plot line. He kinda dropped down the ball mixing the two senses; 1 of understating the architecture and two of making the game. This guy could have been more better, but I understand it's actually, some times really hard to be soo good. I'm, you know, just kinda mad he had the ball !! wish him success with his game and he better gets his presentation better the next time ! >:). He should've taken more risks explaining things in a different way and talking more about things he doesn't yet not understand completely. even if they could have make him look dumber. You know maybe I should check that discord.. And I don't like having to use discord. When I get to understand this performance system, I'll make my OWN KZbin video and it's going to have quirky jobs as genius development, along with heroic architectural archivements. And in going to be cool and oh soo cool about it. You'd wish you be me! And my hand it's going to be super fun, and the story it's gonna make you cry but you'd wish you live longer to experience this better view in life you gained playing my game. The best, man. I tell you!. And it's going to have a thousand likes. Just so you know.
Options for Entity interaction - Unite Copenhagen
43:12
Unity
Рет қаралды 27 М.
Getting started with Burst - Unite Copenhagen
38:30
Unity
Рет қаралды 18 М.
Monster dropped gummy bear 👻🤣 #shorts
00:45
Yoeslan
Рет қаралды 12 МЛН
THIRD PERSON MOVEMENT in Unity
21:05
Brackeys
Рет қаралды 1,4 МЛН
Making MULTIPLAYER Games has never been EASIER!
12:49
Code Monkey
Рет қаралды 71 М.
Best practices: Async vs. coroutines - Unite Copenhagen
42:54
Converting scene data to DOTS - Unite Copenhagen
39:59
Unity
Рет қаралды 26 М.
Coding Adventure: Boids
8:35
Sebastian Lague
Рет қаралды 1,5 МЛН
Introducing the new Input System - Unite Copenhagen
44:48
Overview of physics in DOTS - Unite Copenhagen
45:49
Unity
Рет қаралды 19 М.
Any Sound & Call Recording Option Amazing Keypad Mobile 📱
0:48
Tech Official
Рет қаралды 325 М.
How about that uh?😎 #sneakers #airpods
0:13
Side Sphere
Рет қаралды 9 МЛН
Вы поможете украсть ваш iPhone
0:56
Romancev768
Рет қаралды 533 М.