The Exceptional Beauty of Doom 3’s Source Code

doom3

Doom 3 was not only great fun to play, but for the time, was an absolute marvel to look at. Truth is, the Xbox version still holds up visually to some of the better games from the last generation. This is coming solely from a video game player. But Kotaku had a developer come in and write a piece about Doom 3’s source code, and the stuff was apparently a thing of beauty (especially when compared to some other games).

From Kotaku:

When I was asked to write this article, I used it as an excuse to read more source code from other games, and to read about programming standards. After days of research I was confused by my own tweet that started this whole thing: what would “nice looking”—or “beautiful”, for that matter—actually mean when referring to source code? I asked some programmer friends what they thought that meant. Their answers were obvious, but still worth stating:

  • Code should be locally coherent and single-functioned: One function should do exactly one thing. It should be clear about what it’s doing.
  • Local code should explain, or at least hint at the overall system design.
  • Code should be self-documenting. Comments should be avoided whenever possible. Comments duplicate work when both writing and reading code. If you need to comment something to make it understandable it should probably be rewritten.

He then goes on to explain what makes the code so remarkable, and talks about it in comparison to the game he made DYAD. Makes for one helluva read and makes you appreciate the medium even more.

While some of us may just be gamers and are only able to appreciate the games on a surface level (because we don’t fully understand what goes on inside) this gives us some insight into the gaming world that we don’t normally get. Doom 4 was recently announced officially. Wonder how amazing that source code is going to be.

[Story and image via Kotaku]

This ‘Fox and the Hound’ are Best Friends (Just Like the Disney Movie)

There is nothing more adorable than seeing two animals who clearly are supposed to be enemies in nature being best friends in real life, and that is just what you have here. Much like the beloved Disney movie The Fox and the Hound, these two met and just hit it off instantly.

They’re supposed to be sworn enemies, with one forced to hunt and kill the other for sport. But despite their natural instincts, you’d be forgiven for thinking they were a couple of playful pups, as this unlikely fox and hound pairing have formed an unbreakable bond. Whether they’re play fighting in the garden, or snuggling up together on the sofa, Cora, a Siberian husky, and Teagan, a young vixen, are completely inseparable.

Also, safe to say this one won’t end with the hound having to lay across the fox so its master won’t shoot it like in the movie. Man, that messed me all up.

[Via LaughingSquid]

The Truth as to Whether or Not You Can Die From Sleep Deprivation

us

Many have wondered, many have spoken about it, but few know. Can sleep deprivation get so bad that it actually kills someone? All I can tell you before you read the article is, if you have sleep deprivation, stop reading now. This is NOT going to bring you any peace of mind (which might be exactly what you need to fall asleep).

i09 goes into the issue with great depth and peels away some of the layers of myth surrounding this idea, leaving only the scary and undeniable truth. Put it this way, maybe start drinking some chamomile tea before bed and doing some meditation to get you into a good state of mind, huh? Sleep is more important than you think.

I guess “Freddy” is more real than we thought.

[Image via MNN, story Via i09]

Why Do Cats Love Boxes So Much?

cat

We’ve all seen it. There is an empty box somewhere and your cat comes into view, intrigued by it. First it may use a paw to touch it, then it might nuzzle its face up against it. Next thing you know, the cat is inside the box and seems to be about as content as can be. Why is this? Wired is bringing us closer to understanding:

For cats in these often stressful situations, a box or some other type of separate enclosure (within the enclosures they’re already in) can have a profound impact on both their behavior and physiology.

Veterinarian Claudia Vinke of Utrecht University in the Netherlands is one of the latest researchers to study stress levels in shelter cats. Working with domestic cats in a Dutch animal shelter, Vinke provided hiding boxes for a group of newly arrived cats while depriving another group of them entirely. She found a significant difference in stress levels between cats that had the boxes and those that didn’t. In effect, the cats with boxes got used to their new surroundings faster, were far less stressed early on, and were more interested in interacting with humans

That and they say that cats like to run away from their problems, and the box acts as a sort of ‘safe zone’ for them. No, the rest of the article says that, I didn’t just make it up. So the next time you see your cat go hide in a box, understand, that is about as safe and happy as it can feel, so let it be. Maybe a few of us could use some human size boxes for our own problems. I’ll go try today and let you know if it helps.

[Image and Story Via Wired]