Thread:Talk:BasicSurfer/Simple Bullet Shadowing Surfer/reply (2)

From RoboWiki
(Difference between revisions)
Jump to: navigation, search
m
m
 
Line 5: Line 5:
 
:BTW, anybody setting wave dangers as done below?
 
:BTW, anybody setting wave dangers as done below?
 
<pre>
 
<pre>
Position danger = (1 - (bulletPassed ? 1: chanceOfBulletCollision)) * dangerWithoutShadows
+
Position danger = (bulletPassed ? 0: chanceOfBulletCollision) * dangerWithoutShadows
 
</pre>
 
</pre>
  
 
Edit: fix a mistake
 
Edit: fix a mistake

Latest revision as of 10:00, 18 May 2019

Both Diamond and Gilgalad use bullet shadows but IIRC Gilgalad's code was optimized for speed and made it harder to understand.
If you plan on using bullet shadows with bins(Slightly less effective), both DrussGT and WhiteFang use it.
DrussGT calculates all the shadows before hand while WhiteFang calculates them when the bullet overlaps the wave(Easier to implement and shorter code).
BTW, anybody setting wave dangers as done below?
Position danger = (bulletPassed ? 0: chanceOfBulletCollision) * dangerWithoutShadows

Edit: fix a mistake

Personal tools