Beta Bug Fixing Meets Game Design
Update: If you ended up here looking for the open beta, I have no idea why wordpress is sending you here when it should be sending you here. Sorry, and I’m trying to figure it out!
So, I’m motoring along through my beta todo lists,1 and I start to investigate a bug Rachel found during a recent playtest: “suspected double agent on rollover but no triangles?”
Seems simple enough, and I’m able to reproduce it quickly. Allow me to explain the bug, and then the naive fix, and then the real fix that doesn’t mess up the game’s tuning…
Missions, Casting, and Game Modes
First, some missions have cast characters, meaning the Spy (or the code) gets to pick a character at the party to cast into a role, for example the Ambassador, the Seduction Target, or the Double Agent. These cast characters are displayed to the Spy and Sniper with a triangle over their heads, and the Sniper also gets a bit of rollover text when the target is on the cast character. You can see an example to the right.
The Sniper sometimes doesn’t get to see the correct cast character, so while both players get to know which character is the Ambassador, only the Spy gets to know who the Seduction Target is. For the Contact Double Agent mission, the Spy gets to see the real Double Agent, and the Sniper gets to see multiple Suspected Double Agents, and doesn’t know which one is really it.2
There are also multiple game modes on most maps, and some of the game modes are known as subset modes, where the Spy can select for play a subset of the total available missions for the map, and then optionally enable a subset of the selected missions. This is for more advanced play, and subsets prevent the Sniper from camping a given mission, or at least make it a very high risk strategy to do so because he or she can’t be sure the Spy is actually attempting that mission. The Sniper can see which missions the Spy has selected, but not which he or she has enabled, so in the shot below, you can see the Transfer Microfilm, Swap Statue, Inspect Statues, and Seduce Target missions are selected, but the Spy only has to do 3 out of 4 of them.3
The Bug
The bug reproduces when I deselect the Contact Double Agent mission on the Ballroom map, so there is no real Double Agent. The mission code still randomly casts the Suspected Double Agents and sends them to the Sniper. The Sniper code does “the right thing” in the code that draws the triangle and checks if the mission is selected, but doesn’t check in the rollover text code, and so you get the latter but not the former. It looks like the shot to the right.
I obviously shouldn’t be displaying the rollover text to the Sniper for Suspected Double Agents when that mission isn’t selected as available. Or should I…
The Fix(es)
My first thought was the obvious: check whether the mission is enabled, and if it is, don’t display the text. But as I was looking into making that fix, I started thinking about the ramifications of that change. None of the cast characters can be the Spy (currently), so that eliminates a bunch of people at the party from the Sniper’s point-of-view, including the Waiter, the Ambassador, the Security Guard, and yes, the Suspected Double Agents. If I fixed the bug and removed the rollover text, it would actually increase the number of potential Spies at the party, and change the tuning to make things more difficult for the Sniper. The more partygoers the Sniper has to worry about, the more information he or she has to sift through to find the real Spy.
But, if I go the other direction, and just remove the number of Suspected Double Agents from the party if the mission is not selected, then things get easier for the Sniper, because even if the Sniper knows the suspects can’t be the Spy, having that density of people in the room increases the cognitive load.
After bouncing this issue off a friend, it seems like the right thing to do in the near term is to still send over the Suspected Double Agents, and display the triangle and the rollover text, even if the mission is not selected. This way the number of people at the party stays constant regardless of whether that mission is selected, and the game stays tuned correctly. It’s actually a kind of interesting solution, because it means the Sniper has just a tiny bit more cognitive load, because the suspects will be at the party, but the Sniper will have to either lowlight them or remember to ignore them if the Contact Double Agent mission is not selected.
Here’s the fix that actually removes the enabled check on the triangle draw code:
=== modified file 'project/spyparty/code/situations/double_agent/double_agent.cpp' --- project/spyparty/code/situations/double_agent/double_agent.cpp 2012-02-24 03:13:37 +0000 +++ project/spyparty/code/situations/double_agent/double_agent.cpp 2012-03-14 21:20:46 +0000 @@ -414,8 +414,8 @@ } - if(enabled && ( (GameMode == MODE_SNIPER) || (GameMode == MODE_DEBUG)) ) { - // highlight the suspects + if4 { + // highlight the suspects, even if we're not enabled, else we're affecting the tuning of the map...sigh for(uint32 i = 0; i < NumSuspectedAgents; ++i) {
Eventually, once I’ve got enough people in the beta to get valid statistics, I can experiment with other solutions, like removing the suspects. Another thing I’m not sure of is whether I need to display the Double Agent on the Spy view in this case…currently I don’t. It’s hard to see how that would matter since the Spy’s gameplay is so different, but I’m not quite sure.
This was not the blog post I was planning on making today, but I found it interesting that such a simple bug could have subtle tuning impact like this, and decided to share. I firmly believe basically all game programming is game design, and the little decisions made while writing code are where the game design rubber hits the road, but this one surprised me with the subtlety of the ramifications. I’m trying to imagine what would have happened if this was a big game with a team of designers, a team of producers, and a team of programmers, and this bug got entered by QA into the database, shunted to a programmer via an associate producer, and then “fixed” and checked off the list. How long would it have taken to figure out why the Sniper was winning or losing more often than before after the next official beta build rollout?
I’ll post GDC pics next time!
- Yes, sadly, there are multiple todo lists. [↩]
- The real Double Agent is always a suspect. The Spy doesn’t get to know who the other suspects are, just to make things even crazier! Asymmetry everywhere! [↩]
- There are actually two kinds of subset modes, one where the Spy has to pick which subset he or she will attempt before starting, and another where the Spy can opportunistically attempt the missions at play time. [↩]
- GameMode == MODE_SNIPER) || (GameMode == MODE_DEBUG [↩]