Check out my
new book!
HTML5 Games book
Creating pseudo-3D games... part 2 Part 2 of my series of articles about how to use JavaScript, DHTML and Canvas to create raycasting games like Wolfenstein 3D is up at Dev.Opera - read the article here.

In this article I've taken the result of the first article and improved upon it by, among other things, optimizing performance and adding sprites and scary (not really) enemies that run after you.

Note that the titles of the articles are a bit misleading since Canvas is only really used for drawing the minimap, everything else is plain DHTML.
⇓ 8 comments Drakim

Cool! I was wondering when you'd continue your article about the ray casting. It's interesting to see how somebody solves problems differently than you (and learn from them).

March 14, 2009 at 5:47 AM
Drakim

Oh, but upon closer inspection, I see that the engine is still plagued by that strange artifact bug for the north and south walls textures. ><

I myself haven't been able to cure this problem either, sorry.

March 14, 2009 at 6:06 AM
Jacob Seidelin

Yes, I sort of just gave up on trying to figure out what was causing it. It is a mystery.

How did it go with your shading experiments?

March 14, 2009 at 6:16 AM
Drakim

After trying to figure out that very bug, I felt somewhat frustrated and tired, so I took a big break from the raycasting engine to gather some mad JavaScript skillz in other projects. I've since returned to my engine with renewed effort (actually, only a coupe of days before you posted this article, funny enough).

I can with a smug grin say that my engine runs at a higher screen size and smaller raycasting strip size, and yet at a faster speed than yours, but I won't, since I know you wrote this engine for an article as a tutorial, and not necessary for serious use D: (for example, the canvas minimap is far from free in terms of performance, yet no serious 3d shooter gives you such a omnipotent minimap constantly on the screen).

As for the shading, I'm trying various solutions, but there are quite a few problems, especially when sprite objects comes into play. Pre-shaded sprites in a CSS-sprite like manner seems the best option, but the resulting quality seems a bit low. Using canvas to shade them (and IE filters for IE) is too slow to be done every single frame (and doesn't work on Chrome or Safari). So, I'm not sure on how to deal with it in a manner I will be happy with. JavaScript is all about compromise.

I'll keep you updated once I have a new demo to share. :)

March 14, 2009 at 8:19 AM
Jacob Seidelin

Nice, feel free to show your improved engine :-)

March 14, 2009 at 9:08 AM
zproxy

waiting for it :)

wolf3d forever!

March 14, 2009 at 11:04 AM
ovidiustefan

Hello !
I was wondering when you will post the new improvements. I hardly wait for them to see the result and the impact over the world :)
Ovidiu Stefan(stefan_ovidiu2002)

May 14, 2009 at 6:41 AM
webcam

I am very happy to see the colligan gorge games is back this time and after the success of last one competition.I hope it will fully loaded with every upgrade, add-on and expansion, including all vehicles, weapons and extra campaigns any time.

October 21, 2009 at 3:02 AM
Post a Comment