Jump to content
  • entries
  • comments
  • views

JavaScript Raycaster

Sign in to follow this  


A silly project from over the weekend: JavaScript raycaster.

I couldn't work out how to handle keypresses in Firefox, and Firefox is too slow and flickery to make it worthwhile. IE runs it fine but at less than 1FPS, meaning that more often than not you end up walking through the walls. Opera is about the only browser it works happily in (~12FPS). Ah well.
Sign in to follow this  


Recommended Comments

Mozilla has one and I'm sure The5K had a few.

Edit Mozilla's uses the nonstandard <canvas> tag.

Share this comment

Link to comment
Well it looks awesome, but I really don't feel like installing Opera. FireFox I got 10FPS but couldn't move and IE I got 1FPS.

Share this comment

Link to comment
I'm getting an average of 4 FPS in Safari (and the keys work) - but it freezes Camino.

Share this comment

Link to comment
Yay! 3fps (FX) and 12 fps (Opera) here. I'm wondering how fast this might run with the canvas tag. I might do some experiments later, but not until at least the weekend (exams and so forth). [grin]

Edit: I get about 8 fps in SeaMonkey... Maybe it's just Firefox that sucks? ;) Perhaps it's my extensions.

Share this comment

Link to comment
The Mozilla Raycaster uses

onkeydown="press(event);" onkeyup="release(event);"

I see yours take no parameters.

Share this comment

Link to comment
Guest Anonymous Poster


Quick Firefox fix:

onkeydown="KeyDown();" onkeyup="KeyUp();"
onkeydown="KeyDown(event);" onkeyup="KeyUp(event);"
return window.event.keyCode;
return (window.event) ? window.event.keyCode : evt.keyCode;

It's almost unusably slow, though.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!