Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice ! :) Looks like a raycasting engine like this one https://www.playfuljs.com/a-first-person-engine-in-265-lines...


Nope! It is not a raycasting engine at all, but instead built similar to old school racing game tech.


Could 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.


Since 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).


With 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: