RunFaps
shaunjs
shaunjs patreon

Multiple Collisions Tutorial

🕑 Added 2018-08-08 14:06:25 +0000 UTC
Multiple Collisions Tutorial

Comments

weirdly repeat has proven faster than for loops when tested! This does contradict the theory of these tools and Mike D himself has suggested for loops should be used when you have an incrementer like this but funnily enough, tests have shown otherwise! It's marginal though, I mostly like to just demonstrate different ways of doing things where possible to build up that toolset in people's minds.

Hey Shaun, I was wondering if there is any particular reason why you used a repeat loop and not a for loop? I may be wrong, but wouldn't it be more performant if you would use a for loop and with that are able to realize the code without the need to delete items from the ds_list? Like: for(var i = 0; i < hitcount; i++){ with(ds_list_find_value(_hitList, i)){ if(i == 0) image_index = 2; else image_index = 1; } } or am I missing something?


More Creators