Nested For Loop Optimization - Flat Asteroids [06]

preview_player
Показать описание
Optimize the main physics collision and resolution loop so we are checking every entity against every other entity exactly 1 time.

Рекомендации по теме
Комментарии
Автор

Wow, such a simple change and it's so much more efficient

jiwaeics
Автор

a really great approach to learning the best way of optimize the code Thanks for contribute public salute to your work

shorabrustam
Автор

i was just wondering how to get rid of nested for loops, but it turns out that we don't have to. We just have to modify it, lol, thank you man!

MrRetroVinyls
Автор

Awesome video! I'm wondering if this method could be uesd to improve a three-layer nested for loop.

andretseng
Автор

How will that work with an uneven array like an 2000x1900 image?

kemerios
Автор

The extra 0.0666 comes from being able to skip that last "column". So 465 is (31x30) / 2.

Markyparky