Simple Bullet Shadowing Surfer

Jump to navigation Jump to search
Revision as of 19 May 2019 at 05:51.
The highlighted comment was created in this revision.

Simple Bullet Shadowing Surfer

Hi, I have an idea for a bullet shadowing wave surfer robot but I don't really know how to get started. Could someone point me to a relatively easy to understand wave surfer that implements bullet shadows into its danger prediction? Thanks in advance!

    Slugzilla (talk)16:55, 12 May 2019

    Implementing bullet shadow in wave surfer is very easy; just set danger covered by shadow to 0

    however, calculating bullet shadow is not trivial

    the first bot featuring this technique is Diamond, and it’s open source!

    Just have a look at it, you’ll know that better.

      Xor (talk)03:49, 13 May 2019
       
      Edited by author.
      Last edit: 11: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

        Dsekercioglu (talk)07:51, 13 May 2019

        This is not correct, although I've made the same mistake the first time thinking about this.

        The catch point is that, even if your bullet passed safely, you know the intersection must contain no bullet, so the shadow of the bullet still exists

          Xor (talk)05:01, 17 May 2019
          Sorry, I fixed the code.
          My point was: Wouldn't it be smarter to deduct (100 - x) percent of the danger if the chance of the bullet colliding is x percent.
            Dsekercioglu (talk)11:01, 18 May 2019

            This is incorrect. Because bullet shadow has nothing to do with whether bullets collides or not — it’s all about information. You know perfectly you won’t get hit in the shadow, so danger is 0. You still get hit by the part outside of shadow in the incoming wave though.

              Xor (talk)06:51, 19 May 2019
               
               
               

              Thanks for the input! I'll check out the code for Diamond, DrussGT, and WhiteFang later today.

                Slugzilla (talk)21:49, 13 May 2019