Tag Archives | Java

…Left 4k Dead is an impressively small zombie shooter?

Left 4k Dead

Left 4k Dead is probably the best use of 4kb of Java code that I’ve ever seen!

The game is based on Valve’s Left 4 Dead, and plays surprisingly well for how small it is. You play as a small dot with a gun and a flashlight that must escape from an onslaught of zombies that are trying to kill you using only your wits (and your gun).

WASD keys move you around, and the mouse aims the flashlight and the gun, so the controls are rather intuitive. Plus, just like in the real game, the zombies and the powerups are randomly located inside of each level, so every time you play it’s a different game. The similarities between Left 4k Dead and Left 4 Dead don’t end there though, as you can still shoot after running out of ammo, only at half speed to simulate the pistols in the real game, and there are different types of zombies that all react differently to your presence as you walk around.

Beating a level means the game gets harder, but you also get more points for each zombie, so it’s a trade, and the goal for each level is to find the safe room which is outlined in red, so it’s a test of your survival skills as well as your shooting skills.

Are you ready?

[Left 4k Dead]

…Caffeine can help you nap better?

Caffeine Nap

If you’re looking for a quick pick-me-up, try taking a caffeine nap.

Here’s how:

  1. Right before you crash, down a cup of java. The caffeine has to travel through your gastro-intestinal tract, giving you time to nap before it kicks in.
  2. Close your eyes and relax. Even if you only doze, you’ll get what’s known as effective microsleep, or momentary lapses of wakefulness.
  3. Limit your nap to 15 minutes. A half hour can lead to sleep inertia, or the spinning down of the brain’s prefrontal cortex, which handles functions like judgment. This gray matter can take 30 minutes to reboot.

[Wired – Cheat On The Need To Sleep]

[Via: Lifehacker]

…You can play with a site’s images?

Here’s a fun web trick to try, and it works with any page as long as the page contains images (try a Google Images search results page). Just copy the following Java code into the address bar of your browser, and hit enter:

    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName(“img”); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+”px”; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+”px”}R++}setInterval(‘A()’,5); void(0);

When you’re done, just hit reload and you’re back to normal. Plus, it’s a fun game to play on those with slightly less computer savvy-ness than you.

[Via: Digg]