| MCS' Coding Tips
Recording and playing your own demos
Written by MCS
Tested by Quinnsey
Tips - "Success"!
Original Wolf 3D
|In original Wolf, some built-in demos are included, to give the player an idea of what to expect in the game. To view these demos, start the game, press a key when the signon screen appears, and leave the keyboard alone until the first demo starts to play. As soon as the first demo has ended, the screen sequence will start again and after a while, the second demo will be played, and so on.
In the distributed source code package, the playdemo option has been disabled. The record mode is still there, but there's no way to play any newly recorded demo without some source code modifications.
Using the information in this tutorial, you will be able to both record and play your own demos.
1. Recording the demos:
Start your game with the command line cheat parameter (e.g. WOLF3D GOOBERS).
When the signon screen appears (the startup screen with the memory indicators) press the TAB key and hold it down until a pop-up screen is displayed with the text "Demo which Level (1-10)"
Enter the level of your choice. It should start with the "Demo" sprite on top.
You're now in record mode. Run around for a while and have a fight with the guards that cross your path. When you get killed, the screen will turn black.
Press ENTER to save your demo, or press ESC to quit without saving.
After pressing ENTER, quit the game and look into your Wolf directory. If you followed the instructions correctly, you would find a file named DEMO0.WL6.
This file was created by the engine and contains the demo you just recorded.
Rename this file to DEMO3.WL6 and repeat the recording process. Another file named DEMO0.WL6 will appear, which should be renamed to DEMO2.WL6.
Repeat a third time and rename to DEMO1.WL6. Finally, record a fourth time and leave the file name as is.
You should have four demo files now (DEMO0.WL6, DEMO1.WL6, DEMO2.WL6, DEMO3.WL6).
Caution: the memory buffer space available for demo recordiing is limited. If the memory space is exceeded, the game will either crash or bomb out with an error message "Demo Buffer Overflowed".
So it's best to keep the duration of each demo under about 1 minute.
2. Playing the demos:
In order to play your own demos, you have to make a simple modification to the engine.
Open the file VERSION.H and look for the line #define DEMOSEXTERN.
Remove this line or comment it out. Recompile and link up.
Start the game, press a key in the startup screen only, and don't touch the keyboard anymore.
After the title screen, the credit screen and the highscore screen you will have the pleasure to view your own demos.
N.B. In original Wolf, the demo information is stored in the VGAGRAPH file. Using the method described above, all information is saved in the DEMOx.WL6 files. So don't forget to include those files in your addon package.