<?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>Robot Invader</title>
	<atom:link href="https://robotinvader.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://robotinvader.com/blog</link>
	<description>Mechanical agents of destruction.  Also video games.</description>
	<lastBuildDate>Fri, 27 Apr 2018 02:42:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7</generator>
	<item>
		<title>Dev Diary: Branching Dialog</title>
		<link>https://robotinvader.com/blog/?p=567</link>
					<comments>https://robotinvader.com/blog/?p=567#comments</comments>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Fri, 27 Apr 2018 02:42:39 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[dead secret dev diary]]></category>
		<category><![CDATA[game design]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=567</guid>

					<description><![CDATA[One of the new systems we&#8217;ve built for DEAD SECRET CIRCLE is a branching dialog system.  As you explore the world you periodically interview suspects, and depending on your choices the conversation can go many different ways. Branching dialog systems are &#8230; <a href="https://robotinvader.com/blog/?p=567">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>One of the new systems we&#8217;ve built for DEAD SECRET CIRCLE is a branching dialog system.  As you explore the world you periodically interview suspects, and depending on your choices the conversation can go many different ways.</p>
<p>Branching dialog systems are pretty common, and ours is not particularly exotic. But even in the implementation of a straightforward branching conversation system can be fairly complicated. For our system, I was interested in finding or building tools that would help me explore the flow of the dialog, and its various branches, in real-time as I was editing.  For me, the hardest part of this system is actually writing the dialog itself, so I needed a toolchain that would let me quickly edit and revise.</p>
<h2><img fetchpriority="high" decoding="async" class="aligncenter size-large wp-image-573" src="https://robotinvader.com/blog/wp-content/uploads/2018/04/dsc_screenshot02-1024x576.png" alt="dsc_screenshot02" width="640" height="360" srcset="https://robotinvader.com/blog/wp-content/uploads/2018/04/dsc_screenshot02-1024x576.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2018/04/dsc_screenshot02-300x169.png 300w, https://robotinvader.com/blog/wp-content/uploads/2018/04/dsc_screenshot02-768x432.png 768w" sizes="(max-width: 640px) 100vw, 640px" />Building a Dialog System</h2>
<p>There are a number of tools available for creating branching dialog trees.  I looked at <a href="https://github.com/InfiniteAmmoInc/Yarn">Yarn</a>, a Twine-like editor built for Night In the Woods.  <a href="http://www.chatmapper.com">Chat Mapper</a> is a very serious&#8211;and very complicated-looking&#8211;tool that has an order of magnitude more features than I need.  I even realized that I wrote a markup syntax for branching dialog a decade ago that I&#8217;ve never used for anything.  Though there are a lot of tools out there, it was hard to find something that matched my needs and powerful enough to justify not writing something myself.<br />
In the end I went with <a href="https://www.inklestudios.com/inklewriter/">Inklewriter</a>, a web-based tool that allows you to quickly lay out (and play through) branching dialog trees. It was written as a Twine competitor, I think, but the feature set was just the right fit for DEAD SECRET CIRCLE.  It supports named variables, conditional branches, divert nodes (where dialog flow is diverted to another node in the middle of playback), and can output json.  The interface is simple but powerful, and I can share fully playable dialog sequences with others before we push it into the game.  Overall, it&#8217;s a smart tool made by developers who&#8217;ve done a lot of interactive storytelling themselves.</p>
<p>The next step was to write a Unity importer for Inklewriter&#8217;s output json.  Inkle Studios, the authors of Inklewriter, actually supply their own Unity plugin for <a href="https://www.inklestudios.com/ink/">Ink</a>, their (much more powerful, and complex) interactive novel language, but I needed to roll my own to use the simpler Inklewriter output.  I did this by creating a custom AssetPostprocessor for text files that looks for json files and parses them.  The parser itself is straightforward&#8211;mostly just a translation of the json node hierarchy to a similar ScriptableObject graph which is written to disk as an asset file.  It also pulls all the strings out and puts them into a separate dictionary system, which provides key/value pairs for all strings in the game and is our main infrastructure for localization. My workflow is to simply save Inklewriter&#8217;s output json into my Unity Assets folder and then point the runtime dialog system at the auto-generated asset, the root of which is the first node in the conversation.  At runtime, a dialog manager &#8220;runs&#8221; each node by displaying the node&#8217;s text, flipping node variables, and presenting the player with response choices, which select transitions to other nodes.  Text is pulled from the dictionary, and voice acting samples can also be pulled from another database using the same key.  I even made a nifty visualization tool out of Unity&#8217;s undocumented graph API.</p>
<h2>Writing Branching Dialog</h2>
<p>Once the tools and runtime were in order I was faced with the real task, which I had been avoiding: writing the actual dialog.  There are so many approaches to branching conversation design that it&#8217;s hard to know where to start.  I settled early on a fairly standard &#8220;call and response&#8221; model, in which you ask the NPC a question from a list of options and they give you an answer, because it mapped well to the story frame of interviewing suspects.  But where to go from there?  Should I encode a subtle moral choice into each question a la <em>Mass Effect</em>?  Should I provide two plausible options and two joke options a la <em>Disaster Report</em> (I call this the &#8220;DMV Written Test Design&#8221;)?  Should I allow the player chances to ask questions more than once, or should should choosing an option automatically close other options off (a la many games, but the best example is <em>Firewatch</em>)? Should the player&#8217;s question choices inform the personality of their player character?  The design of the conversation itself was much more daunting than the code to run it.</p>
<p><img decoding="async" class="size-full wp-image-572 alignright" src="https://robotinvader.com/blog/wp-content/uploads/2018/04/dialog-tree.png" alt="dialog tree" width="435" height="705" srcset="https://robotinvader.com/blog/wp-content/uploads/2018/04/dialog-tree.png 435w, https://robotinvader.com/blog/wp-content/uploads/2018/04/dialog-tree-185x300.png 185w" sizes="(max-width: 435px) 100vw, 435px" /></p>
<p>The main reason to h<br />
ave a branching dialog system to begin with is to deliver information to the player in a way that gives her some agency and (hopefully) engenders some empathy for the NPC.  Some information is critical, and I can&#8217;t allow the player to miss it by making bad dialog choices.  Other information is optional, available to the players who choose to delve in further, who ask the game for more detail.  The DEAD<br />
SECRET series is generally built upon a philosophy of narrative levels-of-detail: some folks will simply skim across the surface while others will choose to dive deep, and both should have a good time.  I wanted the dialog system to be the same.</p>
<p>In the end I settled on a model in which the player needs to make decisions, but there are no bad choices.  Once the player has chosen a question to ask, the conversation shifts in that direction, and (usually) does not return.  The player must choose which topics to broach, which bits they want to hone in on, but none of the choices are wrong or bad.  They just cause different tidbits of information to be revealed, and no matter what path is taken I can ensure that the critical pieces of information are displayed.</p>
<p>Inklewriter&#8217;s toolset gave me enough power to author conversations with a lot of structural variance.  Some conversations loop (allowing several chances to ask the same question), others are nearly linear.  Some conversations result in significantly different revelations, others end up at the same place via different paths through the tree.  The structure is fairly free-form, which I like.  My goal is to make it feel as little like a mechanism to be reverse-engineered as possible.</p>
<h2>Discoveries</h2>
<p>I have never written branching dialog before, and I learned a lot in the process of writing for DEAD SECRET CIRCLE.  This stuff is probably old hat for folks that have built these types of systems before, but it was new to me.</p>
<p>The biggest realization I had was that I could communicate the protagonist&#8217;s personality to the player through her questions.  Communicating the protagonist&#8217;s feelings is a constant struggle for me.  She has very few opportunities to talk about herself or what she is thinking.  Her main mode of communication is commentary on things that the player examines in the game world, but these messages must be succinct and to-the-point. There&#8217;s not a lot of time for introspection.  Figuring out that I could hint at her thought process by writing questions in a certain way was a revelation for me.</p>
<p>I also learned how important it is to record dialog early, long before there are voice actors working on the project.  Jonny and his wife Shannon recorded all of the dialog in the game themselves, which let us test all kinds of critical systems like spatialized VO and lip synching.  But most importantly, it made it very obvious when a conversation made no sense.  Reading it out loud, with all the pauses and inflections and imperfect pronunciations that are normal to human speech, clearly separated the text that sounded natural from the text that did not.  By the time we did get voice acting done, we already knew what we wanted from nearly every line because we&#8217;d had placeholder audio in the game for months.</p>
<p>Speaking of voice acting, I also learned how to make life really hard for the men and women who lent their voices to my characters. Forcing them to say foreign words in languages they don&#8217;t speak was one mistake. Relying on hard-to-say-out-loud technical words (like &#8220;ideomotor&#8221;) cost us some takes.  I briefly panicked when I realized I&#8217;d written a character with an accent that I couldn&#8217;t verify the accuracy of myself.  Fortunately we were lucky enough to work with seasoned pros who got through the minefield of my dialog text without losing limbs.  But next time I&#8217;ll try to remember that actual humans have to perform the words I write out loud.</p>
<h2>And&#8230; Scene</h2>
<p>The branching dialog system in DEAD SECRET CIRCLE was one of the most enjoyable parts of the project for me.  I liked building the system to run it and writing the dialog itself, and I learned a bunch in the process.  The original DEAD SECRET was a bit lonesome&#8211;there&#8217;s nobody in that house but you and the killer&#8211;and allowing direct interaction with a wider cast of characters was one of our core design goals for CIRCLE.  The dialog system (and related character animation and lip sync systems, which I&#8217;ll write about another time) ended up doing nearly all the heavy lifting here, and I&#8217;m really happy with the result.</p>
<p>DEAD SECRET CIRCLE comes out pretty soon for both VR and traditional platforms.  There&#8217;s a <a href="http://store.steampowered.com/app/671920/Dead_Secret_Circle/">Steam page up</a> if you are interested, and a <a href="http://deadsecret.com">mailing list you can join</a> if you&#8217;d like to get updates about the game.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://robotinvader.com/blog/?feed=rss2&#038;p=567</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Dev Diary: Custom Occlusion Culling in Unity Improved</title>
		<link>https://robotinvader.com/blog/?p=554</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 31 Jul 2017 05:27:27 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[game engineering]]></category>
		<category><![CDATA[unity]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=554</guid>

					<description><![CDATA[Back in 2014 I wrote about the custom occlusion system we built for DEAD SECRET.  It&#8217;s a pretty simple system that works by knowing all of the places the player can stand ahead of time.  It allowed us to cut our &#8230; <a href="https://robotinvader.com/blog/?p=554">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>Back in 2014 I <a href="https://robotinvader.com/blog/?p=460">wrote about the custom occlusion system</a> we built for DEAD SECRET.  It&#8217;s a pretty simple system that works by knowing all of the places the player can stand ahead of time.  It allowed us to cut our draw call count way down and ship high-fidelity mobile VR nearly two years ago.  But <a href="http://deadsecret.com">DEAD SECRET CIRCLE</a>, the sequel to DEAD SECRET that we announced last month (check the <a href="http://deadsecret.com">teaser</a>!), has a lot of new requirements.  One major change is the ability to move around the environment freely, which the DEAD SECRET system didn&#8217;t support.  We needed a new way to manage occlusion for this title.</p>
<p>First we tried to leverage Unity&#8217;s built-in occlusion system, which is based on <a href="http://umbra3d.com">Umbra</a>, an industry-standard tool that&#8217;s been around for over a decade.  But Unity&#8217;s interface to this tool is exceptionally restricted, with very few controls available.  The values that are exposed are hard to understand in terms of world units (the internet <a href="https://forum.unity3d.com/threads/occlusion-culling-woes.419273/">theorizes</a> that the scale value is off by a factor of 10), and in some cases the documentation Unity provides is misleading and/or false.  While Unity&#8217;s built-in culling does work (very well!) in some cases, it is hard to understand why it fails in others.  The debug visualization adds to the confusion: when a &#8220;view line&#8221; passes straight through a wall, are we supposed to believe that the debug view is inaccurate, or the occlusion has broken, or that this is the way it&#8217;s &#8220;supposed&#8221; to work?  After about six months of trying to get by with Unity&#8217;s occlusion system, I gave up and decided to revisit the custom tech we wrote for DEAD SECRET.</p>
<p><img decoding="async" class="aligncenter size-large wp-image-556" src="https://robotinvader.com/blog/wp-content/uploads/2017/07/KARLOFFlogo-1024x256.png" alt="KARLOFFlogo" width="640" height="160" srcset="https://robotinvader.com/blog/wp-content/uploads/2017/07/KARLOFFlogo-1024x256.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2017/07/KARLOFFlogo-300x75.png 300w, https://robotinvader.com/blog/wp-content/uploads/2017/07/KARLOFFlogo-768x192.png 768w" sizes="(max-width: 640px) 100vw, 640px" />Robot Invader&#8217;s internal technology stack is called KARLOFF, and it has had a hand in every game we&#8217;ve shipped since our first in 2011.  The great thing about a mature technology stack is that we can build new tools very quickly.  Using existing KARLOFF tech, we built a new version of our occlusion system in less than a week.</p>
<p>Our new system is still based on rendering panoramas and color-coding geometry to find potentially visible geometry sets from a given point in space.  But for a world in which the camera can move freely, we need a lot more points.  We also need a way to map the current camera position to a set of visible geometry.  All of a sudden this system goes from being a simple occlusion calculation to computing a full-blown <a href="https://en.wikipedia.org/wiki/Potentially_visible_set"><em>potentially visible</em><em> set</em></a>.</p>
<p>My goal is always to trade build time and runtime memory (both of which we have plenty of) for runtime performance (which we are always constrained by).  Therefore this system uses a 3D grid (as opposed to a BSP or kd-tree, which are common for this purpose) that can index into a set of visible geometry in O(1) at runtime.  The world is cut up into grid cells and a panorama is rendered for each.  The resulting geometry information is stored back to the grid and then looked up as the camera moves through the scene at runtime.  Simple, right?</p>
<p>Well, the devil is in the details.  There&#8217;s a trade-off between cell size, accuracy, and bake time.  Very small cells (say, 0.3 meters per side) result in highly accurate occlusion but take a long time to bake.  For DEAD SECRET CIRCLE our primary goal is to cut entire rooms and building floors that are on the other side of a wall away, not to occlude small objects within the frustum.  We can get away with a larger cell if we render occlusion from several points within the cell and then union the results into a single set.  We actually need to do two passes, one with transparent geometry hidden and the other with it opaque (in order to catch both the objects behind a transparent surface and the surface itself).  Here&#8217;s an example of these two passes rendered from four different points within a cell.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-555" src="https://robotinvader.com/blog/wp-content/uploads/2017/07/Last-Visibility-Render-1024x256.png" alt="Last Visibility Render" width="640" height="160" srcset="https://robotinvader.com/blog/wp-content/uploads/2017/07/Last-Visibility-Render-1024x256.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2017/07/Last-Visibility-Render-300x75.png 300w, https://robotinvader.com/blog/wp-content/uploads/2017/07/Last-Visibility-Render-768x192.png 768w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
<p>The output of this boils down to a bunch of lists of MeshRenderer pointers that get enabled and disabled as sets are selected.  It&#8217;s also necessary to do another set of renders for every occlusion portal (e.g. a door that can be opened or closed) so that we can adjust the visibility of the objects on the other side when the portal is opened at runtime.  At this point we have a fully functioning, highly accurate occlusion system that is nearly free at runtime.</p>
<p>But there&#8217;s a catch: this method relies on walking a texture like the one above and picking colors to match to mesh.  At 1024&#215;512 per panorama (which seems to be the minimum resolution we can get away with based on the size of our objects in the world), a full transparent / nontransparent pass from four points results in a 4096&#215;1024 image.  With a 1x1x1 cell size we end up with about 450 cells for this small apartment level, which is 1,426,063,360 pixel compares.  Add in more passes for portals and this time starts to grow exponentially.  Plus, 1x1x1 might not be small enough for perfect accuracy&#8211;we get better results with a 0.5 unit square cube, which on this level takes nearly 20 minutes to compute.  I know I just wrote that I was willing to trade build time for runtime performance, but 20 minutes to compute occlusion is unreasonable.<img loading="lazy" decoding="async" class="alignright size-full wp-image-557" src="https://robotinvader.com/blog/wp-content/uploads/2017/07/ezgif-4-28823b1084.gif" alt="Cell division" width="450" height="570" /></p>
<p>There are probably some smart ways to tighten the algorithm itself up.  I managed to achieve a 5x speedup by optimizing just the inner pixel compare loop.  But part of the problem here is the design: the cell sizes are of fixed size and sometimes intersect with walls.  Cells have to be fairly small to prevent objects from the other side of a wall from being pulled into the set.  Plus levels that aren&#8217;t rectangular in shape end up with a lot of cells in dead areas the camera will never go, rendered for no reason.</p>
<p>The next iteration of this system is to stop blindly mapping the entire level and instead restrict cells to hand-authored volumes.  Unity even provides a useful interface for this with the fairly mysterious Occlusion Area.  Exactly how it works with Umbra is the topic of some debate (compare <a href="https://software.intel.com/en-us/android/articles/unity-optimization-guide-for-x86-android-part-3#">Intel&#8217;s documentation</a> about the use of Occlusion Areas to Unity&#8217;s own), but for our purposes we&#8217;re just using it as a way to size axis-aligned volumes in the world.  Each Occlusion Area produces an &#8220;island&#8221; of cells, and when within an island the camera can still find its cell in O(1).  Occlusion Islands don&#8217;t need to be the same resolution.  In fact, the cells don&#8217;t even need to be cubes any longer.  We can expose controls to control the granularity of the world per axis, resulting in rectangular volumes.  Why compute extra cells near the ceiling if the camera isn&#8217;t ever going to go up there?</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-558" src="https://robotinvader.com/blog/wp-content/uploads/2017/07/ezgif.com-optimize.gif" alt="ezgif.com-optimize" width="600" height="324" /></p>
<p>So now we have something that looks like a real occlusion system.  It handles transparent objects, occlusion portals, and can be easily controlled on a per-area basis by breaking the world up into islands of culling information.  By tuning the granularity per island the apartment area above went from 20 minutes to bake down to a very reasonable 1.5 minutes.  This system can still be improved, and it doesn&#8217;t solve for dynamic objects at all, but already we&#8217;re achieving better results than we were able to after months of twiddling with Unity&#8217;s built in occlusion system.</p>
<p>DEAD SECRET CIRCLE is scheduled to come out this year.  <a href="http://twitter.com/robotinvader">Follow us on twitter</a> for more information, or <a href="http://deadsecret.com">sign up to the mailing list</a> to get updates as they come out.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DEAD SECRET Released for HTC Vive</title>
		<link>https://robotinvader.com/blog/?p=552</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Thu, 18 Aug 2016 17:15:27 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[virtual reality]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=552</guid>

					<description><![CDATA[The crew at Robot Invader has been hard at work on several projects, and today we can finally announce one of them: DEAD SECRET is now available for the HTC Vive as a free update on Steam. With this update &#8230; <a href="https://robotinvader.com/blog/?p=552">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>The crew at Robot Invader has been hard at work on several projects, and today we can finally announce one of them: DEAD SECRET is now available for the HTC Vive as <a href="http://store.steampowered.com/app/402260">a free update on Steam.</a></p>
<p>With this update DEAD SECRET is now compatible with the <a href="https://www.oculus.com/experiences/gear-vr/994229133962087/">Samsung Gear VR</a>, <a href="https://www.oculus.com/experiences/rift/1115649871780498/">Oculus Rift,</a> <a href="http://store.steampowered.com/app/402260">HTC Vive</a>, as well as <a href="http://store.steampowered.com/app/402260">regular monitors</a> for folks without fancy-pants VR headsets.</p>
<p>To celebrate, we&#8217;re putting DEAD SECRET on sale for two weeks starting today.  At 34% off that&#8217;s less than $10!</p>
<p>We have more stuff to announce in the very near future, but in the mean time grab your Vive Wand, slap on a headset, and go solve a murder!</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-520" src="https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-1024x576.png" alt="monkey" width="640" height="360" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-1024x576.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-300x169.png 300w, https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-768x432.png 768w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dead Secret Diary: Lightmapping in Unity 5</title>
		<link>https://robotinvader.com/blog/?p=516</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 18 Jul 2016 00:33:54 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[unity]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=516</guid>

					<description><![CDATA[DEAD SECRET makes careful use of light mapping to control the mood and tone of each room.  Careful manipulation of light and darkness was one of our key tasks in building the game, and Art Director Mike spent almost as long &#8230; <a href="https://robotinvader.com/blog/?p=516">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>DEAD SECRET makes careful use of light mapping to control the mood and tone of each room.  Careful manipulation of light and darkness was one of our key tasks in building the game, and Art Director Mike spent almost as long on lighting our scenes as he did building them.  We structured our lights and light maps very carefully to produce subtle lighting and also maximize rendering efficiency.  In the end we were pretty happy with the result.  Then we upgraded the project to Unity 5.</p>
<p>You may have read about other developers who spent a lot of time and money on upgrading to Unity 5, <a href="https://medium.com/@ragso/dreamfall-chapters-extreme-makeover-edition-or-the-rocky-road-to-unity-5-48e1f22ea62#.la4slw1pq">mostly because of changes to the lighting system</a>.  Unity 5 completely replaces the light mapping system used in previous versions (Autodesk&#8217;s Beast) with a new lighting system (Geomerics Enlighten) that specializes in realtime global illumination.  We had heard horror stories from other developers who attempted the transition of large projects to Unity 5, and so we waited, hoping that the issues would be worked out in time.  By all accounts the Unity team spent 2015 burning the midnight oil to fix bugs and improve workflows in particles, physics, performance, and lighting.  But, over a year since the release of Unity 5, transitioning a large project to Enlighten is still a pretty brutal experience.  Here&#8217;s how we did it.</p>
<div id="attachment_545" style="width: 650px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-545" class="size-large wp-image-545" src="https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.52.53-PM-1024x613.png" alt="Dead Secret is all one scene and has a lot of baked lights in it." width="640" height="383" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.52.53-PM-1024x613.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.52.53-PM-300x180.png 300w, https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.52.53-PM-768x460.png 768w, https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.52.53-PM.png 2004w" sizes="auto, (max-width: 640px) 100vw, 640px" /><p id="caption-attachment-545" class="wp-caption-text">Dead Secret is all one scene and has a lot of baked lights in it.</p></div>
<h2>DEAD SECRET Lighting Under Unity 4</h2>
<p>Dead Secret&#8217;s scene is organized around the following constraints:</p>
<ul>
<li>Scene loading is unacceptably slow, especially on mobile platforms.  Therefore the entire game must be implemented within a single scene, which we&#8217;ll load up once at startup.
<ul>
<li>Because scene loading is slow we need to be able to instantaneously swap light maps in order to implement a transition from daytime to nighttime.</li>
</ul>
</li>
<li>Performance is highly dependent on batching, and to maintain maximum batching efficiency we want a small number of very large light map textures.</li>
<li>Almost all lights are static, but we also have a few realtime, moving lights as well (e.g. a flashlight).  Almost all geometry is static.</li>
<li>Some lights should cast both into light maps and create dynamic shadows for non-lightmapped objects (a &#8220;Mixed&#8221; light).</li>
</ul>
<p>Given those requirements, our Unity 4 implementation in Dead Secret looked like this:</p>
<ul>
<li>A single scene, full of static geometry with tons of lights, all set to Baked and sorted into buckets of Daytime Lights, Nighttime Lights, or Both.</li>
<li>One or two important lights in each scene set to Mixed for real-time shadow casting.</li>
<li>A custom culling system (described <a href="https://robotinvader.com/blog/?p=460">here</a>) that turned lights on and off depending on where the player was standing.</li>
<li>A complicated Beast settings XML file (authored via the excellent <a href="https://www.assetstore.unity3d.com/en/#!/content/6071">Lightmapping Extended </a>tool) for daytime light settings, another for nighttime settings.</li>
<li>An editor script that could set the Daytime ambient light color, move the correct Beast.xml file to the proper place in the file system, turn on the right set of lights, kick off a light map bake and then, when it was finished, move all the generated light map textures into a different folder and kick off another bake for Night.</li>
<li>A runtime script that could, in a single frame, change active lights between day and night sets, swap out the textures being used for light mapping (via <a href="http://docs.unity3d.com/ScriptReference/LightmapSettings-lightmaps.html">LightmapSettings</a>), set the proper LightProbes, and change the ambient light.</li>
</ul>
<p>This gave us pretty good results.  We got our huge scene down to seven 4096&#215;4096 light maps, which accommodated our batching requirements.  We could dynamically swap between day and night and see the lights, ambient, and light maps instantly change.  Because almost everything was static and baked the runtime cost was low enough for us to hit 60 fps in VR on mobile platforms.  It looked good and we were pretty happy with it.</p>
<p>Though the final results were good, rendering light maps in this way had two major problems in Unity 4.</p>
<p>First, rendering light maps was slow.  Like, really slow.  20 to 30 hours on my work machine to render both day and night maps.  This wouldn&#8217;t have been so bad except that when light mapping completes the scene file is modified.  Since the entire game is implemented in one scene, nobody on the team could do any work while light mapping was running.</p>
<p>Second, having 14 4096&#215;4096 textures in your game (along with everything else) was too much for Unity 4&#8217;s 4 GB of addressable memory.  As a 32-bit application, the large light maps caused the Unity editor to crash all the time.  Now, a 4096 texture uncompressed with mip maps is about 85 mb, and with 14 of these you&#8217;re talking about over a gig of memory.  Still, it was annoying.  To continue working we had to drop the resolution of the light maps to 1024 and then write a command line build script that resized the textures, made a build, and then sized them back down, all without every initializing the graphics system to avoid extra memory overhead.</p>
<p>With those caveats aside, lighting in Unity 4 worked well.  We shipped on Gear VR in October 2015 based on Unity 4.  But, for PC and upcoming PS4 releases, we knew we needed to finally ditch Unity 4 and move on to 5.</p>
<h2>Unity 5 Lighting Woes</h2>
<p>The good news was that, other than lighting, almost everything about our project worked without modification under Unity 5. We had a couple of scripts that needed modification, and the transition exposed a few race conditions in the game that hadn&#8217;t manifested earlier.  But DEAD SECRET was playable under Unity 5 after just a day or two of work.</p>
<div id="attachment_546" style="width: 650px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-546" class="size-large wp-image-546" src="https://robotinvader.com/blog/wp-content/uploads/2016/07/lighting-1024x759.jpg" alt="Same scene, same lights, same mesh in Unity 4 vs 5. We get those jaggy shadows on all sorts of edges throughout the game." width="640" height="474" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/07/lighting-1024x759.jpg 1024w, https://robotinvader.com/blog/wp-content/uploads/2016/07/lighting-300x222.jpg 300w, https://robotinvader.com/blog/wp-content/uploads/2016/07/lighting-768x569.jpg 768w, https://robotinvader.com/blog/wp-content/uploads/2016/07/lighting.jpg 1142w" sizes="auto, (max-width: 640px) 100vw, 640px" /><p id="caption-attachment-546" class="wp-caption-text">Same scene, same lights, same mesh in Unity 4 vs 5. We get those jaggy shadows on all sorts of edges throughout the game. Note that actual Unity 4-based versions have 4x more map res than shown here.</p></div>
<p>Lighting, on the other hand, was pretty busted. Over the course of several months we worked to recreate the lighting quality we had in Unity 4 using Enlighten, and the road was not easy.  Along the way I filed more bugs against Unity than I have in the five years of Unity game development.  Not only is Unity 5 lighting different than its predecessor, it&#8217;s still a work in progress.  The main challenges we face under Unity 5 are:</p>
<ul>
<li>Light map rendering is, for our scene, about <strong>5x slower</strong> than Unity 4 was for the same scene.  That&#8217;s almost a week of render time on my work machine.  We bought a new computer just to bake light maps.</li>
<li><strong>Mixed lights do not work</strong> properly (case #750836). To cast dynamic shadows against light mapped surfaces in DEAD SECRET we end up lighting all of the geometry twice at rather enormous frame time cost.  We can only get away with it because the game is so efficient in other areas.</li>
<li>Though light map information is no longer stored in the scene (good!), it&#8217;s now stored in an opaque structure called LightingData, which overrides scene parameters and limits the control we have over our scene (bad!).
<ul>
<li><strong>LightingData only stores information relevant to the last bake.</strong> In particular, it stores which lights were applied to the lightmap and which were not.  This as a number of bad side-effects:
<ul>
<li><strong>Changing a light from baked to realtime has no immediate effect</strong> (case #758744, closed as &#8220;by design&#8221;).  This means you can&#8217;t see what lights will look like, even in real time, without kicking off another bake (which, as above, is hours or days of your life gone).</li>
<li><strong>You can no longer create multiple sets of light maps from different sets of lights in the same scene.</strong> Rendering multiple light map passes causes information about which lights were used in the bake, now stored only in LightingData, to be lost.  This means that even if you swap light map textures at runtime, some of your lights will behave as unbaked realtime lights because they don&#8217;t know that they were accounted for in a previous bake.  To work around this we actually have to bake lights in three passes now: once for Day, once for Night, and once with all lights on just to generate a LightingData struct that works. This also means we can&#8217;t see what our lighting looks like in the scene view any longer.</li>
<li>Light.alreadyLightmapped, which ostensibly serves to control which lights were baked into the current set of light maps, is overridden by LightingData, making it useless.</li>
</ul>
</li>
</ul>
</li>
<li><strong>&#8220;Ambient&#8221; light isn&#8217;t actually ambient in Unity 5 </strong>(case #753023).  In Unity 4, ambient light is just a color modification applied to all pixels, which allows you to control the minimum darkness of a scene.  In Unity 5, ambient behaves as if there is glowing sphere around the outside of the world, with light emitting from it equally across its surface.  The result is that ambient light is occluded by geometry: if you make a box and put the camera inside it, it will be absolute black regardless of the ambient light color or intensity.  This significantly changed the look of DEAD SECRET, and we struggled for months to undo it.  In the end the solution was to hack old-school ambient back into the standard shader.  It&#8217;s dumb: the standard shader supports all kinds of different lighting modes, controlled by #ifdefs, and adding support for &#8220;legacy&#8221; ambient is only a one- or two-line change.  Unity could easily support old-style ambient the way it supports other lighting modes.  When I asked them about it I was told, &#8220;old ambient was a hack, that&#8217;s not how lighting really works,&#8221; which I thought was a pretty ignorant answer. I don&#8217;t care how lighting &#8220;really works,&#8221; I care about realizing the art style my art director has selected.  I care about compatibility with years of development spent in Unity 4.  For new projects there are some advantages to the new ambient lighting scheme, but failing to support the old system cost us several months of dev time.</li>
<li><strong>Lighting is just sort of generally busted in Unity 5.  </strong>I filed bugs about light mapping overwritting finalgbuffer shader output when rendering in deferred (case #757945), that LightmapEditorSettings.resolution has changed meaning from &#8220;baked resolution&#8221; to &#8220;indirect resolution&#8221; (case #753022), which caused our baking tools to set insanely high indirect resolution values and hang the light mapper.  There used to be a way to toggle light maps on and off in the scene view, but that&#8217;s gone now. The errors that the light mapping tool generate only make sense if you happen to be an expert in what the heck Enlighten does.  Do you know what it means when there&#8217;s a &#8220;light transport&#8221; error?  Or what is happening when it sits on the &#8220;clustering&#8221; phase for 36 hours straight?  I&#8217;m sure there are experts out there who get this, but it&#8217;s certainly not documented and the errors themselves don&#8217;t give a whole lot of hints.</li>
</ul>
<div id="attachment_547" style="width: 650px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-547" class="size-large wp-image-547" src="https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.50.36-PM-1024x612.png" alt="Our scene view is a mess under Unity 5. Due to LightingData hacks we can't see real lighting until we hit play." width="640" height="383" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.50.36-PM-1024x612.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.50.36-PM-300x179.png 300w, https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.50.36-PM-768x459.png 768w, https://robotinvader.com/blog/wp-content/uploads/2016/07/Screen-Shot-2016-07-17-at-3.50.36-PM.png 1996w" sizes="auto, (max-width: 640px) 100vw, 640px" /><p id="caption-attachment-547" class="wp-caption-text">Our scene view is a mess under Unity 5. Due to LightingData hacks we can&#8217;t see real lighting until we hit play.</p></div>
<p>On the upside, Unity 5 is a 64-bit app and doesn&#8217;t crash because of large light map textures any more.  But our lighting takes longer, took us months to figure out the proper setup for, and it looks significantly worse than the Unity 4 build of the same scene.  The realtime GI features of Enlighten look nice but as a mobile and VR developer, I have no use for them today and am unlikely to have any use for them at any time in the next few years.  Therefore my conclusion is that the move from Beast to Enlighten has been, for developers like ourselves, a disaster.</p>
<p>I do think that Unity understands that the situation isn&#8217;t good.  I&#8217;ve been told that mixed lights are expected to work again in Unity 5.4.  I&#8217;ll find out if that&#8217;s true when 5.4 comes out of beta and becomes the stable branch.  A new light mapper was announced at GDC this year, and the demo they showed was impressive.  But since there was no hint of a release date I expect it won&#8217;t be usable for at least a year.  Going forward, we won&#8217;t need to do the Unity 4 -&gt; Unity 5 transition ever again (and, per this experience, the cost/benefit of upgrading our other old games is deeply negative, so those games are effectively deprecated).  New games written against Unity 5 (including our next super-secret mobile VR project) should be easier to manage.  Maybe one day Unity scene loading on mobile will get fast enough that I can actually use multiple scenes without significant loads between them, which would ease the burden put on the light mapping system.</p>
<p>Speaking with other developers, <a href="http://polycount.com/discussion/156075/enlighten-in-unity-5">a bunch of folks have similar issues with Unity 5&#8217;s new approach to lighting</a>.  Some are doing their light baking outside of Unity, and a few have gone so far as to <a href="https://forums.tigsource.com/index.php?topic=40832.msg1185709">implement their own light mappers</a>.  Folks using the realtime GI stuff also have complaints, although theirs are different.  I suspect the lighting team at Unity is under significant pressure from a bunch of different sources, and I don&#8217;t envy that position.  Here&#8217;s hoping it the situation improves soon.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dead Secret Summer Sale!</title>
		<link>https://robotinvader.com/blog/?p=540</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Fri, 24 Jun 2016 07:33:22 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[virtual reality]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=540</guid>

					<description><![CDATA[Dead Secret is now on sale everywhere!  Through July 4 you can get Dead Secret for Steam, Rift, or Gear VR for less than $10!  Don&#8217;t wait, snag it today! Steam Store Page Oculus Rift Store Oculus Gear VR Store]]></description>
										<content:encoded><![CDATA[<p>Dead Secret is now on sale everywhere!  Through July 4 you can get Dead Secret for Steam, Rift, or Gear VR for less than $10!  Don&#8217;t wait, snag it today!</p>
<p><a href="http://store.steampowered.com/app/402260">Steam Store Page</a><br />
<a href="https://www2.oculus.com/experiences/rift/1115649871780498/">Oculus Rift Store</a><br />
<a href="https://www2.oculus.com/experiences/gear-vr/994229133962087/">Oculus Gear VR Store</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-542" src="https://robotinvader.com/blog/wp-content/uploads/2016/06/hero_art_image-1024x576.png" alt="hero_art_image" width="640" height="360" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/06/hero_art_image-1024x576.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2016/06/hero_art_image-300x169.png 300w, https://robotinvader.com/blog/wp-content/uploads/2016/06/hero_art_image-768x432.png 768w, https://robotinvader.com/blog/wp-content/uploads/2016/06/hero_art_image.png 1067w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Stealth Education and Video Game Chautauqua</title>
		<link>https://robotinvader.com/blog/?p=534</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Sun, 15 May 2016 17:29:49 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[game design]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=534</guid>

					<description><![CDATA[If you signed up for the Dead Secret mailing list or follow us on Twitter, you might have heard of the DEAD SECRET Puzzle Challenge.  Each puzzle is unlocked by a YouTube streamer and anybody can submit an answer during &#8230; <a href="https://robotinvader.com/blog/?p=534">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you signed up for the <a href="http://deadsecret.com">Dead Secret mailing list</a> or <a href="http://twitter.com/robotinvader">follow us on Twitter</a>, you might have heard of the <a href="http://robotinvader.com/deadsecret/puzzle">DEAD SECRET Puzzle Challenge</a>.  Each puzzle is unlocked by a YouTube streamer and anybody can submit an answer during the few hours that each puzzle is open.  The first ten people to submit correct answers get a copy of Dead Secret for free.</p>
<p>At the time of this writing three of the five puzzles have been unlocked, and so far the response has been phenomenal.  The puzzle questions are designed to be just hard enough that a quick Google search will not yield the answer. Some of them also have another purpose: to force respondents to learn a little tidbit about something that they might otherwise never have encountered.  So far topics covered have included pioneering psychologists, binary numbers, and the historic underpinnings of a classic Japanese folktale.</p>
<div id="attachment_536" style="width: 773px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-536" class="wp-image-536 size-full" src="https://robotinvader.com/blog/wp-content/uploads/2016/05/chautauqua.jpg" alt="chautauqua" width="763" height="491" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/05/chautauqua.jpg 763w, https://robotinvader.com/blog/wp-content/uploads/2016/05/chautauqua-300x193.jpg 300w" sizes="auto, (max-width: 763px) 100vw, 763px" /><p id="caption-attachment-536" class="wp-caption-text">A chautauqua. Relating it to this article is a task I leave to you.</p></div>
<p>Most folks who submit an answer will just find the information they need, type it into the field, and hit &#8220;send.&#8221;  But a few might keep their research tabs open to be read in greater detail later.  A yet smaller audience might become interested in what they&#8217;ve found and spend some time learning more about it.  This is my secret goal.  My hope is that, as people trace the story paths we&#8217;ve laid, a few will notice a back alley, explore it, and discover a fascinating new world.</p>
<p>In solving Puzzle #3 perhaps somebody will read <em>Hoichi the Earless</em>, a Japanese folktale about a blind minstrel who is bewitched into playing for ghosts.  To complete the puzzle maybe they&#8217;ll discover that the ghosts he&#8217;s playing for are the deceased Taira clan, who are the subjects of the story Hoichi sings about.  Maybe they&#8217;ll realize that Hoichi&#8217;s temporary home, Amidaji Temple, is located on the straights of Shimonoseki, which is where the decisive naval battle that ended the Taira clan took place in the 12th century. The temple still stands there today, although it was converted to a Shinto shrine and its name was changed during the Meiji era.  Maybe one of the respondents to our quiz will go there someday.</p>
<p>Or maybe not.  There&#8217;s no way to know if we can really spur learning with the offer of a free Steam code to a horror game.  As long as folks are having a good time it&#8217;s not important that we cram some stealth education down their throats.  But if we can tickle the interest of even a few and lead them down a path to opportunities for learning and deeper thought, they&#8217;ll remember us later.  Maybe we will have enriched their lives, even just a tiny bit.  Seems worthwhile to try.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dead Secret Launching on 3/28!</title>
		<link>https://robotinvader.com/blog/?p=519</link>
					<comments>https://robotinvader.com/blog/?p=519#comments</comments>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Fri, 11 Mar 2016 21:47:02 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=519</guid>

					<description><![CDATA[DEAD SECRET, Robot Invader&#8217;s seventh video game, will launch for Desktop and VR on March 28, 2016!  DEAD SECRET is a mystery / horror game that takes place in rural Kansas in 1965.  Here are all the details on the &#8230; <a href="https://robotinvader.com/blog/?p=519">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>DEAD SECRET, Robot Invader&#8217;s seventh video game, will launch for Desktop and VR on <strong>March 28, 2016</strong>!  DEAD SECRET is a mystery / horror game that takes place in rural Kansas in 1965.  Here are all the details on the launch:</p>
<p><iframe loading="lazy" title="Dead Secret Launch Trailer" width="640" height="360" src="https://www.youtube.com/embed/Da4tG1NrE1Y?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<h3><strong>Desktop and VR Versions</strong></h3>
<p>We&#8217;re shipping two different versions of DEAD SECRET: a non-VR, Desktop version via Steam, and a VR version via the Oculus Store.  Wherever you choose to buy it you&#8217;ll get both versions, either via a hybrid build of the game or a free unlock code.  If you pre-ordered DEAD SECRET on our web site we&#8217;ll send you codes for both the Steam and the Oculus versions.</p>
<p>Here&#8217;s DEAD SECRET on Steam: <a href="http://store.steampowered.com/app/402260">http://store.steampowered.com/app/402260</a></p>
<h3><strong>Soundtrack</strong></h3>
<p>We&#8217;re also pleased to announce that <a href="http://benprunty.com">Ben Prunty</a>, the intrepid composer of the DEAD SECRET score (and many others, including <em>FTL</em> and<em> Gravity Ghost</em>) is releasing the soundtrack on Bandcamp and Steam.  You can listen to the title track <a href="https://www.youtube.com/watch?v=rw1SutWmG-U">here</a>!</p>
<h3><strong>Reviews, Let&#8217;s Plays, and More</strong></h3>
<p>Since launching the Gear VR version of DEAD SECRET late last year the response has been overwhelmingly positive.  Scott Hayden at Road to VR <a class="" href="http://www.roadtovr.com/review-dead-secret-one-early-great-successes-vr-thrillers/">called Dead Secret</a> &#8220;by far one of the longest, and most engaging VR experiences I’ve ever had—mobile or otherwise,” while VRGiant <a class="" href="http://vrgiant.com/mobile-vr-reviews/deadsecret/">named it a “must play,”</a> and Gamezebo called it an “<a class="" href="http://www.gamezebo.com/2016/01/04/top-10-must-play-games-for-the-gear-vr/">unforgettable experience</a>.”  Time Magazine labeled Dead Secret “captivating” and “<a class="" href="http://time.com/4124998/samsung-gear-vr-review/">deeply creepy</a>.” Finally, DEAD SECRET was <a href="http://www.imgawards.com/games/dead-secret/">nominated for &#8220;Best VR Game&#8221;</a> at the IMG Awards.  Winners are announced next week, and we&#8217;ve got our fingers and toes double-crossed.</p>
<p>User feedback has been stellar as well.  Our analytics show that players are spending hours playing DEAD SECRET, and the title has managed to remain one of the top-ten best-selling applications on Gear VR for almost its entire tenure on that store.  We&#8217;re pretty happy about our 4.5 / 5 star rating as well.</p>
<p>We&#8217;ve started to see Let&#8217;s Play videos of DEAD SECRET appear.  These are great for giving you a taste of the game play.  Here&#8217;s a <a href="https://www.youtube.com/watch?v=wP89CpBVFaA">video played in VR</a> and here&#8217;s another <a href="https://www.youtube.com/watch?v=4ockQ4kS9TY">playing the Desktop version.</a>  Many thanks to the folks recording and uploading these videos!</p>
<p><a href="https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey.png" rel="attachment wp-att-520"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-520" src="https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-1024x576.png" alt="monkey" width="640" height="360" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-1024x576.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-300x169.png 300w, https://robotinvader.com/blog/wp-content/uploads/2016/03/monkey-768x432.png 768w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<h3><strong>What about Playstation?</strong></h3>
<p>We&#8217;re still working hard on a version of DEAD SECRET for Playstation platforms.  We don&#8217;t have a date for these to announce yet but will be in touch about them soon!</p>
<h3><strong>We need your help!</strong></h3>
<p>If you like weird games, VR or otherwise, please help us make the launch of DEAD SECRET a success.  Tell your friends, write a tweet, or post the trailer somewhere&#8211;anything you can do to help us get the word out is incredibly valuable.  We are a small team and we are funded entirely with the sales of our games, so we very much appreciate your support.  More information and screenshots are at <a href="http://deadsecret.com">http://deadsecret.com</a>.</p>
<p>Here are some handy social buttons to make it easy!</p>
<p><a href="https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fabout.twitter.com%2Fresources%2Fbuttons&amp;ref_src=twsrc%5Etfw&amp;text=DEAD%20SECRET%20launches%20for%20Desktop%20and%20%40Oculus%20VR%20on%20March%2028!%20More%20info%3A&amp;tw_p=tweetbutton&amp;url=https%3A%2F%2Frobotinvader.com%2Fblog%2F%3Fp%3D519&amp;via=robotinvader" rel="attachment wp-att-525"><img loading="lazy" decoding="async" class="aligncenter wp-image-527 size-full" src="https://robotinvader.com/blog/wp-content/uploads/2016/03/tweet-button-2015-1.png" alt="" width="182" height="61" /></a><a href="http://www.facebook.com/share.php?u=https://robotinvader.com/blog/?p=519" rel="attachment wp-att-526"><img loading="lazy" decoding="async" class="wp-image-526 aligncenter" src="https://robotinvader.com/blog/wp-content/uploads/2016/03/facebook-share-button.png" alt="facebook-share-button" width="180" height="66" /></a></p>
<p>DEAD SECRET ships for PC and VR in 17 days!  See you soon!</p>
<p>The Robot Invader Team</p>
]]></content:encoded>
					
					<wfw:commentRss>https://robotinvader.com/blog/?feed=rss2&#038;p=519</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Dead Secret Nominated for Best VR Game</title>
		<link>https://robotinvader.com/blog/?p=510</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 17 Feb 2016 21:49:35 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[mobile games]]></category>
		<category><![CDATA[Robot Invader]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=510</guid>

					<description><![CDATA[Dead Secret is a finalist in the IMG Awards for Best VR Game! We&#8217;re super excited to be in the running!  Please vote for Dead Secret!]]></description>
										<content:encoded><![CDATA[<p>Dead Secret is a finalist in the IMG Awards for <em><a href="http://www.imgawards.com/games/dead-secret/">Best VR Game</a></em>!</p>
<p><a href="https://robotinvader.com/blog/wp-content/uploads/2016/02/awards-badges_5_transparent_white_nominee_vr.png" rel="attachment wp-att-511"><img loading="lazy" decoding="async" class="aligncenter wp-image-513 size-large" src="https://robotinvader.com/blog/wp-content/uploads/2016/02/awards-badges_5_transparent_white_nominee_vr-1024x630.png" alt="" width="640" height="394" srcset="https://robotinvader.com/blog/wp-content/uploads/2016/02/awards-badges_5_transparent_white_nominee_vr-1024x630.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2016/02/awards-badges_5_transparent_white_nominee_vr-300x185.png 300w, https://robotinvader.com/blog/wp-content/uploads/2016/02/awards-badges_5_transparent_white_nominee_vr-768x473.png 768w, https://robotinvader.com/blog/wp-content/uploads/2016/02/awards-badges_5_transparent_white_nominee_vr.png 1300w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p>We&#8217;re super excited to be in the running!  Please <a href="http://www.imgawards.com/awarded-games/12th-imga/">vote for Dead Secret</a>!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Comfortable VR Movement in Dead Secret</title>
		<link>https://robotinvader.com/blog/?p=493</link>
					<comments>https://robotinvader.com/blog/?p=493#comments</comments>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Tue, 27 Oct 2015 17:07:26 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[virtual reality]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=493</guid>

					<description><![CDATA[One of the big unsolved problems in virtual reality game design is movement.  Standing still feels great, but things go south when you start to move.  Many developers have experimented with standard first-person shooter movement systems in virtual reality games, and &#8230; <a href="https://robotinvader.com/blog/?p=493">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>One of the big unsolved problems in virtual reality game design is movement.  Standing still feels great, but things go south when you start to move.  Many developers have experimented with standard first-person shooter movement systems in virtual reality games, and the result is always nauseating. Even worse, some seem unwilling to admit that their standard FPS controls feel terrible in VR. &#8220;It feels fine to me,&#8221; is the refrain of a person who doesn&#8217;t understand simulation sickness, hasn&#8217;t done any testing, and isn&#8217;t taking virtual reality seriously.  When such dismissals are code for &#8220;it&#8217;s too much work to change my game design to accommodate comfort,&#8221; it might be an indication that the game isn&#8217;t a fit for VR at all.</p>
<p><em><a href="http://deadsecret.com">Dead Secret</a></em> is a first-person game with first-person movement, and we worked really hard to ensure that movement is comfortable.  We&#8217;ve tested our solution on a wide audience&#8211;a large number of people, as diverse as we could manage&#8211;and have exceptionally positive results.  <em>Dead Secret</em>&#8216;s movement system isn&#8217;t perfect, and it&#8217;s not a general solution for all first-person movement in games, but it works very well for our purposes.</p>
<p><a href="https://robotinvader.com/blog/wp-content/uploads/2015/10/type_dead_small.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-497" src="https://robotinvader.com/blog/wp-content/uploads/2015/10/type_dead_small-1024x576.png" alt="type_dead_small" width="640" height="360" srcset="https://robotinvader.com/blog/wp-content/uploads/2015/10/type_dead_small-1024x576.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2015/10/type_dead_small-300x169.png 300w, https://robotinvader.com/blog/wp-content/uploads/2015/10/type_dead_small.png 1200w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p>Before we get into the details of <em>Dead Secret</em>&#8216;s locomotion system, it is worth reviewing the physiology behind motion and simulation sickness.  There are a ton of triggers for motion sickness, but the common one for VR is called <em>vection</em>, and it occurs when your brain encounters a disparity between the information reported by your vestibular system (that&#8217;s the part of your inner ear that keeps you balanced) and the information coming from your eyes.  When your inner ears and your eyes disagree it can feel like the world is moving while you are not.  Vection probably evolved as an anti-poison response; apparently there are a lot of toxins that will disrupt your vestibular system, and so your brain&#8217;s first move is to make you vomit.  This is why you can get sick by reading in a car: your ears report the motion of the vehicle but your eyes, which are focused on the page, do not corroborate it.</p>
<p>Of course, there&#8217;s more to it than that.  Your body is incredibly complicated and individual responses vary quite a bit.  There&#8217;s a ton more to learn about how virtual reality can confuse your brain precisely because it is so convincing.  For a lot more detail, I recommend <a href="https://www.youtube.com/watch?v=6DgfiDEqfaY">this fantastic talk by Oculus&#8217; Richard Yao.</a></p>
<p>That said, understanding the basics of vection can help us define some base principles for VR movement.  Vection occurs when your ears and your eyes disagree.  In VR, any  movement that you do not make yourself is a potential source of vection.  But there&#8217;s some hope: as Yao points out, your vestibular system can only detect <em>acceleration</em>, not linear velocity.  When you move at a fixed speed your inner ears do not detect any change.  Therefore we should be able to avoid vection if we simply <em>remove all acceleration from movement.</em></p>
<p>If that seems like a tall order, I have some bad news for you.  Just about every interesting camera movement you might perform in a traditional first-person game causes acceleration.  One of the main reasons that naively-implemented FPS control schemes feel so bad in VR is that they usually continue to rely on mechanics like right stick body rotation.  Rotation in place requires angular acceleration, which your ears can totally feel, and when you do it to the player in VR it feels totally bad.  FPS run bouncing, originally invented to simulate shifting of weight from foot to foot as your avatar runs, feels particularly bad because it&#8217;s a parabolic motion&#8211;that&#8217;s 100% acceleration, people.  Don&#8217;t even get me started on canned camera animation; the fastest way to suck somebody out of a VR experience is to take away their head tracking.</p>
<p>Now, if I were to suggest that a traditional game remove all acceleration from its camera, I&#8217;d be laughed out of the room.  Camera animation is a big part of the experience in a traditional first-person game.  But we&#8217;re not making a traditional game, we&#8217;re making a VR game, and the rules are different.  Rather than blindly applying grammar from a different medium we have to come up with theories and test them, which is what we spent the better part of a year doing.  The results have very little to do with what works in traditional games, but a lot to do with what works in our VR game.</p>
<p>Here are the rules for <em>Dead Secret&#8217;s</em> camera system:</p>
<ul>
<li>No acceleration, ever.  Linear movement only.</li>
<li>No rotating the camera (other than rotation coming from the HMD).</li>
<li>You can only move in straight lines. Prefer not to change direction while moving.</li>
<li>Motion should be short.  Rule of thumb is to keep all motion to bursts of 5 seconds or less.</li>
<li>Never ever take away head tracking or lock something to the view.</li>
<li>Maintain frame rate at all times.</li>
</ul>
<div id="attachment_501" style="width: 726px" class="wp-caption aligncenter"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-501" class="wp-image-501 size-full" src="https://robotinvader.com/blog/wp-content/uploads/2015/10/enterstudy.gif" alt="enterstudy" width="716" height="402" /><p id="caption-attachment-501" class="wp-caption-text">Zero acceleration or artificial rotation.</p></div>
<p>That last one is pretty important.  In our tests we were able to remove almost all vection from testers by removing acceleration and rotation, but folks still felt bad if the frame rate started to drop.  Latency on the HMD is another vector for sickness, and it&#8217;s one that can bite you regardless of how careful you are with your movement system.  We worked hard to keep the frame rate high throughout <em>Dead Secret</em>.<br />
To make our game actually playable within those rules the movement scheme had to change quite a bit.  You investigate the scene of a perfect murder in <em>Dead Secret</em> by moving between fixed positions in the room.  That had been part of the design since Day 1.  But to accommodate the requirements of VR the layout and design of our rooms changed dramatically.  I wrote a bit before about <a href="https://robotinvader.com/blog/?p=469">the use of space in Dead Secret&#8217;s level design</a>, if you&#8217;re interested.</p>
<p>There are a number of odd side-effects to this design.  For example, the player can turn 180 degrees and walk to their destination backwards.  The system relies upon the player rotating his whole body to look around the room, but we can&#8217;t expect every player to be sitting in a swivel chair.  We added controller-based rotation to accommodate this, and implemented rotation as a 40-degree click with a &#8220;blink&#8221; transition.  This doesn&#8217;t trigger vection because your brain never sees any angular movement (via &#8220;change blindness,&#8221; which Yao covers in his talk).  And we found that while no testers reported feeling nauseous or sick, about 1% felt disoriented by having to actually turn their body to see things behind them.  For these folks we added a &#8220;comfort mode&#8221; which omits all motion completely.</p>
<div id="attachment_494" style="width: 1030px" class="wp-caption aligncenter"><a href="https://robotinvader.com/blog/wp-content/uploads/2015/10/testers.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-494" class="wp-image-494 size-full" src="https://robotinvader.com/blog/wp-content/uploads/2015/10/testers.png" alt="" width="1020" height="405" srcset="https://robotinvader.com/blog/wp-content/uploads/2015/10/testers.png 1020w, https://robotinvader.com/blog/wp-content/uploads/2015/10/testers-300x119.png 300w" sizes="auto, (max-width: 1020px) 100vw, 1020px" /></a><p id="caption-attachment-494" class="wp-caption-text">Zero reports of nausea. Not even Sharapova.</p></div>
<p>The last thing we did to ensure our camera system was comfortable was to test the heck out of it.  I&#8217;ve read that about 10% of the population is susceptible to motion sickness.  In order to properly test a system you need a large enough testing group to identify folks who might be within that ten percent.  We put Gear VR devices on as many people as we could to help verify our design.  As we&#8217;ve iterated the design we&#8217;ve been able to push the number of people reporting discomfort to nearly zero.</p>
<p>There&#8217;s a lot more experimentation to do in this area.  One idea, which we haven&#8217;t tried, is to black out the view at the start and end of a movement.  This is based on the theory that even if the camera is moving at linear speed, the brain can infer acceleration just from visual input.  Another approach, which I&#8217;ve seen work well in other games, is to black out the peripheral view of the horizon (e.g. by placing the view in a cockpit).  The brain apparently uses motion in your peripheral vision to compute velocity, so denying it that information can lead to a more comfortable experience.  There are also folks experimenting with transitions between first-person and third-person camera angles for the purposes of movement.</p>
<p>It&#8217;s almost impossible to guess how a system will feel in VR without implementing it.  <em>Dead Secret</em>&#8216;s movement system was designed by iteration&#8211;we tested and discarded many variants before we hit upon a generally comfortable model.  And that&#8217;s one of the amazing things about working in VR today&#8211;there&#8217;s so much design space to explore. Tried-and-true tricks from traditional games might not work in VR, but there are a ton of new tricks out there, just waiting to be found.</p>
<p>We have a lot more to say about <em>Dead Secret </em>in the very near future, so if you&#8217;re interested check us out on <a href="http://twitter.com/robotinvader">Twitter</a>, <a href="https://www.facebook.com/Dead-Secret-1382342035409224/">Facebook</a>, or <a href="http://deadsecret.com">sign up for the mailing list</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://robotinvader.com/blog/?feed=rss2&#038;p=493</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Dead Secret Diary: Locomotion and Space</title>
		<link>https://robotinvader.com/blog/?p=469</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Sun, 12 Jul 2015 00:57:10 +0000</pubDate>
				<category><![CDATA[dead secret]]></category>
		<category><![CDATA[game design]]></category>
		<guid isPermaLink="false">https://robotinvader.com/blog/?p=469</guid>

					<description><![CDATA[I gave a talk at GDC 2015 about designing our new title, Dead Secret, for mobile VR platforms like the Gear VR.  That seemed to go over well, so I thought I&#8217;d write a little bit about the design of the game itself. &#8230; <a href="https://robotinvader.com/blog/?p=469">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>I <a href="http://schedule.gdconf.com/session/designing-for-mobile-vr-in-dead-secret">gave a talk at GDC 2015</a> about designing our new title, <em><a href="http://deadsecret.com">Dead Secret</a></em>, for mobile VR platforms like the Gear VR.  That seemed to go over well, so I thought I&#8217;d write a little bit about the design of the game itself.</p>
<p>Dead Secret is a murder mystery that takes place entirely within the home of the victim.  Your goal is to search the house for clues, piece together the events leading up to the death, and finally name the killer.  In designing this game one of the main challenges has been to define how the physical space, puzzles, and pacing interact.  This can be thought of as the problem of <em>density</em>: what is the effect of packing lots of information into a small space compared to spreading it out over a larger space?</p>
<p><a href="https://robotinvader.com/blog/wp-content/uploads/2015/07/4-10-15_small.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-487" src="https://robotinvader.com/blog/wp-content/uploads/2015/07/4-10-15_small-1024x492.png" alt="4-10-15_small" width="640" height="308" srcset="https://robotinvader.com/blog/wp-content/uploads/2015/07/4-10-15_small-1024x492.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2015/07/4-10-15_small-300x144.png 300w, https://robotinvader.com/blog/wp-content/uploads/2015/07/4-10-15_small.png 1280w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p>To some extent, this question is answered for us by other design decisions we&#8217;ve made.  The house in Dead Secret is based on real architectural plans for a home of the proper era and location.  It&#8217;s not a mansion, it&#8217;s a two story home with one bathroom, two bedrooms and, ahem, a basement.  We&#8217;ve made some modifications here and there, and some of the game takes place outside the home itself.  But the space is relatively small.</p>
<p>More importantly, individual rooms are sized the way they should be, which means that once we fill them with bookshelves, tables, cupboards, and esoteric 19th-century mechanical instruments, there&#8217;s not a whole lot of space to get into a firefight, parkour up a wall, or  even sneak through some air ducts. This house is old enough that it doesn&#8217;t even have air ducts.</p>
<p>By electing a dense, cramped environment, we implicitly closed the door on things like shooting and platforming.  It&#8217;s a good thing, too, because those sorts of interactions typically rely on locomotion systems that probably make people sick in VR.  Instead, Dead Secret is about exploration, about finding clues, and about solving puzzles.  For this, the tight, contained space of the house works really well.  We can pack a ton of detail into each room and simplify our locomotion system to encourage methodical investigation.  One of the most surprising aspects of VR for us is the sense of spaciousness of virtual spaces.  When the scale is right, an environment that appears noisy and cluttered on a screen feels open and airy in VR.</p>
<p>The tight coupling of rooms also lets us engage in a level design pattern that I call <em>recursive unlocking.</em>  Recursive unlocking describes a map design with tightly packed rooms connected by doors that are initially locked.  The space available to the player starts out small, but as they unlock one room after another it begins to unwind like a shell.  Rooms interconnect and shortcuts are created, and traversing the space efficiently becomes a puzzle in and of itself.  <em>Resident Evil</em> is the archetypical example of this pattern, and if you&#8217;re interested you can read my <a href="http://horror.dreamdawn.com/?p=81213">analysis of recursive unlocking</a> in that game.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-486" src="https://robotinvader.com/blog/wp-content/uploads/2015/07/4-3-15_small-1024x492.png" alt="4-3-15_small" width="640" height="308" srcset="https://robotinvader.com/blog/wp-content/uploads/2015/07/4-3-15_small-1024x492.png 1024w, https://robotinvader.com/blog/wp-content/uploads/2015/07/4-3-15_small-300x144.png 300w, https://robotinvader.com/blog/wp-content/uploads/2015/07/4-3-15_small.png 1280w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
<p>Since our crime scene has many fewer rooms than Raccoon City&#8217;s Spencer Mansion, the implementation of recursive unlocking in Dead Secret is focused on aligning new areas to beats in the narrative, and eventually reconnecting them back to a common space.  The player will visit a new space and find themselves unable to return to the area they were previously in.  After resolving the new space they find a path back to an area that they know, and eventually into another new space.  Thanks to the density of content in each space, this approach lets us cram the whole game into just one house.</p>
<p>A highly dense space does have disadvantages, though.  Locomotion needs to be precise, and therefore ends up being a bit slower than in other forms of games. In a detailed environment, finding items to use for puzzles can be tricky because there is so much visual information to process.  Puzzles are used to gate progression, so we need to organize our <a href="http://grumpygamer.com/puzzle_dependency_charts">puzzle dependency charts</a> to prevent frustrating shelf moments at all costs.  Puzzle interfaces need to be fairly expressive, so we end up writing a lot of one-off code for specific puzzle interactions.  Recursive unlocking helps us keep items local to a common area of relevance, but wandering has a higher cost in Dead Secret than in other games in this genre (due to being in VR and also because we&#8217;ve traded control flexibility for environment detail), so we sometimes need to be more heavy handed about progression than I would prefer.</p>
<p>Still, this type of experience seems perfect for VR.  The trade-offs required to make the home of our murder victim interesting and compelling are generally things that are good for VR anyway. We want you to <em>be</em> in this house, and while VR technology can open the front door, it&#8217;s still up to us to make the floorboards creak as you cross the threshold.</p>
<p><i>Look for <a href="http://deadsecret.com">Dead Secret</a> later this year on Gear VR, and on other platforms thereafter.</i></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>