<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SpyParty - A Spy Game About Subtle Behavior &#187; bugs</title>
	<atom:link href="http://www.spyparty.com/category/bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.spyparty.com</link>
	<description>Chris Hecker&#039;s new espionage game about subtle behavior, performance, perception, and deception.</description>
	<lastBuildDate>Sun, 16 Mar 2014 05:01:44 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.2</generator>
	<item>
		<title>In-game Replays Update and Preview</title>
		<link>http://www.spyparty.com/2014/01/20/in-game-replays-update-and-preview/</link>
		<comments>http://www.spyparty.com/2014/01/20/in-game-replays-update-and-preview/#comments</comments>
		<pubDate>Mon, 20 Jan 2014 21:50:14 +0000</pubDate>
		<dc:creator><![CDATA[checker]]></dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[competitive gaming]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[streams]]></category>

		<guid isPermaLink="false">http://www.spyparty.com/?p=4229</guid>
		<description><![CDATA[One of the things I want to do going forward is to talk about what I&#8217;m working on and what my near-term priorities and plans are&#8230;basically I want to put my todo list up on the blog somehow so you all can see what&#8217;s coming down the pike for SpyParty. Some indies, like Klei, actually [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>One of the things I want to do going forward is to talk about what I&#8217;m working on and what my near-term priorities and plans are&#8230;basically I want to put my todo list up on the blog somehow so you all can see what&#8217;s coming down the pike for <strong>SpyParty</strong>. Some indies, like <a href="http://kleientertainment.com/">Klei,</a> actually schedule their updates and make an event out of releasing them on a certain day, but I don&#8217;t think I have the production competence to hit those kinds of tight dates consistently, so I figure the next best thing is to at least talk about what I&#8217;m doing and how it&#8217;s going more regularly. While I figure out how to do that effectively here on the blog, here&#8217;s another ad hoc post on my current focus, &#8220;in-game replays&#8221;.</p>
<a name="What+are+replays%3F"></a><h3>What are replays?</h3>
<p>In a skill-based competitive game like <strong>SpyParty</strong> (or Starcraft or Counter-Strike or Go or Poker&#8230;), watching and studying games is an important part of learning and improving your skills. Right now, the only way to watch a game of <strong>SpyParty</strong> that you&#8217;re not participating in as a player is to watch a stream or a video. I stream on the <a href="http://twitch.tv/spyparty"><strong>SpyParty</strong> twitch.tv channel</a>, and I post videos to the <a href="http://youtube.com/spypartygame"><strong>SpyParty</strong> YouTube channel</a>, and lots of other beta testers stream and post videos too. You can catch a lot of streams by signing up for the <a title="SpyParty Streams Lists and Notification Sign Up" href="http://www.spyparty.com/streams/">SpyParty Streams Notifier</a>, and you can check out <a href="http://www.youtube.com/results?search_query=spyparty">all the Let&#8217;s Plays by searching YouTube</a>, but if somebody didn&#8217;t capture their game, there&#8217;s no way to go back and study it and it&#8217;s gone forever. Even if somebody did capture the game to video, if their camera angle wasn&#8217;t right, you might miss the thing you want to see.</p>
<p>Replays are the solution to these problems. A replay is a recording of the game, but it&#8217;s a recording of the stream of animation commands and events and movements instead of just a stream of images like a video, so you can move around in the replay while it&#8217;s playing, freeze it and look at the layout of the party, where the Sniper&#8217;s laser is relative to the Spy, and even rewind and study a section from different camera angles. Once replays are in, they&#8217;re going to revolutionize the study of elite <strong>SpyParty</strong> games; the plan is to capture a replay of every game ever played, and add them to a database that can be queried by any beta tester to study any game. About to play in a tournament against <a title="On EVO 2013, Interviewing kcmmmmm, and losing a bet with Seth Killian" href="http://www.spyparty.com/2013/07/10/on-evo-2013-interviewing-kcmmmmm-and-losing-a-bet-with-seth-killian/"><strong>kcmmmmm</strong></a>? Study the last 100 of his games against other high level players and try to get a feel for his play style. Heck, you can even sort of play the games from the Sniper&#8217;s point-of-view, trying to find the Spy, although since the Spy won&#8217;t repond to the laser sight it&#8217;s not going to be a real test. I don&#8217;t know whether this is going to benefit Spies or Snipers more,<sup><a href="http://www.spyparty.com/2014/01/20/in-game-replays-update-and-preview/#footnote_0_4229" id="identifier_0_4229" class="footnote-link footnote-identifier-link" title="my hunch is Snipers will benefit a bit more, but I don&rsquo;t know">1</a></sup> but it&#8217;s definitely going to raise the level of play across the board.</p>
<p>After I get replays working, the same technology will be used to implement &#8220;spectation&#8221;, which will allow you to log onto a game in-progress and watch it live, which is like watching a stream, but you can move the camera and see the action from either side, or even from a different camera position. At that point, if you join the lobby and everybody else is playing, you can just go spectate until somebody else joins to play. This will be huge for streaming, since it will allow people to cast other games, and commentate on the play! I&#8217;ll even implement mini-tournaments and simple betting within a spectation match, like some of the Starcraft mods do.</p>
<p>First, though, will come raw replays saved locally. You&#8217;ll be able to review your games, but to see somebody else&#8217;s you&#8217;ll have to get the replay file from them. The files should be pretty small, like hopefully one or two megabytes. After the bugs are worked out for that, I&#8217;ll get the replay database server up and running, and then spectation.</p>
<p>I really excited about replays, and I think they&#8217;ll increase the depth of the meta-game, and help the community share and discuss strategies.</p>
<a name="Video+Previews"></a><h3>Video Previews</h3>
<p>Here&#8217;s a video I recorded from last night&#8217;s stream for <a href="https://twitter.com/drawnonward"><strong>drawnonward</strong></a>&#8216;s 10,000th game (!). I gave a short preview of the current state of the replay system, which is still buggy but the hard part (rewind) is mostly working:</p>
<p><a href="http://www.spyparty.com/2014/01/20/in-game-replays-update-and-preview/"><em>Click here to view the embedded video.</em></a></p>
<p>If you&#8217;d like to see videos of the terrible things I did to the partygoers as I was getting rewind working, you can check out these two videos:</p>
<p><a href="http://www.spyparty.com/2014/01/20/in-game-replays-update-and-preview/"><em>Click here to view the embedded video.</em></a></p>
<p><a href="http://www.spyparty.com/2014/01/20/in-game-replays-update-and-preview/"><em>Click here to view the embedded video.</em></a></p>
<hr/><ol class="footnotes"><li id="footnote_0_4229" class="footnote">my hunch is Snipers will benefit a bit more, but I don&#8217;t know</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.spyparty.com/2014/01/20/in-game-replays-update-and-preview/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Release Notes for 3076 and 3091! (Let&#8217;s forget about 3075, shall we?)</title>
		<link>http://www.spyparty.com/2013/12/21/release-notes-for-3076-and-3091-lets-forget-about-3075-shall-we/</link>
		<comments>http://www.spyparty.com/2013/12/21/release-notes-for-3076-and-3091-lets-forget-about-3075-shall-we/#comments</comments>
		<pubDate>Sun, 22 Dec 2013 00:13:43 +0000</pubDate>
		<dc:creator><![CDATA[checker]]></dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[release notes]]></category>
		<category><![CDATA[streams]]></category>

		<guid isPermaLink="false">http://www.spyparty.com/?p=4174</guid>
		<description><![CDATA[Here&#8217;s the latest release notes stream, co-hosted by virifaux.  It is just release notes.  It is not 2 hours and 44 minutes of me trying to fix showstopper bugs live on stream.1 These builds were a long time coming because I had to re-do the entire inside of the game in preparation for spectation and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s the latest release notes stream, co-hosted by <strong>virifaux</strong>.  It is just release notes.  It is not 2 hours and 44 minutes of me trying to fix showstopper bugs live on stream.<sup><a href="http://www.spyparty.com/2013/12/21/release-notes-for-3076-and-3091-lets-forget-about-3075-shall-we/#footnote_0_4174" id="identifier_0_4174" class="footnote-link footnote-identifier-link" title="If you really want to see that, here is your link.">1</a></sup></p>
<p>These builds were a long time coming because I had to re-do the entire inside of the game in preparation for spectation and replays, which aren&#8217;t quite done yet, but are getting closer.  However, I put in a bunch of really important bug fixes, the cool looking &#8220;menu party&#8221;, the oft-requested &#8220;back button&#8221; on the game setup screens, and Practice Mode is now handled properly so it can be used for <a title="How to Report Bugs the SpyParty Way" href="http://www.spyparty.com/2012/04/12/how-to-report-bugs-the-spyparty-way/">bug repros</a> much more reliably.  Also, you can see some nascent spectation action developing with the addition of hitting &lt;tab&gt; to switch between Spy and Sniper views in Practice Mode.</p>
<p>Oh, and of course:</p>
<div id="attachment_4177" style="width: 610px" class="wp-caption aligncenter"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/12/santalanterns.png"><img class="size-large wp-image-4177 " alt="santalanterns!" src="http://cdn.spyparty.com/wp-content/uploads/2013/12/santalanterns-600x251.png" width="600" height="251" /></a><p class="wp-caption-text">Santalanterns! Inspiration courtesy of zerotka, as per usual with our holiday Easter Eggs!</p></div>
<p><a href="http://www.spyparty.com/2013/12/21/release-notes-for-3076-and-3091-lets-forget-about-3075-shall-we/"><em>Click here to view the embedded video.</em></a></p>
<p>&nbsp;</p>
<hr/><ol class="footnotes"><li id="footnote_0_4174" class="footnote">If you really want to see that, <a href="http://www.twitch.tv/spyparty/b/487857396">here is your link</a>.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.spyparty.com/2013/12/21/release-notes-for-3076-and-3091-lets-forget-about-3075-shall-we/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>This Week in SpyParty, Week 2: A Bug In Plain Sight</title>
		<link>http://www.spyparty.com/2013/11/22/this-week-in-spyparty-week-2-a-bug-in-plain-sight/</link>
		<comments>http://www.spyparty.com/2013/11/22/this-week-in-spyparty-week-2-a-bug-in-plain-sight/#comments</comments>
		<pubDate>Fri, 22 Nov 2013 20:39:35 +0000</pubDate>
		<dc:creator><![CDATA[ZeroTKA]]></dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[streams]]></category>
		<category><![CDATA[thisweek]]></category>

		<guid isPermaLink="false">http://www.spyparty.com/?p=4057</guid>
		<description><![CDATA[This week there was a recent bug discovery that caught my attention. With any game, especially one in beta, there are going to be bugs regardless of how hard you try to prevent them. The nature of the beast is if you have a game then you have bugs in your code. Some bugs are [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This week there was a recent bug discovery that caught my attention. With any game, especially one in beta, there are going to be bugs regardless of how hard you try to prevent them. The nature of the beast is if you have a game then you have bugs in your code. Some bugs are minor and some are absolutely game-breaking. This one in particular seems like it should have been found ages ago.</p>
<a name="What+is+This+Bug%3F"></a><h3><strong>What is This Bug?</strong></h3>
<p>The bug that was discovered allows your laser to pass through certain sections of certain characters. This makes it seem like you miss some of your shots even though you really shouldn&#8217;t. This bug is easy to reproduce as well. All you have to do is aim at these imaginary holes and that&#8217;s it. For example, <a href="http://www.twitch.tv/virifaux/b/479531360">you can aim your laser at the stomach region</a> of Alphonse &#8220;Snaps&#8221; Mcgee, or at his hat: </p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/11/shoot-through-bug.png"><img class="size-medium wp-image-4087 aligncenter" alt="shoot-through-bug" src="http://cdn.spyparty.com/wp-content/uploads/2013/11/shoot-through-bug-300x168.png" width="300" height="168" /></a></p>
<p>Since there was a good <a href="http://www.spyparty.com/2012/04/12/how-to-report-bugs-the-spyparty-way/">repro</a>, <strong>checker</strong> was able to find and fix it pretty quickly. I asked him if he could give us a more technical side to this bug and he agreed. Here is his response:</p>
<blockquote>
<p><em>Okay, so the characters are made out of triangles. For the old characters, there are about 1.5k tris, and for the new ones there are about 11k tris.  It&#8217;s slow to do a raycast against all these triangles, so you do check on the overall bounding box of the character first, since that&#8217;s much faster.  If your bounding box is conservative, then that means all the triangles are inside it, so if the ray doesn&#8217;t hit the bounding box, you don&#8217;t have to test all the triangles.  But, since that test assumes all the triangles are inside the bounding box (hence the word &#8220;bounding&#8221;), if that&#8217;s not actually true, you won&#8217;t test the triangles at all. </em></p>
</blockquote>
<p>This is what the bounding box looked like before the fix:</p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-busted.png"><img class="size-medium wp-image-4083 aligncenter" alt="snaps-busted" src="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-busted-205x300.png" width="205" height="300" /></a></p>
<p style="text-align: center;"> </p>
<p style="text-align: left;">This is what it looks like after the fix:</p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-fixed.png"><img class="aligncenter size-medium wp-image-4089" alt="snaps-fixed" src="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-fixed-202x300.png" width="202" height="300" /></a></p>
<p>I looked into this bug so I could gain my own understanding of it. I noticed the holes seemed to disappear during animations and while holding a drink. I asked <strong>checker</strong> if he could give some insight into what&#8217;s happening. Here is what he had to say:</p>
<blockquote>
<p><em>With animated characters, you really don&#8217;t want to build the bounding box from the triangles as they move around because that&#8217;s slow, and you often don&#8217;t have access to the posed triangles because that happens on the video card, so you build the bounding box from the bones themselves, and then expand it a bit (20% in this case) to get all the triangles. Well, with the old skeleton, it&#8217;s almost flat on the xz plane in the rest pose, so the expansion doesn&#8217;t do much.  When you&#8217;re holding a drink, your arm is forward, and that makes the bounding box actually bound the whole body! </em></p>
</blockquote>
<p>These are images with the old bounding box built from the bones:</p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-busted-bones.png"><img class="size-medium wp-image-4090 alignnone" alt="snaps-busted-bones" src="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-busted-bones-205x300.png" width="205" height="300" /></a> <a href="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-busted-bones-drink.png"><img class="size-medium wp-image-4091 alignnone" alt="snaps-busted-bones-drink" src="http://cdn.spyparty.com/wp-content/uploads/2013/11/snaps-busted-bones-drink-191x300.png" width="191" height="300" /></a></p>
<p>So what was the fix?</p>
<blockquote>
<p><em>I looked at the code, and with the current (read: slow) animation code I decided it wouldn&#8217;t actually be any slower if I just computed the triangle-accurate bounding box.  Once I optimize the animation code, I&#8217;ll have to come up with a better solution, potentially having bounding boxes for each bone authored in Maya, or something smarter, I&#8217;m not sure yet.</em></p>
</blockquote>
<a name="How+was+it+Discovered%3F"></a><h3><strong>How was it Discovered?</strong></h3>
<p><strong>krazycaley </strong>took on challenger <strong>virifaux</strong> in <em><a title="Welcoming Zero &amp; This Week in SpyParty, Week 1: Spy on the Hill" href="http://www.spyparty.com/2013/11/12/welcoming-zero-this-week-in-spyparty-week-1-spy-on-the-hill/">Spy on the Hill</a> </em>week 7. It was during one of these games the Sniper appeared to shoot through one of the characters to both the stream viewers and to himself.  Interestingly enough, he did!</p>
<p>You can hear  <strong>krazycaley</strong> exclaim &#8220;Noooo! Miss!&#8221; right after the shot. He knew who <strong>virifaux </strong>was and <strong>virifaux </strong>knew he was dead to rights. Yet somehow he was still alive. This was enough to pique the interest of <b>virifaux</b> and he chose to pursue it more deeply a day later. Once he discovered a reliable way <a title="How to Report Bugs the SpyParty Way" href="http://www.spyparty.com/2012/04/12/how-to-report-bugs-the-spyparty-way/">to reproduce the bug</a>, he made a quick video showcasing it in action, marking the beginning of the end for this bug.</p>
<p>Streaming was a big help in squashing this bug.  <strong>SpyParty</strong> doesn&#8217;t support replays yet, which makes bug hunting difficult sometimes. Streaming is probably the next best thing. If pictures are worth a thousand words then videos are probably worth a couple million. In this case, the video gave clues to <b>virifaux</b> for where to start looking. He knew exactly what it looked like when the bug occured. He could watch it over and over until he formulated his hypothesis. Then he could go into practice mode and test it out. </p>
<p>Streaming and videos give us great insight into reproducing pesky bugs. Streaming may not always be the main tool in bug hunting, but streams and videos are almost always helpful for gathering more evidence and figuring out a clean repro.   This was the case with <a title="One Bug’s Story, or, Assume it’s a bug!" href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/">another bug&#8217;s story</a>. I don&#8217;t think streaming was the main reason this bug was caught and squashed but it certainly played a role. </p>
<a name="Why+is+This+Interesting%3F"></a><h3><strong>Why is This Interesting?</strong></h3>
<p>I find it very interesting the bug was discovered only now. When first looking over the new bug report, <strong>checker</strong> made a post stating he remembers this happened a long time ago and that it was super rare, so we know this bug has been in the game for quite some time.</p>
<p>I am going to throw some numbers your way to help give an idea of the scope of this thing. There are currently over 11,000 people who have <a title="SpyParty Beta Registration" href="http://www.spyparty.com/beta/">registered with the beta</a>. The top 100 players have a combined total of 185,520 games played. It&#8217;s safe to say there have been a lot of games played across the entire community. This isn&#8217;t even counting the number of people who have played at conventions. In all of the games that have been played, this bug is just now being talked about and reproduced.</p>
<p>That&#8217;s not the only thing about this particular bug that makes it so interesting to me. Not only have there been tons of games in which it could have been discovered, the steps needed to reproduce the bug are really simple. When you combine these two characteristics together, it&#8217;s crazy how long this bug has lasted! However, thinking about it more deeply, maybe it&#8217;s not so crazy after all&#8230;</p>
<p>There are a few things that need to align correctly in order for this to be spotted. The main thing is looking at the character from the side. Next the character can&#8217;t be doing the vast majority of animations nor can he or she have a drink in their hands. Finally, the sniper has to aim in the correct spots. Perhaps you also need to be streaming for <a href="http://www.twitch.tv/spyparty/b/477977498?t=22m45s"><em>Spy on the Hill</em> week 7</a>.</p>
<p>Whatever the case, the bug is nearing the end of its lifetime since it&#8217;s fixed on <strong>checker&#8217;s</strong> local copy, but until the patch goes live you might be able to utilize this bug in a game mode. As beta tester <strong>virifaux </strong>said, &#8220;Now that we have a reliable reproduction, we&#8217;ll have skill shots where we shoot through McGee to hit the spy.&#8221; Bugs can be fun to play with so get in your skill shots before it&#8217;s too late!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spyparty.com/2013/11/22/this-week-in-spyparty-week-2-a-bug-in-plain-sight/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>One Bug&#8217;s Story, or, Assume it&#8217;s a bug!</title>
		<link>http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/</link>
		<comments>http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#comments</comments>
		<pubDate>Sun, 10 Feb 2013 03:07:44 +0000</pubDate>
		<dc:creator><![CDATA[checker]]></dc:creator>
				<category><![CDATA[beta]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[streams]]></category>

		<guid isPermaLink="false">http://www.spyparty.com/?p=3024</guid>
		<description><![CDATA[This is the story of a bug in SpyParty.  This story has a happy ending, because the SpyParty beta testers are amazing, and they are constantly helping find bugs, of course, but they are also constantly helping me reproduce bugs, and narrow down the potential causes of bugs, and triage them, and are generally providing [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This is the story of a bug in <strong>SpyParty</strong>.  This story has a happy ending, because the <strong>SpyParty</strong> beta testers are amazing, and they are constantly helping find bugs, of course, but they are also constantly helping me reproduce bugs, and narrow down the potential causes of bugs, and triage them, and are generally providing me with incredible support so I can make the game better.</p>
<p>This bug also has an interesting story, because it turned out to have a very subtle cause, one that manifested itself intermittently in ways that looked almost random, and for a long time there was no &#8220;repro case&#8221;.  Getting a repro on a bug is the key to fixing it, as I discuss in the <a title="How to Report Bugs the SpyParty Way" href="http://www.spyparty.com/2012/04/12/how-to-report-bugs-the-spyparty-way/">How to Report Bugs the <strong>SpyParty</strong> Way</a> post.  It can make the difference between a 10 minute fix and a 10 day fix&#8230;or never managing to find and fix it.  <em></em></p>
<p><em>*shudder*</em></p>
<p>But let&#8217;s start at the beginning&#8230;</p>
<p>I first noticed the bug long before I&#8217;d invited people into the beta, but it was so rare that I didn&#8217;t prioritize finding it, and in fact I would forget about it for stretches of time.  Yes, I make notes of bugs I see, but I&#8217;ve got so much high priority stuff to do right now that I don&#8217;t go back and look at that list very often&#8230;the important bugs get fixed immediately, but a bug like this can stay in for a long time.</p>
<p>So, what&#8217;s the bug?  Well, let&#8217;s go to the videotape:</p>
<p><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/"><em>Click here to view the embedded video.</em></a></p>
<p>This video was from a <a href="http://www.youtube.com/watch?v=ASkd9vpner4">Spy Commentary game</a> played between <strong>buxx</strong> and <strong>dieffenbachj</strong>, two early beta testers who were some of the first to upload gameplay videos.</p>
<p>It turns out, in addition to just being plain awesome for games overall, the rise of videos and streams is also an amazing resource for bug finding and fixing!  The more people record their games, the more they&#8217;ll be able to point to a video of exactly what went wrong so the developers can see it almost first-hand.  The bane of a developer&#8217;s life is a bug report that says, &#8220;the game broke&#8221; with no other description.  You know something&#8217;s probably wrong, but it&#8217;s basically useless for finding a problem.  With a video, you can usually see exactly what&#8217;s going on, so that problem is eliminated, or at least massively reduced.</p>
<p>So, as you can see in that video, the Spy is facing the wrong way on the floor pad.  The Spy should be facing the pedestal with the statue on it in that position, but in this case the Spy is turned 90 degrees.</p>
<p>I watched <strong>buxx</strong>&#8216;s videos when he posted them<sup><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#footnote_0_3024" id="identifier_0_3024" class="footnote-link footnote-identifier-link" title="&hellip;because they&rsquo;re great for learning, the only thing better than video is commentated video!">1</a></sup> and I noticed this, and so I posted a bug in the Bugs Forum on the private beta website myself on May 6th, 2012.</p>
<p>Obviously, trying to repro it by replaying the steps in that video was fruitless.</p>
<p>Next up, <strong>bishop</strong> caught it with a screenshot and posted on May 13th, 2012:</p>
<p><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20120512-08-45-22.png"><img class="aligncenter size-large wp-image-3034" title="SpyParty-20120512-08-45-22" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20120512-08-45-22-600x349.png" width="600" height="349" /></a></p>
<p>It&#8217;s a perfect shot, but his next post is &#8220;I haven&#8217;t had much luck on the repro.&#8221;</p>
<p><strong>ardonite</strong> chimes in the next day:</p>
<blockquote>
<p>I got the rotation bug once at a statue.</p>
<p>I think I was rriiiiight in the bounding box. So maybe if it&#8217;s on a border pixel of the box then it glitches out?</p>
<p>Edit: no, hypothesis incorrect.</p>
</blockquote>
<p>That&#8217;s how it goes: make a hypothesis, check it, repeat.</p>
<p>More shots every couple months over the summer from <strong>bishop</strong> and <strong>r7stuart</strong>:</p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20120527-15-36-37.png"><img class="size-medium wp-image-3040 aligncenter" title="SpyParty-20120527-15-36-37" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20120527-15-36-37-300x174.png" width="300" height="174" /></a></p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/2012-08-09_00003.jpg"><img class="size-medium wp-image-3032 aligncenter" title="2012-08-09_00003" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/2012-08-09_00003-300x159.jpg" width="300" height="159" /></a></p>
<p><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/2012-08-10_00001.jpg"><img class="aligncenter size-medium wp-image-3033" title="2012-08-10_00001" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/2012-08-10_00001-300x159.jpg" width="300" height="159" /></a></p>
<p>Still no repro.</p>
<p>This entire time—in fact since I first saw it myself pre-beta—I&#8217;ve been trying to resist thinking it&#8217;s some kind of &#8220;numerical issue&#8221; with the code that handles the facing angle.  Yes, angles are finicky to deal with due to wrapping, but I&#8217;ve found programmers, including myself, tend to immediately go to vague concepts like &#8220;floating point error&#8221; for anything like this.  To fight this tendency back when we were working on physical simulation code together, <a href="http://www.mollyrocket.com/136">Casey Muratori</a> and I developed a mantra:  <strong>&#8220;Assume it&#8217;s a bug!&#8221;</strong>  It means that instead of assuming it&#8217;s some subtle floating point error creeping in, or anything mysterious like that, it&#8217;s almost certainly just some dumb programming bug.  That mantra has never failed me.  It&#8217;s always just a plain old bug.</p>
<p>Onward&#8230;</p>
<p>In the fall of 2012, <a href="http://www.spyparty.com/streams/">streaming <strong>SpyParty</strong></a> took off bigtime, and so people were recording their games more often, and we started to get more videos, this one from <strong>r7stuart</strong> in October:</p>
<p><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/"><em>Click here to view the embedded video.</em></a></p>
<p>And <strong>tytalus</strong> in November:</p>
<p><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/"><em>Click here to view the embedded video.</em></a></p>
<p>I saw this last one live on <a href="http://www.twitch.tv/tytaluswarden">tytalus&#8217;s stream</a>, and grimaced when it happened, but also was happy to have more data to some day find a repro, or just have a random brainwave and fix it by intuition.<sup><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#footnote_1_3024" id="identifier_1_3024" class="footnote-link footnote-identifier-link" title="This happens in programming a lot, but you don&rsquo;t want to count on it if you don&rsquo;t have to.">2</a></sup></p>
<p>At this point, people were reporting NPCs doing it, which at least made me happy, because it meant it wasn&#8217;t a <em>tell</em>.  Tells and anti-tells<sup><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#footnote_2_3024" id="identifier_2_3024" class="footnote-link footnote-identifier-link" title="Where the NPCs can do something the Spy can&rsquo;t.">3</a></sup> are the most serious <strong>SpyParty</strong> bugs, because they undermine the delicate balance of the game, so I proritize them highest, even above crash bugs sometimes!</p>
<p>A couple on New Year&#8217;s Eve from <strong>jorjon</strong>:</p>
<p><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20121231-12-40-42-0.png"><img class="aligncenter size-medium wp-image-3036" title="SpyParty-20121231-12-40-42-0" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20121231-12-40-42-0-300x159.png" width="300" height="159" /></a></p>
<p><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20121231-12-49-28-0.png"><img class="aligncenter size-medium wp-image-3029" title="SpyParty-20121231-12-49-28-0" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20121231-12-49-28-0-300x159.png" width="300" height="159" /></a></p>
<p>Then two clips from streams, the first from <strong>slappydavis</strong>, who&#8217;s Seduction Target appears to do it at the bookshelf on January 6th:</p>
<p><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/"><em>Click here to view the embedded video.</em></a></p>
<p>And then from james1221 on January 12th during the <a title="SpyParty New Years Cup Tournament Starting Tonight!" href="http://www.spyparty.com/2013/01/02/spyparty-new-years-cup-tournament-starting-tonight/"><strong>SpyParty</strong> New Years Cup Tournament</a>:</p>
<p><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/"><em>Click here to view the embedded video.</em></a></p>
<p>Both of these are different, however.  In both cases, the NPC is being blocked by another character, and instead of repathing to a new place, they just wait until the blocking character leaves.  This is both good news and bad news.  It means it&#8217;s easy to project this bug onto other bugs, it means there are other bugs,<sup><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#footnote_3_3024" id="identifier_3_3024" class="footnote-link footnote-identifier-link" title="duh">4</a></sup> and it means all the real examples of this bug so far have involved the Spy.  I don&#8217;t mention this last part in the hopes that nobody notices.  Luckly it&#8217;s rare enough that it&#8217;s not going to be a game balance changer even if it is a tell.</p>
<p>Finally, <strong>kcmmmmm</strong> finds a reliable repro on February 7th, two days ago, and 8 months after the first post in the Bugs thread!  These pictures are beautiful to me:</p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20130207-12-09-59-0.png"><img class="aligncenter  wp-image-3031" title="SpyParty-20130207-12-09-59-0" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20130207-12-09-59-0-600x556.png" width="360" height="334" /></a></p>
<p style="text-align: center;"><a href="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20130207-12-03-01-0.png"><img class="aligncenter  wp-image-3030" title="SpyParty-20130207-12-03-01-0" alt="" src="http://cdn.spyparty.com/wp-content/uploads/2013/02/SpyParty-20130207-12-03-01-0-600x556.png" width="360" height="334" /></a></p>
<p>You can stand at that position, with that camera angle, and repro the bug most tries.  He also figures out that it&#8217;s very camera angle dependent, which is another clue, but once I could repro it locally, its remaining time on this earth was measured in minutes.</p>
<p>I had some trouble reproing it reliably here, including a couple wild-goose chases where I thought it wouldn&#8217;t repro with the debugger running<sup><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#footnote_4_3024" id="identifier_4_3024" class="footnote-link footnote-identifier-link" title="Sometimes this happens with an uninitialized variable, since the debugger initializes most memory to zero for you.">5</a></sup> or in my debugging modes,<sup><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#footnote_5_3024" id="identifier_5_3024" class="footnote-link footnote-identifier-link" title="Could mean some debug code was correcting for the bug?">6</a></sup> but in the end I got a case where I could catch it in the debugger, and I looked at the source, and there it was, suspiciously rotten code.</p>
<p>It was an old check from when I used to support click-to-move, as opposed to direct-control of the spy.  There was a case in the code that would check if you were clicking on the bookshelf itself, rather than the floor pad in front of the bookshelf, and it would helpfully direct you to the floor pad.  The position part of this got taken out long ago (I think), but the angle part remained in, so when the Spy stopped moving, if the mouse was over the bookshelf that code would return the angle for facing the bookshelf.</p>
<p>Wait, you say, there&#8217;s no mouse cursor in Spy mode?  Ah, yes there is, it&#8217;s just hidden and forced into the middle of the screen.  So, most of the time it hits your back, but sometimes, if you&#8217;re turning or leaning down or whatever when you stop, it&#8217;ll miss you and hit what&#8217;s behind you, and if it hits a bookshelf on the frame when you stop, you get the wrong facing angle.</p>
<p>Now, with this knowledge, go back and watch the videos and look a the pictures above.  Always a nearby guilty bookcase, isn&#8217;t there? </p>
<p>But wait, you say again, what about the very first video, the green bookshelf is nowhere near the middle of the screen!  Ah, but <strong>buxx</strong> uses a controller,<sup><a href="http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/#footnote_6_3024" id="identifier_6_3024" class="footnote-link footnote-identifier-link" title="You can see the action UI in the video uses the controller icons! No detail is too small to matter in a bug!">7</a></sup> and the mouse gets hidden but doesn&#8217;t get centered if you&#8217;re using a controller!  It probably should, but it doesn&#8217;t.  So, <strong>buxx</strong>&#8216;s hidden mouse pointer is probably off to the right of the window, over the green bookshelf, until he moves one pedestal pad to the left, and then the mouse pointer is no longer on the bookshelf, and he faces the right way!</p>
<p>Awesome, all the cases explained, and the bug was trivial to fix!</p>
<p>Okay, there&#8217;s actually one more case in the Bugs thread I didn&#8217;t post here, because it&#8217;s funny enough that I&#8217;m going to make an entire post about it soon.</p>
<p>So, just remember, always, <strong>Assume it&#8217;s a bug!</strong></p>
<hr/><ol class="footnotes"><li id="footnote_0_3024" class="footnote">&#8230;because they&#8217;re great for learning, the only thing better than video is commentated video!</li><li id="footnote_1_3024" class="footnote">This happens in programming a lot, but you don&#8217;t want to count on it if you don&#8217;t have to.</li><li id="footnote_2_3024" class="footnote">Where the NPCs can do something the Spy can&#8217;t.</li><li id="footnote_3_3024" class="footnote">duh</li><li id="footnote_4_3024" class="footnote">Sometimes this happens with an uninitialized variable, since the debugger initializes most memory to zero for you.</li><li id="footnote_5_3024" class="footnote">Could mean some debug code was correcting for the bug?</li><li id="footnote_6_3024" class="footnote">You can see the action UI in the video uses the controller icons! No detail is too small to matter in a bug!</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.spyparty.com/2013/02/09/one-bugs-story-or-assume-its-a-bug/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Object Caching 610/619 objects using apc
Content Delivery Network via Amazon Web Services: CloudFront: cdn.spyparty.com

 Served from: www.spyparty.com @ 2014-04-13 04:00:30 by W3 Total Cache -->