Our Flag is Secure!

Shazbot!!!

I’m so excited that the TribesNext project has stepped up to fill in the gap that formed since Sierra dropped the Tribes 2 online multiplayer servers last November 1, 2008.

On the site they boast:

  • Robust, fully integrated and automated account system. No need to wait or worry, you can create and log in to your account to play right away!
  • High-grade account security. Your account is protected by a 512-bit (or higher) encryption key generated on registration.
  • Authentication server down, but you’ve already created an account? No problem! Just log in and play.
  • No waiting for a human to create your account; no need to alt-tab to fully use the game; no need to worry about account theft.
  • No need for a CD-Key! The game is completely free to download and play, so go ahead!

It’s a FREE, ONLINE, MULTIPLAYER game people! An FPS/TPS game complete with futurisitc weapons, vehicles, classes, large scale maps, flags, bases and jetpacks! …with 64-on-64 epic battles!

If you were too busy playing Counter-strike in the summer of 2001, you might have missed this awesome game. And now, here’s your chance!

Oh Sierra, I just hope you don’t away our dreams! If you do, we’ll be going after you with our spinfusors!

Inverse Square Root

I just bumped into a clever little code snippet used to find the inverse square root:

float InvSqrt(float x){
   float xhalf = 0.5f * x;
   int i = *(int*)&x;   // store floating-point bits in integer
   i = 0x5f3759d5 - (i >> 1);  // initial guess for Newton's method
   x = *(float*)&i;  // convert new bits into float
   x = x*(1.5f - xhalf*x*x);  // One round of Newton's method
   return x;
}

[ taken with comments from Kalid Azad @ BetterExpalined.com: Understanding Quake's Fast Inverse Square Root ]

Ok, it does not get the exact value but you get a good enough estimate, FAST!

There are two important things to note here:

For a better explanation, I suggest reading Kalid Azad’s article and the paper by Charles McEniry.

Wait a minute, so why is this useful?

In graphics programming, this can be used to normalize vectors quickly. If you noticed the title on the first link, it’s used in the Quake 3 engine. So does that mean the legendary John Carmack wrote this code? If you’re interested, you can read the Origin of Quake3′s Fast InvSqrt() at Beyond3D.

What did I learn?

I usually forget one thing: there are times when speed trumps accuracy. A close quick estimate would be better and there are a number of optimations that can be made.

Much thanks goes to Doc Mana who first introduced me to the Newton-Raphson method & how to apply it on code.

On the Truth About Santa

To study Santa Claus under the light of common sense might not be sufficient to understand this Christmas phenomenon. Relativity and quantum mechanics have broken our understanding on how the world works. These theories have helped us understand the very large and the very small. In the same manner, they may be the keys to unlocking the real truth behind the dual-nature of Santa: a very large man (especially compared to the kids) traveling as a very small vehicle (compared to the earth).

Spacetime

Gravitation is a natural phenomenon by which objects with mass attract one another. With Santa’s large figure (in which, he gains 2950.7 tons during the night) and the load of the sleigh of 321,300 tons (as mentioned in “The Truth about Santa”), the whole entity travelling during Christmas eve is truly massive! In this massiveness, we also get a significant amount of gravity. Santa would bend the dynamic spacetime and travel around the world with relative ease! Santa’s initial mass would be really significant given the number of presents he has to bring. Along the way, he drops off these gifts in exchange for the milk and cookies (so don’t forget to leave some milk and cookies!). As he builds up momentum during the night, the mass needed to bend spacetime decreases. Santa would probably explode if he had to exchange all 321,300 tons of gifts in body mass!

The Truth of Uncertainty

With Santa being a relatively small entity traveling around the world, one cannot be absolutely certain of both his position and velocity at a certain time.

“In quantum physics, the Heisenberg uncertainty principle states that the values of certain pairs of conjugate variables (position and momentum, for instance) cannot both be known with arbitrary precision. That is, the more precisely one variable is known, the less precisely the other is known. This is not a statement about the limitations of a researcher’s ability to measure particular quantities of a system, but rather about the nature of the system itself.”

Given the different timezones around the world we are certain to an extent that Santa would visit during these times. With nature of Santa’s visits however, we are not certain to exactly where he is.

Clincher: Does Santa Exist?

Let’s review the thought experiment on Schrödinger’s cat:

“Schrödinger’s Cat: A cat, along with a flask containing a poison, is placed in a sealed box shielded against environmentally induced quantum decoherence. If a Geiger counter detects radiation then the flask is shattered, releasing the poison which kills the cat. Quantum mechanics suggests that after a while the cat is simultaneously alive and dead. Yet, when we look in the box, we see the cat either alive or dead, not a mixture of alive and dead.”

In uncertainty, Santa is simultaneously in existence and non-existence. When that uncertainty is broken, he will now either exist or not. For the believers, they are certain that he exists with the gifts he brings. For the non-believer, they are certain that he doesn’t exist because they don’t get gifts. This is the same reason why Peter Pan asks those who believe in fairies to clap their hands.

It must be noted though that this certainty is not permanent and might change (typically during parenthood).

Shun the non-believers!

*Note: I did not major in physics and I might have used these terms and theories loosely and incorrectly. I do, however, find much interest in these theories as they try to explain everything around us.