Chapter 5 of the lecture Game Programming taught at HAW Hamburg.
Introduction to continuous integration, API documentation generation, analytics, static code analysis and crash dump analysis.
2. Objectives
• To understand the importance of improved workflows
• To get an idea of which kinds of useful tools are out there
• To learn how to integrate tools into your daily workflow
2 / 43
3. Automated Builds
• Allow you to create nightly releases of your current game version
• Automate any pre- and post-build steps required for creating new
builds
• Track build successes and failures and their reasons
• Provide access to previous builds (history)
• Can parameterize build input and output
3 / 43
6. Typical Build Steps
• Accessing source control
▪ Syncing working copy
▪ Creating tags
• Writing version numbers
• Performing the actual build
• Packaging the build result
• Publishing the game on a build page
• Running unit tests
• Sending email notifications
6 / 43
9. API Documentation
• Can be automatically generated from properly formatted source
code comments
• Output format may vary (usually HTML)
• Tools are available for all major object-oriented languages (Javadoc,
Sandcastle, Doxygen)
9 / 43
19. Analytics in Games
• Track the origin, device and operation system of your players
• Track user engagement
▪ Retention
▪ A/B testing
• Track monetization success
• Track performance
▪ Framerate
▪ Crashes
19 / 43
20. Analytics in Games
• Involve many key questions
▪ What to track
▪ How to track (who, what, where, when)
▪ How to analyze data
• Enough material for a whole different course
20 / 43
22. Analytics in Games
22 / 43
Game Analytics API Call
private void OnVictory(Event e)
{
var victoryData = (VictoryEventData)e.EventData;
var eventKey = string.Format
("Level:Victory:{0}:{1}", this.currentLevel, victoryData.Type);
GA.API.Design.NewEvent(eventKey);
}
25. Consistent Code Style
• StyleCop analyzes C# source code to enforce a set of style and
consistency rules
• Helps developers avoid common pitfalls and mistakes
• Settings file can be checked in to version control
25 / 43
36. Hint
Setting up tools will always take
the same time.
Thus, the earlier you set up your
tools, the greater your benefit!
36 / 43
37. Crash Dump Analaysis
• Sadly, even released games and tools will sometimes crash
• Windows can automatically generate a minidump whenever a
program throws an unhandled exception
▪ Loaded modules
▪ Thread information
▪ Current call stack
• These can be loaded and debugged in Visual Studio
37 / 43
38. Crash Dump Analaysis
38 / 43
C:Program FilesProcdump>procdump.exe -ma -i D:TempDumps
ProcDump v7.0 - Writes process dump files
Copyright (C) 2009-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
With contributions from Andrew Richards
Set to:
HKLMSOFTWAREMicrosoftWindows NTCurrentVersionAeDebug
(REG_SZ) Auto = 1
(REG_SZ) Debugger = "C:Program FilesProcdumpprocdump.exe" -accepteula -ma
-j "D:TempDumps" %ld %ld %p
Set to:
HKLMSOFTWAREWow6432NodeMicrosoftWindows NTCurrentVersionAeDebug
(REG_SZ) Auto = 1
(REG_SZ) Debugger = "C:Program FilesProcdumpprocdump.exe" -accepteula -ma
-j "D:TempDumps" %ld %ld %p
ProcDump is now set as the Just-in-time (AeDebug) debugger.
39. Crash Dump Analaysis
39 / 43
C:Program FilesProcdump>procdump.exe -u
ProcDump v7.0 - Writes process dump files
Copyright (C) 2009-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
With contributions from Andrew Richards
Reset to:
HKLMSOFTWAREMicrosoftWindows NTCurrentVersionAeDebug
(REG_SZ) Auto = <deleted>
(REG_SZ) Debugger = "C:WINDOWSsystem32vsjitdebugger.exe" -p %ld -e %ld
Reset to:
HKLMSOFTWAREWow6432NodeMicrosoftWindows NTCurrentVersionAeDebug
(REG_SZ) Auto = <deleted>
(REG_SZ) Debugger = "C:WINDOWSsystem32vsjitdebugger.exe" -p %ld -e %ld
ProcDump is no longer the Just-in-time (AeDebug) debugger.
45. 5 Minute Review Session
• Which steps can be automated using a build server?
• How can API documentation be generated automatically?
• Which data can be tracked by analytics?
• How can you enforce a consistent code style within your team?
• Which tools can help you to detect code quality issues?
• How can you debug applications that crashed outside of Visual
Studio?