4 ms·
Very cool! I went deep down the rabbit hole with raycaster engines over the last 2 years. While this particular rendering technique has lots of limitations (li
by gh123man 7y ago
Very cool!
I went deep down the rabbit hole with raycaster engines over the last 2 years. While this particular rendering technique has lots of limitations (like a fixed camera - unable to look up and down) it also has some interesting properties. Such as the ability to create windows, mirrors, and portals very easily by re-directing the way the rays fly.
I actually put together an entire game around this to test the limits of what I could achieve with raycasting. If anyone is curious you can see a video of it on my blog: https://blog.sb1.io/gateescape/ https://blog.sb1.io/gateescape/
What I think would be a great project is moving the casting and drawing part over to a compute shader. My engine is multi threaded and chunks the screen so each thread can do some section of the work. Unfortunately I want the engine to be cross platform, but Apple has made that rather difficult with the requirement of Metal going forward. If anyone has seen this style of raycasting implemented on a GPU I would be very interested!
- mrspeaker 7y agoWow, that looks cool. Portals are a great idea and seem like the would be (relatively) easy to implement in a raycaster! The simplicity of them makes them fun to experiment with: I used one in a Ludum Dare game (https://www.mrspeaker.net/dev/ld27/ https://www.mrspeaker.net/dev/ld27/) and made the field-of-view and movement speed a "mechanic".
- GonzaloQuero 7y agoI just finished your game, and it was really, really good! I love trippy, timey-wimey experiences!
- ahuth 7y agoThis is awesome. Nice job!
- gh123man 7y agoThanks! It means a lot! Since a few people have expressed interested, I decided to open source the early prototype code that has a simple implementation of portal casting. https://github.com/gh123man/Raycaster https://github.com/gh123man/Raycaster
- mysterydip 7y agoThere are ways to fake an amount of up and down looking without too much work, rise of the triad used an approach. the larger the angle the more apparent the fakery, but it works well for "small freedom". I love raycasting engines and yours is a nice addition! https://permadi.com/1996/05/ray-casting-tutorial-16/#LOOKING%20UP%20AND%20DOWN https://permadi.com/1996/05/ray-casting-tutorial-16/#LOOKING...
- sharkbot 7y agoI appreciated your earlier comment that talked about how you used signed distance functions to make the virtual joystick slightly expand. I used that as inspiration for some terrain generation in a very basic game I’m making to learn the ECS design pattern. So far, it’s working really well! Thanks again!