Тёмный

Sync Points: The Silent Killer of ECS Code - Unity DOTS Tutorial [ECS Ver. 0.17] 

Turbo Makes Games
Подписаться 26 тыс.
Просмотров 4,4 тыс.
50% 1

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

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@TurboMakesGames
@TurboMakesGames Год назад
❗❗ *Caution:* This video was made using an older version of Unity ECS. While the core concepts remain the same, some of the API and workflows have changed as of ECS version 1.0. I would recommend checking out my ECS 1.0 tutorial video for a good overview of the latest standards for Unity’s DOTS: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-IO6_6Y_YUdE.html Once again, the theory behind the concepts of this video are still relevant, however the API has changed. Stay tuned for further updated videos on this subject. Please let me know if you have any questions either here or in our Discord community: tmg.dev/Discord
@relampagomarquinhos6907
@relampagomarquinhos6907 2 года назад
Great video, ECS have a lot of peculiarities, and it's hard to find content about it. Thanks for the well explained content!
@TurboMakesGames
@TurboMakesGames 2 года назад
There are definitely a lot of quirks and different ways you can do things for different situations - certainly fun to pick it apart, glad you've been enjoying!
@matanyamin1
@matanyamin1 Год назад
Great quality video, thanks! Does using EntityManager.SetComponentData(entity, component); also create a sync point? Or only changes in shared component data?
@TurboMakesGames
@TurboMakesGames Год назад
Good question! This does not create a sync point because it is not changing the data layout in the computer's memory. However, just keep in mind there still may be issues with job dependencies if you are trying to read from a component type in one job and writing to it in another. Unity typically keeps track of all that scheduling though. Hope that helps!
@masupilami4014
@masupilami4014 2 года назад
Can you make a video about the DOTS Animation System please? (how it works, what is the state of the package..). I think there is not too much "public" information about the package. :)
@TurboMakesGames
@TurboMakesGames 2 года назад
It's on the list for sure
@hhgnehcom7672
@hhgnehcom7672 2 года назад
@@TurboMakesGames and something about render
@ArnCiS96
@ArnCiS96 2 года назад
Also I interested is possible to make character cloth customisation system.
@vildauget
@vildauget 2 года назад
A little clarification, as this got me curious - when you say all jobs have to complete at sync points, I believe it's narrowed down to jobs accessing entity data. Within ECS this will be mostly true, but on the other side it can be of importance to realize that it's possible to create (really big) jobs where you handle any dependencies yourself, and these can run for longer than a system's re-run time (usually frame time), by checking the job's status at the start of your system, before using the data, and maybe schedule the next job.
@TurboMakesGames
@TurboMakesGames 2 года назад
So you're saying that if you handle the dependencies yourself, sync points won't force completion of those jobs? Or just the ones where no entity data is used?
@Nastomeya
@Nastomeya 2 года назад
ECS is completely different world to explore from the traditional one.
@TurboMakesGames
@TurboMakesGames 2 года назад
No doubt. It's fun a fun one to dive into and experiment with though
@vmb326
@vmb326 2 года назад
Very interesting - but I have a question or two. I know this is a tutorial about sync points but I'd love to know where the time is being spent... if you took away the float math so no cubes were actually moving what frame rate do you get... then replace the current time with a pre calculated height and rotation lookup... so its removing all the math and pre generating the sinewave/and circular motion with a buffer lookup. Then you aren't calculating more than one wave length of math. Just a thought. But yep I like the threading example nice!
@TurboMakesGames
@TurboMakesGames 2 года назад
That's an interesting thought - I suppose it would be different and could be more or less performant that could vary with entity count. For one, you're reducing CPU cost by not calculating any data, but you do have a memory cost of having to do a random-access lookup.
@nomadshiba
@nomadshiba 2 года назад
talking about sync points i have a terrain mesh that i generate on cpu using Unity Jobs. but i lost most of the time while im applying the result of the job to a mesh on main thread. im using quad tree while generating the terrain. and the job can take multiple frames to complete. i was wondering what's the fastest way to continuously generate and update a mesh in ecs. additionally, i was also thinking about generating terrain on gpu using shader graph or other. but im not sure if it's possible to do colliding with it cpu side and tell what kind of material im on, on the terrain like, is it snow, is it stone, is it grass.
@TurboMakesGames
@TurboMakesGames 2 года назад
That's a good question, I'd probably have to do more research of my own to figure out the best options available, but off the top of my head - is it possible to break up your large mesh into sections and then only run the continuous generation on 1 or a few sections at a time? You could then only update the sections affected by outside force, or batch it up so you only update a few sections each frame, but you cycle through them so after a few frames they are all updated. You could even prioritize the ones closest to the player/camera so those are always up to date each frame.
@nomadshiba
@nomadshiba 2 года назад
@@TurboMakesGames Actually the terrain is a planet, i have already divided it into multiple sections, they all being updated async and every frame i check if they are completed and i update the mesh for completed ones that frame, i have a limit tho, it only updates 8 section at once max on one frame. Tbh when i think about it, sections with less detail might be filling up limit for that frame, since they are being completed fast. i should probably prioritize them based one their detail/vertex count as you said. Also when sections are being updated async gaps are appearing on the terrain if the player is moving, since the quality is changing for each section async. this can be fixed with skirting probably tho. I'm gonna rewrite the whole thing soon, just trying to gather as much information as possible. I have a video on my second channel that i created yesterday.
@TurboMakesGames
@TurboMakesGames 2 года назад
@@nomadshiba Sounds great, feel free to share that video with us over on Discord! Would be super interested to see how you set this up 👍
@Tetro48
@Tetro48 2 года назад
hi!
@TurboMakesGames
@TurboMakesGames 2 года назад
Hello!!
Далее
Unity DOTS - What Games Can You Make with ECS?
9:40
Просмотров 4,1 тыс.
Китайка нашла Метиорит😂😆
00:21
The GIGA JUKE is dead.
28:02
Просмотров 73 тыс.