Applied Valence Theory

Since the playtest a few weeks ago, I have been aiming to improve the core stealth experience in NEON STRUCT. A couple of friends reminded me of Randy Smith’s GDC presentations on stealth gameplay, and especially the concept of attractive and repulsive stealth spaces, which Robert Yang called valence theory. Here, I’ll examine in detail the first stealth space in the game and show how I am using this concept to improve it.

In the playtested version of the level, this is the player’s perspective as they enter the space. There are some distant guards slowly patrolling the area, and an apparent path of shadow straight up the center toward the large, well-lit central building. But reviewing this space through the lens of valence theory reveals some key problems.

First, it’s kind of a mess: a large ground, dotted with lights and big looping patrols, but no interesting features to break up the space. More importantly, the apparent best path (from the player’s perspective) turns out to be a trap. Halfway to the destination, the player will end up in the middle of the field with no safe approach. Furthermore, there is an alternative path to the right which entirely circumvents the patrols and dangerous spaces. If the player goes this way, they will have a flat, unchallenging experience, and entirely miss the stealth gameplay this space was intended to provide.

This is my first pass at improving the encounter. The most immediately apparent difference is that the space is much smaller, and broken up in the center by a large walled structure. The patrols are much shorter and nearer to the player’s point of entry, making them more visible and learnable.

From the player’s perspective, there is no longer a direct path to the central building. Instead, the player is intended to make a shorter movement to a nearer destination. There are two visible destinations: the dark wall straight ahead, and the dark corner to the left. Both involve waiting until a guard has turned away, but the path to left is somewhat safer as it has some nooks to hide in along the way. (I may also put some planters along the road to provide a bit of occlusion for the player, as both paths still look a little more dangerous than they are intended to be.)

There is a hidden third destination, to the right behind the well lit blind corner. As before, this leads to a mostly unguarded space in front of the right wing of the complex, but getting there is no longer a flat, trivial experience. A player might risk approaching that blind corner, but the light and occlusion are designed to repel them from it. They are more likely to traverse that space when exiting the level, as it provides a safe vantage point to scout these patrols from the other side.

On the far side of this space, I have also added an entrance canopy to the central building. This serves both to identify that building as the primary destination, and to provide occlusion from the bright lights.

Much of the rest of NEON STRUCT‘s development will be spent iterating on the levels and making this sort of improvement. The game is nearly end-to-end playable now, but a few more months of work on stealth gameplay at the micro encounter level is needed to make it the game I want it to be.

The Music of NEON STRUCT

Some months ago, I was trying to figure out NEON STRUCT‘s soundscape. Like the classic stealth games that inspired me, NEON STRUCT is a game where sound conveys useful information to both the player and AIs. Background music could be distracting or tonally inappropriate when the player is waiting and listening for enemy footsteps.

But in between the stealth levels, the player visits safe social spaces. In that context, music is not only appropriate but also serves to implicitly notify the player that she doesn’t need to be stealthy now. However, I worried that the sudden presence (and subsequent absence) of music in the player’s ears could be jarring.

I began experimenting with using diegetic (in-world) music, drawing the player into social spaces and fading out as the player departs. I felt that it met the goals of denoting safe spaces and transitioning more seamlessly from and into stealth levels, but now it felt strange to have instrumental game music playing on in-world stereo systems. I didn’t just want music, I wanted songs.

I reached out to my friend Andrew Strickland and his sister Anne of the band The Home Conversion. I had listened to their album Stay Wild extensively, and it had an 80s-influenced chill synths + guitars sound that I felt would be a great fit for the world of NEON STRUCT. Anne and Andrew were also excited about the prospect, and offered to not only contribute songs from the album but also to write and record new material for the game.

So I’m thrilled to finally announce that The Home Conversion are providing the music for NEON STRUCT. We have sequenced a tentative 18-song soundtrack, including 7 songs from the Stay Wild album and a whole lot of remixes and new songs. We look forward to sharing more closer to the game’s release next year!

Sequences and Shaders

I started building a filmic title sequence for NEON STRUCT this week. My options for implementing it were somewhat constrained. I don’t have any support for Flash or Bink videos, so I had to build it all in-engine. It’s also a short sequence, so I didn’t want to spend too much time on it.

I wanted this sequence to contain visual elements suggestive of an electronic surveillance system searching for Jillian, the player character. I first considered a Casino Royale-esque treatment with swirling vector art of eyes and ears and camera apertures and drones, but I wasn’t sure I could execute that concept particularly well. Instead, I wanted to take a programmatic approach and let the code turn a small amount of content into something bigger.

The treatment I chose, as seen in the video above, is a sort of glowing, pixelated crawl that leaves behind a faint trace of Jillian’s face. It is implemented with just 4 textures, a simple shader, and a short piece of code that drives the control values in the shader during the sequence.

The fundamental concept of animating the crawl in the shader works by clamping a gradient texture to a small range of values that shifts over time.

For example, this is the gradient I use for the pink and blue diagonal wipe at the start of the video. By authoring it as a gradient from dark in the top-left to bright in the bottom-right, the pixels will crawl in that direction. I added some noise so that some pixels will light up earlier or later than their neighbors. And because I wanted a pixelated look, I started with a small gradient texture and blew it up to full size without interpolation, leaving all those big chunky pixels.

Then the shader multiplies the value by a grid mask to separate the big pixels from each other…

…and finally multiplies by a color texture to colorize the result.

In practice, the gradient texture and mask are packed into the red and green channels of a full color texture, and a second gradient/mask pair is packed into the blue and alpha channels to control the secondary crawl (the trail of longer-burning pixels that reveal Jillian’s face). The parameters for the gradient selection on each of these channels are driven by a small piece of game code.

When the sequence switches from the pink and blue crawl to the green radar crawl, it is simply using a different pair of textures; and I can easily implement more patterns just by authoring a couple of simple textures.