This is my first project using alchemy, porting a simple ray casting engine from this tutorial (http://www.student.kuleuven.be/~m0216922/CG/raycasting.html) to flash, and finished about half a year ago. Source code is just released because I’m too lazy to clean up the dirty code behind the first demo.
This engine is better than may other flash based ray caster because it can render ceil/floor and sprites. It’s not hard to make a Wolfenstein-like game using this engine but I’m not motivated to do that now.
We already have more powerful alchemy doom and alchemy quake engine now. There are many good game editors for these two engines; we can create a quake-like FPS even without programming now. But it’s strange that I haven’t seen any new game made.
(If you want to do this, here are tutorials:
One reason is no LAN game play, hope someone can solve this problem. I think another reason is those engines are too complicated to deal with. This little engine is much simpler and can be used personally, hope you will like it.
I won’t develop it further because recently I’m focus on a totally new ray casting engine – BENGINE (http://flaswf.googlecode.com/files/Bengine_v01.swf ), a voxel based 2.5D/3D ray casting engine.
As to the source code of this alchemy ray caster, special thanks to Lode, the original author of the C++ code, and Ralph Hauwert (unitzeroone.com), I learned how to use alchemy from his source.
It is not well written, and maybe you won’t like my way of writing C code, I don’t use .h file, I prefer C to C++ (so the original C++ source is C now) and like to use include a lot.
Besides, there may be lots of bugs and many things can be optimized.
If you want to make it better, some ToDos (for you):
1. Use 1D screen buffer ([]) instead of 2D screen buffer ([][]) to speed up rendering.
2. Improve the sprite sorting function.
5. Some lighting effect (#1).
6. A better way to handle textures/sprites, doom wad like data/resources.
7. A better way to define a map, a map editor, import Wolfenstein map format.
9. Write a simple game.
#1 Another nice ray casting tutorial you may need: