Dark Bit Factory & Gravity

ARCHIVE => Archive => Java,JS & Flash => Topic started by: p01 on February 02, 2008

Title: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript
Post by: p01 on February 02, 2008
It's a little quiet here. Let's post something.

Other there at the Ozone Asylum (http://www.ozoneasylum.com/) we have some 20 lines contests in JavaScript. It's a really fun exercise. The topic last month was about dynamics. I made some kind of hypnolgow (http://www.p01.org/releases/DHTML_contests/files/20lines_dynamic_hypnoglow/) ( always loved hypnoglow :P ) but the most interesting piece I delivered and am polishing now, though still in 20 lines is:


Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript (http://www.p01.org/releases/DHTML_contests/files/20lines_castle_wolfenstein/)


Before you ask : it doesn't work in IE. Works great in Opera 9.5 ( sorry don't have 9.2 at home ), and I'm investigating why FF3 chokes on it.
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScr
Post by: Tetra on February 02, 2008
It still supprises me that js can do this kinds of thing.

I really like hypnoglow its cool, and you done a pretty good job at wolfenstein :)

Isnt FF3 in beta atm? or did I miss something :D
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript
Post by: p01 on February 02, 2008
Thanks.

Yes Opera 9.5 and FireFox 3 are still in beta. FF3b2 came out ~6 weeks ago, Opera 9.5 build 9721 one month ago.
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScr
Post by: benny! on February 02, 2008
Kewl. Excellent work.

Never head about the <canvas> tag though ... nice! New
stuff to study 8-)
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript
Post by: Shockwave on February 02, 2008
Wolfenstein in 20 lines of Javascript?!?!
crumbs!
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript
Post by: rain_storm on February 02, 2008
I just downloaded and installed Opera just to see this in action and I must say that I am dumb-struck. This is very impressive for 20 lines of code. Very well done p01. Anyone else that hasnt seen this because they are using IE do yourself a favour and install Opera.
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript
Post by: p01 on February 02, 2008
(http://dbfinteractive.com/Themes/azure_11final_tp/images/grin.gif) that's a cool way to discover Opera.

Btw, there's a few new features since my first post:
The script is now 19 lines ( excluding the logs, to try and understand why FF3b2 is so slow ). I believe I can fit the player's game logic and a basic HUD in 20 lines.
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScr
Post by: Shockwave on February 02, 2008
I would not have said it was possible to squeeze Wolfenstein into so few lines of code.
We had a 20 line competition here some time ago, and some of the code was pretty obfurscated, nobody made a raycaster though!

There were some interesting things made however.. I think Optimus won that challenge with a lense mapped Xor thing :)
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScr
Post by: Rbz on February 04, 2008
Very very cool, hypnoglow effect rocks   :goodpost:
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScr
Post by: taj on February 05, 2008
P01 - that wolfenstein is awesome. Very very good programming.
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript
Post by: p01 on February 08, 2008
Thanks. It's cool to such feedback, esp. from some crazy optimizers.
Title: Re: [JS] Castle Wolfenstein - an homage to Wolfenstein 3D in 20 lines of JavaScript
Post by: Buckethead on February 08, 2008
Impressive, both in size and how you mastered the engine. >:D I'm very fan of this.
Keep on this pure work, it's always a pleasure to run your creations.  :stirrer: