Development Update – Moar Windows & Debugging Lesson

Hey all! I’m currently writing this devlog from Vancouver. I arrived here earlier today to showcase the game at the MIX Showcase at SIGGRAPH.

I’ve got some down time since the exhibition doesn’t start until tomorrow, so I’ve decided to write an update here.

Hub Level Windows

Much of the past week was spent working on a new hub level. The overall structure of the level was quite simple, so this meant I had room to elaborate on more “decorative” aspects of the architecture, which is mostly just the windows.

I ended up having a ton of fun coming up with different window designs:

relativity_windows_01 relativity_windows_02 relativity_windows_03

What I love most is the pattern of the shadows that are created as a result. It’s hard to predict exactly how they’ll fall when I’m creating the windows, so it’s kind of a nice visual bonus.

I think it ends a lot to the perception of the space, and also makes the aesthetics even more different from Antichamber, since that game didn’t have any shadows.

Here’s a shot of the exterior of the same hub level:


And here it is with the repetition world effect implemented: relativity_windows_05 relativity_windows_06

Mysterious Shadows & Big Lesson In Debuggin

For several months now, I kept noticing this weird bug that would appear when I was showcasing the game. Basically, this set of circular-blob-like shadows would appear and stay in front of the player in different locations, like this:

relativity_debug_01 relativity_debug_02


One of the strange parts about it was that the shadow would lay out evenly on geometry, regardless of notice. For example, notice in the second image, the circular shadow is split between the blue floor and the white wall, but is still keeping its shape.

At first, I thought this was due to some objects in the scene in the distance that was casting the shadow. Since all the levels are loaded at the beginning of the game and then set inactive, it’s possible I may have missed some, and they were the cause of these mysterious shadows.

I figured it would be a fairly simple fix – just find the culprit objects, and make their meshes not cast shadows, so I kept putting this problem off.

Last night, I decided to finally look into the problem. It turned out to be much weirder… the shadows only appeared when I was running the game on my laptop! When I ran the game on my desktop, either inside the Unity editor or as a standalone, this is what it looked like:



See, no weird shadows! (ignore quality of pics – I took them with my phone pointed at the monitor)

Ok, that’s really weird. I posted the problem on twitter, and several people offered suggestions – changing shadow quality, changing view distance, etc. Someone also suggested updating graphic drivers for bootcamp, since I mentioned i was running windows on a macbook pro via bootcamp. However, I thought this was too simple, and would have expected a problem w/ graphic drivers to be more of an “overall” effect.

Anyway, I ended up spending about 3 hours, changing different settings on the project on my desktop, making a build, transferring file to my laptop, and testing out the change. All in all, I made about a dozen builds, but nothing worked. It was an incredibly frustrating problem to debug.

Towards the end of the night, I was all ready to give up, but decided to see if the issue was the graphics card. I made an OSX build, then restarted my laptop in OSX, and lo and behold, the shadows were gone. So it’s not a problem with the graphics card…

Finally, I checked the status of my graphic card driver – the computer said it was up-to-date, but when I went to the Intel website to compare, the version numbers of the graphic card drivers were different.

So I downloaded the latest driver, ran the game, and boom! No shadows:



My feeling then could only be summed up as a gif:facepalm


I learned an important lesson in debugging last night: always try the simple solution first!

  • Facebook
  • Twitter
  • Tumblr
  • LinkedIn
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • RSS

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>