Developer’s Journal: Using Lights and Sounds to Create Tension

DapaleDJHello everyone! Dapale here. Ever since I began my ROBLOX journey two years ago, I have always wanted to create a game where players could experience fear in a chilling atmosphere. With the recent advents of dynamic lighting and user-uploaded sounds, I was able to realize my vision with Sanatorium. In my Developer’s Journal, I’ll be explaining the level design of Sanatorium, with an emphasis on using lighting and audio to create tension and fear.

Lighting

It was a huge coincidence that dynamic lighting released shortly after I finished building Sanatorium’s level. Once I got the hang of how SpotLights and PointLights worked, I started placing bricks around my map where I thought lighting would be appropriate. I used PointLights instead of SpotLights because they give me more creative control, and light rooms in a broader, more subtle way. Experimenting revealed to me that lighting a level revolves around understanding sources of light, and where they belong relative to the map. I found that being subtle is the best way to create an eerie atmosphere.

SanatoriumBlog2

I’m particularly proud of the way the lighting works in the picture above. In order to create this lighting scenario, I added a bunch of parts to lights I had scattered throughout the room, then made those parts invisible. This is a very useful method of 3D lighting that I’ve used throughout Sanatorium. Then I tweaked the light settings to get the specific shade and color I desired. This showed me the importance of colors (or lack thereof) to create a distinct mood. I chose to go with a mostly white and gray color palette, and kept additional colors darkened to establish a creepy atmosphere.

Sound

SanatoriumBlog4To play sounds in Sanatorium, I bake them into a GUI player. This method is not new–it allows you to use the “local sounds” method, meaning the sounds play from an individual perspective and are not the same for everyone on the server. This allows everyone to experience Sanatorium differently. I originally used sounds that ROBLOX made and either changed their pitches or scripted them in slightly different ways to get the effect I wanted. As soon as user-uploaded sounds launched, I started creating and uploading my own sounds. I recall that crazyman32 mentioned in this previous Developer’s Journal that he used Audacity, and I have the same advice. The small learning curve (not to mention the fact it’s open-source) makes it a great place to start creating your own sound effects.

For example, one of my favorite sound effects in Sanatorium is one of the simplest: the cold, nerve-wracking sound of footsteps. To make that sound, I took out my phone and recorded myself walking across some stone. I added the sound to Audacity, shortened it, upped the pitch to give the noise more of a punch, and added it to the game.

Get jump scares by flashing freaky images in short bursts (and add an abrupt and freaky sound to it for added effect!)

Get jump scares by flashing freaky images in short bursts (and add an abrupt and freaky sound to it for added effect!)

I created custom sounds for many other effects and swapped them for the old ones. I learned some other important lessons in this process:

  1. Testing sounds is key; make sure your sounds achieve the desired effect. For example, I was adding a scream sound to the game. The sound was fine, but in practice it turned out to be nothing like I wanted. The pitch was too high and the timing of the sound was wrong. So, I took the time to redo it.
  2. Frightening and moody sound effects go a long way in establishing an atmosphere that makes players cautious and pensive about what’s going to happen next. I’ve observed this working: players slowly walk into rooms or tell others to be cautious after hearing something scary.
  3. Be cautious about how many sounds you upload in a single game. I was surprised how easy it is to get carried away, and overload and confuse players. As with lighting, subtlety is key.
  4. Use sound to build tension. When you start Sanatorium, you hear next to nothing (which is creepy in and of itself.) The sound escalates with each page that you find. By page five, there are various sounds playing together, including a pulsating dark melody and the sound of wind whipping through the air.

Don’t Be Scared

Sanatorium was a real learning experience in regard to scripting. I stumbled across many errors that took creative thinking to solve. For example, sprinting is an important part of Sanatorium (and other horror games, as well). After players experience a scare or feel unnerved, it’s natural to want to run away as fast as possible. When I first started coding the sprint script, it teleported players throughout the map. I used the ROBLOX Wiki to uncover the problem: turns out that, when players activated the sprint, I was changing the BodyForce rather than the WalkSpeed. Not a good idea. I quickly identified what I had to do for the WalkSpeed and fixed the script by tweaking it to identify each humanoid player in the map and manually setting their walkspeeds. Problem solved.

SanatoriumBlog5

I also went out of my way to use scripts to intensify the atmospheric effects of dynamic lighting and sound. Lights throughout the level flicker on and off. There are jump scares accompanied by terrifying noises–and after they happen, players often find themselves looking in a different direction, leaving them disoriented. I could have never done these things without dynamic lighting, sounds and some scripting knowledge, and can’t wait to continue finding ways to terrify players.

SanatoriumBlog3

Sanatorium v3.0

I released a completely updated and overhauled version of Sanatorium on November 1st. Here are some major changes:

  • Redesigned menu
  • New statistics page
  • Advantage Map: Game Pass owners will be able to find and explore landmarks
  • More robust options page
  • More realistic death animation
  • Spectate mode: watch others while you wait to play!
  • New loading screen
  • In-game purchasing
  • Brand new sounds!

Thank you all for trying Sanatorium and for being vocal with your feedback and suggestions.