Basic Flocking Optimization - Android Build - 20000 Boids - Unity ECS/DOTS
Hi there!
In this video, we are going to look at ways to optimize flocking behaviour and run it on my Android smartphone to see how far our performance tuning can take us.
We will focus on the following areas -
Usage of BLOB asset store to store parameters that stay constant during the gameplay - this will make sure all the boids are referring to the same memory block where these parameters are not duplicated in every boid.
Limiting the iteration - When the boids are close to one another / when they are clumped together, the code will have to iterate on a lot more boids than necessary - every frame - which results in rapid frame drops. We will incorporate a simple logic to limit these iterations.
Field of view - If we are choosing a limited number of boids around a given boid then we will make sure we pick the most relevant boid by defining a field of view - in a way only boids in front of a given boid swept along the field of view are considered.
I am sure this can be pushed further and the system can be better optimized by introducing algorithms like particle swarm optimization / genetic algorithms and also by writing even more optimized code.
Though these methods might - in some cases - provide marginal performance improvement, at the least we know where the bottleneck is - Iterating and pushing boids into a cell. It would be ideal to register only boids that matter in a cell and implement a quadtree for quicker convergence.
Scalar projection - https://www.youtube.com/watch?v=_ENEsV_kNx8
BLOB Asset Store - https://www.youtube.com/watch?v=7_rZhp6V8ds
Source code -
https://github.com/ForgingStation/Flocking-Optimization---20000-Boids-on-Android-Smartphone
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Basic Flocking Optimization - Android Build - 20000 Boids - Unity ECS/DOTS», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.