My fourth Corona sample was to do a basic port of a Raycasting engine I wrote somewhere around 1997.
The original engine had many more features, but to keep this simple, I decided to just put in flat filled walls along with some diminished lighting and basic controls for turning and moving. Outside of lookup tables, there is minimal optimisation which should help people follow what’s going on. Basic wall clipping is implemented also, meaning you cannot walk through walls, but slide along them.
The grey squares you see are the controls (left side is turning, right is movement).
Porting it was easier than I had expected, and if I get some time, I will return and add more features.
You can download the full source here: [Download]