Hey, I'm Simon and I made a game!! :)
Support me: BUY & Demo on Steam
This post is one part of the Watchdog Series.
Choose your weapon

Before you start creating the script you have to choose a scripting/programming language. I started with BAT-Files but later ported everything to C# because it runs faster and you have more functionality.

The BAT-Syntax is sometimes a bit cryptic. For example this %%~ni (BAT) and this Path.GetFileNameWithoutExtension(i) (C#) does the same, where I think the latter is better read-able. But it was possible to do everything within a BAT-File, so if you have no idea about other languages, give it a try!

Basic structure

I write two programs: one compares the screenshots and sends out warning mails (wd.exe, abbriviation for “Watchdog”) while the other one creates HTML galleries and sends out performance warning mails (wdg.exe, abbriviation for “Watchdog Gallery”)

Both programs require some parameters and that’s why we created a BAT-File for each containing only one line and which look like that:

watchdog.bat

wd.exe “C:\xrebirth\XRebirth.exe” “C:\Users\X Rebirth\Documents” “report@server.com” “-disablecockpit -disableui” “effecttest materials” “ep1open allzones_compass”

Parameters:

  1. Path to game EXE
  2. Path to documents directory
  3. Mail address/es where the error reports are send to
  4. Parameters for the game
  5. Parameters for the game to start different test-modules
watchdogGallery.bat

wdg.exe “C:\Documents\X Rebirth\screenshots” “galleryReport@server.com” 50 “perfReport@server.com”

Parameters:

  1. Path to the directory where the screenshots are put into
  2. Mail address/es where the gallery creation report is sent to
  3. FPS threshold which defines how much tolerance you give until a performance warning is sent out
  4. Mail address/es where the performance reports are sent to

Both BAT-Files are executed every night by our build server. This should enough dry theory, let’s have a look how it actually works.

Continue with the next part: Make the game make screenshots.

Leave a Reply

Your email address will not be published. Required fields are marked *