Just another Reddit refugee

  • 1 Post
  • 45 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle

  • but I’ve accepted defeat in trying to understand it

    I may have shared the link but even I don’t know how it how it works.

    It’s like admiring the Eiffel Tower; you can understand that it’s a marvel of engineering without understanding the underlying engineering concepts. Such experiences are rare but they truly humble you.

    Regarding the square root, understand the following concepts

    1. Bit shifting simply shift the bits to a certain side (Left or right) => 0010 << 1 0100
    2. Mathematically, it multiplies or divides the input number with a factor of 2, depending upon the type of shift
    3. If you shift the number n with a nice shift amount x (I have greatly greatly over-simplified this), then you can calculate the inverse sq. root since inverse square root is 2^(-1/2)
    4. Calculating the inverse square root manually will take lots of clock cycles, which was not feasible for a FPS game with the limited h/w
    5. Bit shifting is a lot faster since we are not computing, but instead shifting

    The resultant shifting gives us an answer which is close enough to the answer, and that is good enough for FPS games for calculation of reflections.

    Source for bitshifting

    PS: Someone who is more experienced in this domain can correct me if I’m wrong.














  • I’m not a Physicist but since they have the same momentum, the marble will have a higher velocity. Let us assume the bowling ball weighs 6000 gm and the marble weighs 20 gm (average weight), the velocity ratio of the marble to bowling ball is 300:1 (300 times faster).

    If we assume that both of them are made of the same material, and you throw the bowling ball at 1 m/s, then the marble is launched at nearly Mach 1. I’m pretty sure it will create a neat hole in the bowling ball.

    I could be very wrong as well.