This Week in SpyParty, Week 2: A Bug In Plain Sight

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.

What is This Bug?

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’t. This bug is easy to reproduce as well. All you have to do is aim at these imaginary holes and that’s it. For example, you can aim your laser at the stomach region of Alphonse “Snaps” Mcgee, or at his hat: 

shoot-through-bug

Since there was a good repro, checker 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:

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’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’s much faster.  If your bounding box is conservative, then that means all the triangles are inside it, so if the ray doesn’t hit the bounding box, you don’t have to test all the triangles.  But, since that test assumes all the triangles are inside the bounding box (hence the word “bounding”), if that’s not actually true, you won’t test the triangles at all. 

This is what the bounding box looked like before the fix:

snaps-busted

 

This is what it looks like after the fix:

snaps-fixed

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 checker if he could give some insight into what’s happening. Here is what he had to say:

With animated characters, you really don’t want to build the bounding box from the triangles as they move around because that’s slow, and you often don’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’s almost flat on the xz plane in the rest pose, so the expansion doesn’t do much.  When you’re holding a drink, your arm is forward, and that makes the bounding box actually bound the whole body! 

These are images with the old bounding box built from the bones:

snaps-busted-bones snaps-busted-bones-drink

So what was the fix?

I looked at the code, and with the current (read: slow) animation code I decided it wouldn’t actually be any slower if I just computed the triangle-accurate bounding box.  Once I optimize the animation code, I’ll have to come up with a better solution, potentially having bounding boxes for each bone authored in Maya, or something smarter, I’m not sure yet.

How was it Discovered?

krazycaley took on challenger virifaux in Spy on the Hill 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!

You can hear  krazycaley exclaim “Noooo! Miss!” right after the shot. He knew who virifaux was and virifaux knew he was dead to rights. Yet somehow he was still alive. This was enough to pique the interest of virifaux and he chose to pursue it more deeply a day later. Once he discovered a reliable way to reproduce the bug, he made a quick video showcasing it in action, marking the beginning of the end for this bug.

Streaming was a big help in squashing this bug.  SpyParty doesn’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 virifaux 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. 

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 another bug’s story. I don’t think streaming was the main reason this bug was caught and squashed but it certainly played a role. 

Why is This Interesting?

I find it very interesting the bug was discovered only now. When first looking over the new bug report, checker 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.

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 registered with the beta. The top 100 players have a combined total of 185,520 games played. It’s safe to say there have been a lot of games played across the entire community. This isn’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.

That’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’s crazy how long this bug has lasted! However, thinking about it more deeply, maybe it’s not so crazy after all…

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’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 Spy on the Hill week 7.

Whatever the case, the bug is nearing the end of its lifetime since it’s fixed on checker’s local copy, but until the patch goes live you might be able to utilize this bug in a game mode. As beta tester virifaux said, “Now that we have a reliable reproduction, we’ll have skill shots where we shoot through McGee to hit the spy.” Bugs can be fun to play with so get in your skill shots before it’s too late!

Zero’s Notebook #1: Your Brain, Your Opponent

Playing SpyParty is hard work. If you come to the booth at a convention, you have to read the manual before you can play for the first time. If you play online, you are highly encouraged to read the manual, watch the tutorial video, and play around in practice mode.  Finally, you start to play other humans and learn the plethora of ways the Spy can die and the madness of trying to sift through a party as a Sniper. These first moments of everyone’s SpyParty career can be tough. Luckily, we have an awesome community that’s always willing to help mentor new players and answer their questions. 

So, you ask for and receive some mentoring and you feel like you’re starting to get everything down. You know the missions and you know the tells associated with them. You now feel ready to face off against more experienced opponents. The thing is, when you play SpyParty, you are playing against more than just your opponent. You will also be fighting off your own brain and the mischievous AI. This first episode of Zero’s Notebook takes us through some of the odder things that you may encounter, including Chronostasis, and shooting the Spy even though you misremembered the statues.

YouTube Preview Image

Welcoming Zero & This Week in SpyParty, Week 1: Spy on the Hill

