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

I wrote a similar code a few years ago, although it also supported textures (including ground and skybox, unlike the original Wolfenstein). I don't know if it'll be more to your taste but there are afew comments: https://bitbucket.org/simias/wolf/src/873cad46f3c8281e7d9429... the magic happens in wolf_horizontal_intersect. Note that I use fixed point which obfuscates the arithmetic a bit (I was targeting an embedded platform without hard float at the time).

It looks like this while running: https://svkt.org/~simias/misc/wolf-floor.png

That being said if you're interested in writing something like that I recommend that you use any basic tutorial on raycasting and try implementing it "from scratch" yourself, it's pretty simple and quite fun IMO. IIRC I used this one: http://lodev.org/cgtutor/raycasting.html



Please add Readme with few words about project.




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

Search: