(bonus include resizeable window and the raycasting code moved to scripts/raycasting.lua file)
New version (raycast4) available, current futures include:
Animated 8 directional sprites
Variable resolution support
Variable player eye elevation and head tilt
Retexturing on the fly
Basic variable lighting
Basic world interactions
Other debug stuff
Frame limiter of sorts (needs tweaking)
All feedback is welcome, it would be awesome if you give me a performance report:
Computer specs, OS, resolution used, CPS limit used, amount of stuff on screen (rendering overall) and the FPS
http://www.youtube.com/watch?v=rXwtO4uS ... e=youtu.be

Well I wanted to know how hard it is to make something like this, and learn something in the process.
I used this tutorial:
http://www.permadi.com/tutorial/raycast/
I think its quite a good tutorial because it only explains math and concepts, so I had to write the code myself, and because I’m not that good at math, it took me some time to understand it.
This should be enough for making a simple FPP dungeon crawling game that should run well on low end machines (I hope). I’m casting 1 ray for every 2pixel*screenheight and I don’t think it looks all that terrible, there is even a sprite support (the ugly rats are my creations), and some kind of basic light effect.
The floor and ceiling… Well I’ve managed to figure out how to draw it the oldschool way, but it kills any machine even on small resolution… I think it is possible to make a playable game without the floor…