Hi there, Chris Hecker here, sneaking in at the top of this, the first post by the newest member of the SpyParty team, Keith Millot, more commonly known as zerotka in the lobby! Keith has been a SpyParty beta tester since there were SpyParty beta testers…he was in the first batch of community invites oh so long ago—he even made an awesome video about his first year of beta testing—and he’s been an active member of the community since the beginning. He wrote the amazing Into the Mind of an AI series in the beta forums, analyzing the NPC behavior; it is required reading for anybody who wants to get good at the game (and I hope to make it public at some point soon). He’s been a great resource for ideas about the game, and as a big fan of streaming he’s helped me numerous times with advice on how to do that better. He helped out at PAX this year, although he tried to avoid my all-seeing camera. At some point, it just became clear he should join the team and start doing more frequent public writing and video editing for fans and beta testers. So, please join me in welcoming Keith, and you and I can look forward to more of these kinds of posts in the near future!


Hello! My name is Keith, or zerotka in game, and I will be bringing you weekly updates for what’s going on in the world of SpyParty. This will allow you to keep tabs on all the interesting discussions on the forums and stay abreast of all the wonderful things happening in the SpyParty community. Speaking of wonderful things happening in the community, let’s talk about Spy on the Hill!

Spy on the Hill's sweet logo

Spy on the Hill’s sweet logo

Hear Ye! Hear Ye! 

krazycaley keeps his throne after another battle in Spy on the Hill. This will mark the 7th week in a row that KrazyCaley is king! 

Spy on the Hill is a weekly competition where a challenger dukes it out with the current king for the throne. The catch is the challenger dictates what custom SpyParty game rules they will be playing. These rules can range from slightly unbalanced game types to completely wacky ideas, as you’ll see below! 

Strictly speaking, being king just grants you the title of being King of SpyPartia, the fictional country where all the Spy on the Hill events take place. You don’t get any prizes, badges, or special powers. However, this does not stop the community from taking it a little further and having fun with it. Every week the king issues humorous decrees and he has even appointed a royal advisor. Some people chime in with “Long live the king!”, while others say “Someone end this tyrannical reign!” It provides a little competition and it’s all in good fun. 

Every game is casted live by toboshi and warningtrack over on the SpyParty twitch channel, and overseen by the Spy on the Hill creator and mastermind wodar. Here’s a quick summary of the last five matches, and links to the videos (each of which is around an hour):

  • Week 1, Drawnonward vs. KrazyCaley 
    H-O-R-S-E Style. Each players pick a map and mission type. This is mostly balanced game types between two high level players. You can check out a highlights reel from this match here:
    YouTube Preview Image

  • Week 2, KrazyCaley vs. KCMmmmm
    Full Random Mode. Each player will randomly pick a map and mission type. Being completely random can heavily favor the Spy or the Sniper. Having to do known mission types tend to favor the Sniper but doing any 3 of 7 favors the Spy.

  • Week 3, KrazyCaley vs. MikeChilds
    Spies must wait 30-60 seconds between each mission. This mode puts more cognitive load on the Spy because they have to keep track of when they completed the missions and plan accordingly.

  • Week 4, KrazyCaley vs. Varanas
    Snipers must say who they lowlight and neutral light. Spies can’t use their forward key. Spies now have knowledge of when they get lowlight and can get away with lots more because of this. However, not being able to use the forward key can cause some funky pathing.

  • Week 5, KrazyCaley vs. SlappyDavis 
    Players win by either playing Snaps McGee (the photographer) and finishing their missions or by getting the Sniper to shoot poor Snaps. This element adds more mind games to the mix.

  • Week 6, KrazyCaley vs. WarningTrack
    The Sniper must name a state in the USA whenever he or she lowlights, highlights, or shoots. States must be in alphabetical order. Snipers must know their states or be stringent with their highlights and lowlights.

  • Week 7, KrazyCaly vs. Virifaux
    Each mission the Spy completes is counted as a point. Whoever has most points at the end wins. You don’t need to survive after you complete the missions, you just need to do them. This gives interesting opportunities to the Spy.

Any SpyParty beta tester can sign up to be a challenger to the throne. It’s great if you can stream, but it isn’t a requirement. So, if you are interested in ruling over SpyPartia, feel free to sign up in the beta forums and come up with your own crazy custom rules!

