4 ms·
Nice ! :) Looks like a raycasting engine like this one https://www.playfuljs.com/a-first-person-engine-in-265-lines/ https://www.playfuljs.com/a-first-person-en
by franblas 7y ago
Nice ! :) Looks like a raycasting engine like this one https://www.playfuljs.com/a-first-person-engine-in-265-lines/ https://www.playfuljs.com/a-first-person-engine-in-265-lines...
- KilledByAPixel 7y agoNope! It is not a raycasting engine at all, but instead built similar to old school racing game tech.
- winrid 7y agoCould you help us understand how it's not ray casting? OP doesn't mean ray tracing by the way. Ray casting is the tech used in Wolf3D for example, or maybe I'm preaching to the choir.
- fenwick67 7y agoSince the car only goes forward, there's no reason to have any depth or visibility testing, things are just rendered in order (painter's algorithm).
- KilledByAPixel 7y agoWith ray casting engines for each column of pixels you cast a ray and collide it against world geometry to see what it hit and where. With this engine, and most modern 3d engines you apply a transform to 3d world space points to get a screen space point. You also need to sort objects by distance or use a z buffer.