2. About Me
“Best Bachelor“ Computer Science
Kiel University, 2009
Master Games
Hamburg University of Applied
Sciences, 2011
Lead Programmer
Daedalic Entertainment, 2011-2012
Co-Founder
slash games, 2013-2016
Technical Director
Daedalic Entertainment, 2016
2 / 79
11. Make testing easy!
11 / 79
At the beginning of Campus Buddies, Christian had the idea of creating
a debug web page containing links for several debug functions
creating and logging in a test user
adding points for the current user
unlocking achievements
and many, many more
13. Make testing easy!
13 / 79
This was arguably the best idea we had throughout the project.
14. Make testing easy!
14 / 79
• Debugging can be a pain in the ass
especially when network communication is involved
• Our debug page saved us lots of blood, sweat and tears
• The earlier you set up your debugging tools, the more you’ll benefit
from them
17. Deploy often!
17 / 79
Creating a new version can involve a step or two:
Accessing source control
o Syncing working copy
o 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
20. Rule 3
Use a bullet-proof, feature-based
project structure!
21. Bad Example
• Assets
EMHQ
o Data
– Icons
– Images
– Sprites
– Textures
o Resources
– Icons
o UI
– Common
» Sprites
EMHQ_gfx_export
o Textures
GUI
o Assets
– Images
21 / 79
22. Bad Example
• Assets
EMHQ
o Data
– Icons
– Images
– Sprites
– Textures
o Resources
– Icons
o UI
– Common
» Sprites
EMHQ_gfx_export
o Textures
GUI
o Assets
– Images
22 / 79
Bonus Objective:
- Find the icon for the Main
Menu button.
23. Bad Example
• Assets
EMHQ
o Data
– Icons
– Images
– Sprites
– Textures
o Resources
– Icons
o UI
– Common
» Sprites
– Base
» HUD
• Sprites
EMHQ_gfx_export
o Textures
GUI
o Assets
– Images
23 / 79
Bonus Objective:
- Find the icon for the Main
Menu button.
25. Feature Folders
• Project Root
FingerGestures
FreudBot
o Animations
o Atlases
o Fonts
o Localization
o Prefabs
o Scenes
o Sounds
o Sprites
o Scripts
HOTween
NGUI
NData
Unity Test Tools
25 / 79
35. 35 / 79
Why you should always start debugging immediately
36. Why you should always start debugging immediately
• Code entropy says your code will get worse, all the time, unless you
actively invest in preventing that
• Broken windows theory says the worse your code is, the worse it will
become
• Tracking down bugs is harder in a larger code base
• Tracking down bugs is harder in a buggy code base
36 / 12
39. Code Quality Tools
39 / 12
/// <summary>
/// Attaches the passed component to the entity with the specified id.
/// Note that this manager does not check whether the specified id is valid.
/// </summary>
/// <exception cref="ArgumentNullException">
/// Passed component is null.
/// </exception>
/// <exception cref="InvalidOperationException">
/// There is already a component of the same type attached.
/// </exception>
public void AddComponent(int entityId, IEntityComponent component)
{
if (component == null)
{
throw new ArgumentNullException("component");
}
if (this.components.ContainsKey(entityId))
{
throw new InvalidOperationException(
"There is already a component of type " + component.GetType() + " attached to entity with id "
+ entityId + ".");
}
this.components.Add(entityId, component);
this.OnComponentAdded(entityId, component);
}
51. Some are really nasty …
• Remote systems
• Race conditions
• Mobile development, embedded systems, drivers
• “Release Mode only” bugs
51 / 12
52. Quoting My Tutor
“If the bug is not where you expect it to be,
you better start looking for it where you’re not expecting it to be.”
- Hagen Peters
52 / 12
53. You need a repro. Period.
How can you be sure you’ve fixed it?
53 / 12
55. Gameplay First
55 / 60
Erich Schaefer. Postmortem: Blizzard's Diablo II.
http://www.gamasutra.com/view/feature/131533/postmortem_blizzards
_diablo_ii.php
“First, we make the game playable as soon as possible
in the development process. Our initial priority was to
get a guy moving around on the screen and hacking
monsters. This is what players would be doing most of
the time, and it had to be fun.”
57. Because you wouldn't use a screwdriver on a nail...
57 / 60
StarCraft II Galaxy Editor
58. 58 / 60
StarCraft II Galaxy Editor
Because you wouldn't use a screwdriver on a nail...
59. 59 / 60
StarCraft II Galaxy Editor
Because you wouldn't use a screwdriver on a nail...
60. 60 / 60
StarCraft II MakeCombat
Because you wouldn't use a screwdriver on a nail...
61. 61 / 60
Erich Schaefer. Postmortem: Blizzard's Diablo II.
http://www.gamasutra.com/view/feature/131533/postmortem_blizzards
_diablo_ii.php
“In many cases we created tools to speed up content
creation, but then abandoned them. Too often, we
decided to keep using inferior tools because we
thought we were almost done with the game, and
didn't want to take the time to improve them.
Unfortunately, in most of these cases, we were not
really almost done with the game.“
Because you wouldn't use a screwdriver on a nail...
90. Data Structure
90 / 60
https://en.wikipedia.org/wiki/MPQ
MPQ (Mo'PaQ, short for Mike O'Brien Pack, named after its creator[citation
needed]), is an archiving file format used in several of Blizzard
Entertainment's games.
MPQs used in Blizzard's games generally contain a game's data files,
including graphics, sounds, and level data. The format's capabilities
include compression, encryption, file segmentation, extensible file
metadata, cryptographic signature and the ability to store multiple
versions of the same file for internationalization and platform-specific
differences. MPQ archives can use a variety of compression algorithms
which may also be combined.
91. Data Structure
91 / 60
Hearthstone Localization Files (GAMEPLAY.txt)
TAG TEXT COMMENT
GAMEPLAY_COIN_TOSS_LOSTYou get an extra card
GAMEPLAY_COIN_TOSS_WON You go first
GAMEPLAY_FATIGUE_TITLE Fatigue
GAMEPLAY_FATIGUE_TEXT Out of cards! Take {0} damage.
GAMEPLAY_FATIGUE_HISTORY_TEXT Trying to draw from an empty deck
deals increasing damage to your hero.
GAMEPLAY_END_TURN END TURN
GAMEPLAY_ENEMY_TURN ENEMY TURN
GAMEPLAY_YOUR_TURN Your Turn
GAMEPLAY_ERROR_PLAY_REJECTED Too late! Your turn is over.
GAMEPLAY_MOBILE_BATTLECRY_CANCELED Battlecry canceled.
GAMEPLAY_MANA_COUNTER {0}/{1} 0=unused mana 1=current total mana
99. Commit To Quality
99 / 60
Erich Schaefer. Postmortem: Blizzard's Diablo II.
http://www.gamasutra.com/view/feature/131533/postmortem_blizzards
_diablo_ii.php
“The task of testing a game of Diablo II's scope, with its
huge degree of randomness and its nearly infinite
character skill and equipment paths, required a
Herculean effort. […] Would a party of five Paladins,
each using a different defensive aura, be untouchable?
After more than 100 hours of play, is a fire-based
Sorceress unable to continue in Hell Mode?”
100. Thank you for listening!
https://github.com/npruehs
@npruehs
nick.pruehs@daedalic.com