Awesome web-based first person shooter in 265 lines

265 lines of JavaScript, running in a browser. That's all it took to produce the first person game engine that's behind this gif animation. Here's a post written by the engine's author, Hunter Loftus, explaining how it works. It's damned clever.

The post has links to the source code.

If you really want to understand how it works, use Chrome DevTools. Hit F12, go to the source, set a breakpoint at the top of the JS, reload, and then walk through it.



Hat tip to Michael Mahemoff whose G+ post tipped me off.



Enhanced by Zemanta

Comments

Popular Posts