Thursday, May 28, 2009

The Source Engine Demo Saver Version 2.1

New Version 2.1 Released

Download Links:

FileFactory

L4Dmods.com

What is the Source Engine Demo Saver?

The Source Engine Demo Saver (or S.E.D.S. for short) is a small program to help users record, save, rename, and sort Source game demo recordings (.DEM). By simplifying the process of saving demo files, the Source Engine Demo Saver makes it easy to create Source game demos while minimizing the risk of overwriting older demo files.

Current Version: 2.1 (Updated May 27, 2009).

Currently Supported Games:

  • Team Fortress 2
  • Left 4 Dead
  • Garry's Mod

Instructions

Installation

When you first start the Source Engine Demo Saver, the Setup menu will appear automatically. First, enter your Steam Account Name into the text box. If you're unsure of your Steam Account Name, you can check it by opening Steam and selecting File > Settings, then click on the Account tab. Second, select all the games you want to use with S.E.D.S. Verify the information you have entered and selected is correct, then click on "Install Now" to install S.E.D.S.

Once installation has completed, the "Installation completed." message box will appear. Click "OK" to close the program.

Installation Instructions can be found inside the Help Contents (sedsHelp.chm) under "Introduction" > "Installing the Source Engine Demo Saver".


Recording & Saving

Recording demos with S.E.D.S. is only a keystroke away. Simply start a game with S.E.D.S. installed, join a server, and then press the NUMPAD_ENTER key to begin recording your first demo. A message will appear in chat telling you which demo file is being recorded to. If you want to start a new demo recording, you simply press the NUMPAD_ENTER key again to automatically begin a new demo. The Source Engine automatically makes a new demo each time a map changes, but not when you switch servers, so be sure to start a new demo recording for each server you join.

After you exit the game, simply run the Source Engine Demo Saver, check the boxes for the games you want to use the S.E.D.S. to save, and click on the "Save Demos" button. Your demos have now been saved to a "saved_demos'date'" folder in the game directory.

Recording & Saving Instructions can be found inside the Help Contents (sedsHelp.chm) under "Tutorials" > "Recording and Saving My First Demo".

Feedback

If you have any suggestions, questions, or encounter any bugs, please let me know right away. Post here, or send me an email at sedsfeedback@gmail.com. Additional features are planned to be added in the future, so be sure to check back.

Monday, May 4, 2009

Under The Hood: Building S.E.D.S. 2.0 (Part 2)

Work continues on the next version of the Source Engine Demo Saver; in the meantime, I continue to give a look "Under The Hood" at the process of putting the program together. Today, we dive headfirst into the shallow end of Visual C#.

Part 2 - S.E.D.S. + C# in 10 Days or Less

After looking into VBasic and C++, I ended up settling on Visual C#. I started putting together S.E.D.S. 2.0 in C# on April 17th, 2009 using the Express Edition. S.E.D.S. 2.0 was released on April 25th, 8 days later. My understanding of coding being rather simplistic, I did a bit of looking around online, read some documents, and then sat down to write out the goals I wanted the program to achieve and the methods by which to achieve them. For example, I needed the S.E.D.S. to grab the demo files in a specified directory, rename them, and move them to a new directory with the current date. That's the goal, and the methodology for achieving it I wrote as follows:

User-Specifies Directory (USD) > Find USD > Find ".dem" files in USD > Find Current Date > Create Directory w/Current Date IF Needed > Move ".dem" files to Dated Directory > Find Current Time > Rename ".dem" files with Current Time

From this point, I set out to learn how to perform each step and then put it all together. MSDN was probably the most useful resource, but because my understanding of even the basic lingo was lacking, Google was used often to fill in gaps or view examples of code for modification and implementation of existing functions. In the end, Version 2.0 made use of this primary code block to save demos:

Click the image for full-size.

My coding is probably sloppy in places; such is the fate of most amateur workings, but I hope to improve upon it. More importantly for me was that it was functional; it achieved my goals in what was fairly simple. Even though it had looked very confusing on the outside, learning to work in Visual C# wasn't quite so daunting after I had taken the dive in.

Another great thing about working in Visual C# was making use of Windows Forms. It functions and looks much better than the original console version of the S.E.D.S. did. After getting the core aspects of it working, I set out to put together an installer to get the needed files ready for saving:

The above is the Version 2.0 installer; I hope to reinvent it in the next publicly released version to be a bit more flexible. The function of the installer will also be improved upon. The tasks the Installer sets out to work on are adding a line to the autoexec.cfg file that calls for the seds.cfg file, and to copy the program seds.cfg file to the "cfg" directory for the chosen games. This prevents the S.E.D.S. from overwriting user autoexec files (many people use their autoexec for other things, myself included) while still allowing me to update the seds.cfg in future editions for better functionality (which is also coming down the pipes with the next version).

Join me next time as we look at preventing and fixing the PEBKAC with a Help File, a look at the seds.cfg file in 2.0, and a coat of paint on S.E.D.S. 2.0.

Continued in Part 3 - PEBKAC, Files, and Finishing Touches