Will KrazyCaley remain the king for next week and issue new decrees, or will this week’s challenger come up with a clever game modification that ends KrazyCaley’s winning spree? Find out later this week! Spy on the Hill usually streams on Friday evenings around 7pm, US Pacific time on the SpyParty twitch channel.

Why is This Important?

Now, for a little editorial from my point-of-view as both a long-time SpyParty beta tester and a big fan of competitive games and streams…

In my opinion, competition brings a lot to any game. It helps build the community and allows onlookers to admire some of the best players out there, but more importantly, it helps create stories that people can relate to.

If someone new is watching the game, they probably don’t know too much about it. Sure, they can get the gist of things, but they might be missing some aspects that will make it interesting for them. Why would they watch a game if it’s mainly just gibberish to them? Stories are something that everyone can relate to, and they make the game better for both new players and for people who are well-versed in the game. One classic story that often emerges is “the underdog”. Research has shown time and time again that we love to root for underdogs. This is something we can all get behind, regardless of our knowledge of the game.

Another good example is the story of “the comeback”. In this story the current champion gets beaten and after some time passes they get a shot at being the champion once again. Everyone knows that they are capable of being a champion but are they able to do it again? 

With Spy on the Hill, we get a glimpse of the future of competitive play in the game. Also, you may recall this isn’t the first competition SpyParty beta testers have held. Previously we’ve had other player-organized tournaments, including the “New Years Cup” and the team-based ”Pre-Open Beta Tournament”. I am sure there will be many more to come, especially when spectation and replays make it into the game. What better way to test a feature than to use it?

The community has done some pretty amazing things and will continue to do so. Spy on the Hill is just another thing to add to the list.

SpyParty at Day of the Devs

Yesterday we did a fun thing in San Francisco: DoubleFine and iam8bit were kind enough to invite us to set up SpyParty at their Day of the Devs party, along with a bunch of other indie friends, including Supergiant and Capy. We shared a room with Hohokum and Destructomundo, and everybody had a great time! Some press came by to chat, so we may see some general coverage showing up this week, too.

dotdlogo

This time slappydavis (in the hat) came over to help out with training newbies, and ardonite stopped by for a bit and they did a few exhibition games. Of course, I look a bunch of pictures, and here are some:

 

Next SpyParty Masterclass Episode, Wednesday, 4pm Pacific!

The next episode of the SpyParty Masterclass will be streamed tomorrow, Wednesday, October 30th, at 4pm Pacific time!

As you will recall from the pilot episode writeup featuring r7stuart,  the SpyParty Masterclass is the streaming show where I get the elite players to mentor me in-game and on-stream, so I can learn to suck a little less at the video game I’m making.  

When you’re trying to design a deep player-skill competitive game, you have to be able to make tuning and balancing decisions, and to do that you have to have a clue about the way the game plays at elite levels.  It’s a great feeling when players beat you at your own game (literally), but I felt like I was falling too far behind, so I decided to get some lessons from the top of the leaderboard, and to stream it and then upload it to the SpyParty YouTube channel afterwards so the whole community can learn from the lessons too!

This next episode will feature kcmmmmm, the player at the tippy top of the leaderboard, who you may remember lost me a bet with Seth Killian at Evo.  

There are a few different things about this episode:

  • I’m going to stream my side live on Raptr’s twitch channel, http://twitch.tv/raptr, and kcmmmmm is going to stream his side to the SpyParty channel at http://twitch.tv/spyparty.  I recommend watching the dual-stream view so you can see both sides at the same time!  I will edit them together before posting the final episode, like last time.
  • We’re on Raptr’s channel because they’re working with extra life to raise money for Children’s Miracle Network and they invited me to stream, so I thought this would be a cool way to help out a good cause.  You can join the Raptr extra life team here
  • We are going to keep it to one hour!  The last one was almost four hours long, which is too long to watch and too long to edit!  I’ll probably do some Q&A in the twitch chat on Raptr’s channel for a bit afterwards if folks are interested.

If you missed the last episode and have a spare 4 hours to go deep on SpyParty, here you go:

YouTube Preview Image