Ray casting is a technology used in many old ‘3D’ games such as Wolfenstein 3D，DOOM. Game engine use ray casting is also called a 2.5 D engine. The limitation of a simple ray casting engine in Wolfenstein 3D is that you can't look up or down – you can’t rotate X axis. Ray casting is fast and simple so before flash 10 which supports 3d, many people used this technology to make some 3D effect. Ray casting can easily create a maze-like world of walls. You can render terrains, too. Terrain rendering is much different from walls, it is also called voxel rendering.
Here are some information about voxel terrains and volume rendering:
Ray casting is different from mode7, mode7 is much more simple, good at rendering floors or grounds, but can’t do with walls.
I collected some good examples of flash based ray casting:
1.Wolfenstein 3D flash ported by Glen Rhodes
Flash ray engine
(2)old as2 version
You can find the source in ‘fla/examples/pro/raycasting’
5.Flash AS3 Ray Casting Tutorial with example and source
Bresenham magic: raycasting, line of sight, pathfinding:
rayfaster 2 test: