Appending Demos Together |
Quake2 Demo Editing Tutorial |
Written 7/99 by Overman |
This tutorial will cover one of the two basic methods for allowing your demos to launch in a sequence. This is helpful if your project spans more than one map, but you want to keep a continuity to the presentation as a whole. Anthony Bailey of Quake Done Quick has expressed interest in sharing a third new method for handling a series of demos, so look for a part 2 to this topic sometime in the near future.
Method 1: Stufftext Message
The method is very simple if you are at all familiar with Keygrip2. The Stufftext message in a .dm2 file allows the demo itself to send commands to the Quake2 console, just as if a user had typed it manually. The beautiful thing about this is that as long as the command does not disrupt normal Quake2 operation ("disconnect" or "quit", for example), then the demo will play back uninterrupted. In this case, we are going to tell Quake2 to load another demo by using the map filename.dm2 console command.
Open your demo in Keygrip2, zoom in all the way on the filmstrip (using the magnifying glass icon), and then select the last block in the demo. Next, click the Insert drop-down menu and choose New Message. The dialog window opens.
As you can see, you have your choice of message types to insert. Choose Stufftext from the available list. For the Command text, type the following (no quotes):
"map NEXTDEMO.dm2\n "
Use the name of the next demo you wish to launch in place of NEXTDEMO. Notice the \n at the end - this will simulate an Enter keypress to actually execute the command we have typed. The trailing space after \n may or may not be needed... I have found that it's a good idea. Click OK to insert the message.
Once you have inserted this message, if you let the 3d Preview play forward to the end of your demo, then the next demo you specified will play afterwards. This can be annoying in Keygrip2, since that file is not officially "open" in the program. It's best to save this insertion til your demo is complete, and then immediately Save and Exit so you can test it out in regular Quake2.
You will notice in Quake2 that when playback of the first demo is completed, the last frame freezes briefly while the Loading icon is displayed, and then the next demo begins. The console never opens, so the look is fairly seamless. For an example of this method in action, look at Father Frags Best (if you haven't already)... this is the method I used to string together the demos in this movie.
Important Restriction: If you attempt to consecutively string together two demos that are from the same map, Quake2 will hang and never load the second demo. There is no way around this that I know of. If you have two demos from the same map you want to string together, I'd recommend either: inserting another demo (from another map) in between, or else combine the two together into one big demo by cutting and pasting the appropriate blocks. Cut and Paste can lead to difficulties which we will discuss in the next tutorial.
Method 2: Aliases and the Nextserver Command
If you are interested in a more versatile (and slightly more advanced) method for looping Quake2 demos, I highly recommend the article entitled: "Looping Demos in Quake Family Games" by Hugh "Nomad" Hancock, found in the Strange Company - Resources section of their site. By creating a config with user-defined console commands, and invoking the nextserver command, one can loop together many demos without having to do any Keygrip2 editing on them. The playback is just as seamless as the first method, and still has the same restriction (no two in a row from the same map), but is, in my opinion, a superior method for larger scale projects, especially movies. While beta-testing the Quake2 done Quick2 recams, I was able to loop all 44 demos together into one continuous presentation. The actual Quake2 done Quick2 release will go a step beyond that by using a custom-programmed menu interface, giving the user complete playback control.
As I've mentioned, Anthony Bailey has offered to discuss a third method, as yet unknown to me either... I'm intrigued. =) Until that time comes, I'll continue along the same track, with the next tutorial being on Cut/Paste and Find/Replace, two powerful and indispensable features for the serious demo editor.