Thursday, December 3, 2009

A simple tutorial for using Alchemy Quake Engine to create your own FPS game!


(custom quake maps in flash)
1. Get the source code at
using git and

2. Install alchemy.
If you don't know how to do that (step 1&2) check this tutorial (I wrote for alchemy doom).

3. Compile the source to a swc
Copy the source folder to “F:\alchemy\” (suppose you install alchemy into this folder)
First you need a simple modification of the C source of wiquak in the source folder “D:\alchemy\QuakeFlash\WinQuake”:
Open the file “common.c” by any text editor, find this line (by searching key words such as “use modified games”)
” Sys_Error ("You must have the registered version to use modified games");”
Just remove or add”//” before (commentize) that line.
This is important if you want to use the engine to run your mods or total conversions, that line will check if the game data “PAK0.pak” is original (not modified), and won’t let the game run if not.
Now let’s build the C source to a swc: (you may want to read "readme_QuakeFlash.txt" in your downloaded source folder first)
Run Cygwin go to the “F:\alchemy\QuakeFlash\quakeswf” folder and compile the source:

cd F:
cd alchemy/QuakeFlash/quakeswf
source /cygdrive/f/alchemy/alchemy-setup
make -f makeswc

When it's done, check that "quake.swc” was created in “F:\alchemy\QuakeFlash\lib
(if not, go to “F:\alchemy\QuakeFlash\quakeswf\Release”, copy "quake.swc " to “F:\alchemy\QuakeFlash\lib”)

4. get the game data PAK0.pak
Download the original quake game demo(DOS) from, you will get the file “”, unzip it and run “install.bat”,
go to the folder you installed your game such as "C:\QUAKE_SW",
copy the "PAK0.PAK" form "C:\QUAKE_SW\ID1" to

5. compile the swf
Open the FlashDevelop project file “QuakeFlash.as3proj” in"F:\alchemy\QuakeFlash\quakeswf",
build the project you will get the “QuakeFlash.swf” in “F:\alchemy\QuakeFlash\quakeswf\bin”.
Run it, it will play the demos, press space key->NEW GAME, you can play the game now!


1. choose one of your favorite quake editors
There’re lots of free & open source game editors for quake1.
Some of which I know are quark (, powerful for making total conversions, can create & modify maps, models, textures and sounds…), bspquakeeditor ( and quakeED ( and put it in “C:\games\quake\tools”, you need to create that folder by yourself.) for levels (new maps), a light and useful tool PakExplorer(for creating & modifying PAK0.PAK, quark has a build in Pak Explorer too.).

2. I prefer quark, just learn how to use it to create & modify PAK0.Pak 
to make your mods and TCs. There are docs and video tutorials online ( to help you.

P.S.For bspquakeeditor quakeED, the default quake level format is *.map, you need to compile the *.map to *.bsp (both editor can do that).

3. A quick start – test your first quake mod level in flash:
You created/downloaded a level and want to test it in the flash.
Use PakExplorer open PAK0.PAK, import (drag and drop) *.bsp into maps folder of PAK0.Pak, delete e1m1.bsp, rename your *.bsp to e1m1.bsp, save and recompile the flashproject. The first level of the game will be yours.

If you download a mod’s PAK0.PAK (here are some:, just open it and the original PAK0.PAK by PakExplorer, right click and copy any *.bsp from MOD.PAK’s map folder and paste it in the original one’s map folder, delete or rename “e1m1.bsp”, rename the mod’s .bsp to “e1m1.bsp”, save the PAK file, rebuilt the swf and the first level will be changed.

P.S. a tip for moders: compile the swf everytime when you want to test your level is time consuming, because the “” embed the “PAK0.PAK” file to get a standalone swf, modify, use Loader, let it load the "PAK0.PAK", so you won’t need to recompile the swf any more whenever you change the “PAK0.PAK”, (if you’re not clear of what I mean or how to do that, email me or leave a comment.)

A free (GPL) game data (PAK file) for quake1 is here:
download Game data in binary format, use PakExplorer open pak0~3.pak, copy all files in pak1~3.pak into pak0.pak, repalce what's in F:\alchemy\QuakeFlash\quakeswf\embed with"config.cfg" of openquartz and the newly created pak0.pak, compile the project, you will get something like this:


1. quake1 mods and tools:

2. free web client version of Quake:

4. Flash quake/descent style renderer:

7. Quake2-based 3D renderer for flash using HaXe: