That’s a really good idea! I’ve also been meaning to look into using textures on walls. Not sure that’s possible or not, but would be interesting to try. As well as your idea.
Please always add return false or e.preventDefault() to all key handlers, because without it the browser doesn’t know you use them, and may use the keys for its own shortcuts. For example, in Firefox’s case it launches find-in-page dialog searching for “wassesdfsfdsfsd”.
I have a search-as-you-type option enabled in Firefox. It’s not on by default. But the handler thing applies regardless. It’s been the same with Opera. It would be visible in all browsers if you used other keys like space.
The package.json already listed the MIT license, but I’m not sure if that’s “enough”. Either way, it definitely makes sense to make it more obvious, and thanks for the suggestion.
Thanks! When I first got this working (sometime in 2017), it was much smoother in Chrome than in Firefox. Once Firefox Quantum came out, though, they became basically equivalent.
This is a project I did a couple years ago. Even though it seems simple now, while working on it I never thought I’d be able to finish it.
It’s written in React and renders each vertical bar as a div (no canvas!). Why? Just wanted to see how well it would work, which it does pretty well.
The main lesson I got from this is that I can understand things that seem completely out of my reach at first.
Genius. This engine could probably even handle 2.5D sprites if you set the z-index properly.
That’s a really good idea! I’ve also been meaning to look into using textures on walls. Not sure that’s possible or not, but would be interesting to try. As well as your idea.
Please always add
return false
ore.preventDefault()
to all key handlers, because without it the browser doesn’t know you use them, and may use the keys for its own shortcuts. For example, in Firefox’s case it launches find-in-page dialog searching for “wassesdfsfdsfsd”.Are you hitting cmd or ctrl or any modifier keys, in addition to wasd? It works without any issues for me in Firefox.
I have a search-as-you-type option enabled in Firefox. It’s not on by default. But the handler thing applies regardless. It’s been the same with Opera. It would be visible in all browsers if you used other keys like space.
Very cool! Can you add a license?
Good call, and I’ve added MIT.
The package.json already listed the MIT license, but I’m not sure if that’s “enough”. Either way, it definitely makes sense to make it more obvious, and thanks for the suggestion.
Needs a run key ;). Awesome work, very cool and surprisingly smooth!
Thanks! When I first got this working (sometime in 2017), it was much smoother in Chrome than in Firefox. Once Firefox Quantum came out, though, they became basically equivalent.
Very cool! This sort of thing is a stupid amount of fun.
raycasting buddies : https://github.com/mankyKitty/reflex-demo-game (no guarantees on buildability ><)