Postmortem: Initium Squared
New engines tend to get slammed pretty hard. Unity is no exception, and when it comes to audio, out of the box, it has definitely had its share of criticism. But thereâ€™s actually a lot the engine can do if you take the time to look under the hood. I cover some of it in a Game Developer article published in August of last year.
In addition, a few months ago my team at Funky RusticÂ released â€śInitium Squaredâ€ť. With primary development by dotBunny using the Unity 3D engine, this demo is intended to showcase audio in the context of a game space. We created the demo primarily to show potential clientele that we were not only experienced with the Unity game engine, but to show that we could do more than make videos or linear formats to demonstrate our audio.
This postmortem is intended to show you how Initium Squared (IS) was created. It also will I hope make utterly clear my newfound +10 respect for skilled game designers. Finally, I stress to all audio folk out there that itâ€™s a huge help to understand other aspects of games more deeply such as art pipeline and scripting. Iâ€™ll illustrate that as I describe our integration process.
First, the demo is playable online, so you can check it out here:
What IS it?
As an audio director over the years I have received numerous demos, mostly in the form of CDs or DVDs. Some with gimmicky items included, some with revealing images of well-built females. More recently, websites with SoundCloud examples and mp3s have been used. But
I always wished I had received something that was more in context, something I could experience interactively. Videos with the audio swapped out were a good first step, but there was nothing I could play. To this day I hadnâ€™t seen something that did it, and once Unity proved it could provide web based builds, I began planning how to achieve an online playable interactive audio demo.
Ideally, the demo would showcase the use of 3d sounds such as ambiences as well as the ability to mix the ambiences halfway decently as the player explored an environment. Interactively the player would summon creatures and particle effects as well. The original concept was a single cube room that would transform into numerous worlds as you press buttons (metal room, wooden room, natural landscape, water). The room would also ideally change shape and therefore the reverb in the room would also change. This would enable the player to hear different surfaces and environments without having to travel.
Early on in August of 2011 Levon Louis ended a successful tenure at Ubisoft as audio director on Assassinâ€™s Creed: Brotherhood, among other titles. He introduced me to Matthew Davey of dotBunny, already an experienced Unity developer.
The concept that began as â€śInitiumâ€ť would showcase a level with a wizard wandering around and attacking various creatures. The design would be taken on by Levonâ€™s startup company Headrush Games, and the development would be undertaken by dotBunny, as well as some level design / 3d landscaping by Thomas Pasieka at 3d Attack.
If you build it, will they come?
Initium was completed in roughly two weeks and showcased on a small level at GDC 2012, but soon afterwards it was discovered that the shared development didnâ€™t yield anything groundbreaking or publicity worthy except a fast iteration on a small 3d level.
In addition it was discovered that marketing and showing the demo required far more effort than handing out a few fobs and making some web based announcements. The net is swimming in news and the best way to achieve something that gets attention is to work just as hard at marketing as you do on development. You may not sell a lot of products using such a simple premise but youâ€™ll at least get the exposure.
Afterwards I decided to create another Initium demo, IS, with Mattâ€™s help at dotBunny but focus more specifically on audio.
Focus on the Square
The original design of a shifting room in size, texture and geometry proved more difficult to achieve on the timeline (3 months) and budget of $1000, so instead a system was devised to teleport the player to different prebuilt locations, starting in an abstract white â€śfoyerâ€ť.
Various â€śaltarsâ€ť, also abstract in shape consisting of cubes that start separated and congeal into these shapes as the player approaches, were built, with the idea being that the player could find each altar through its ambient sound.
The inspiration for this came from a level in the original â€śThief: The Dark Projectâ€ť Â , where the player must steal the horn of Quintus and the best way to find it is by following its sound. More on that later. Each altar has a single colored button that either generates a particle, a creature, or teleports the player to a different location.
The main exploration area proved to be exciting and challenging. Graphically it is well put together, with many â€śminiâ€ť areas inside a single island space: a castle, a swamp, a mountain range, coastline, and desert. A cottage and two towers (not to be confused with THE two towers) also are present. A metal room, separate of the landscape and white foyer was also created to primarily show impact sounds of metal on metal and provide a stark contrast from the natural and abstract areas already presented.
While the exploration area is diverse, it also required a lot more time to fill out sonically, with dozens of sound radii placed and tweaked to achieve the effect of so many different locales.
One of the challenges in creating the environment with a realistic audio soundscape was footsteps. Unity provides numerous ways to create footstep sound sets and also has its own material system, but some scripting must be done to link the two together. In this case the player is a virtual object (being a 1st person game) represented by aÂ custom dotBunny system (not found in Unity natively).
This consists of a pill-like shape with virtual feet in the form of lines extending from the player object to the surface upon which they are walking, and raycasts. The surface is represented using splat maps over terrain (alpha channels that represent textures over a single surface) , and single texture material assignments for non terrain based geometry, and queries the material.
This material ID then is broadcast to a series of scripts that contain sound files that randomize with both the file itself, pitch and volume. Faders were not used so instead numeric ranges were employed from 0-2.0. Based on the normalization of the files (between -12 and -15db), it was learned that the best range for subtle footsteps was .02-.04.
Music as a collectible item
The main challenge lay in keeping the player interested as they explored, and since the chief motivator was audio, it was decided to let the player hear music as they teleported to new locations, but use the number keys to switch music whenever they wanted to. Each new teleport gains the player a new piece, up to 7 in all. This is a far cry from a carefully scripted system, but the goal was to showcase numerous styles from orchestral to electronic to rock. A future version of Initium will contain a specific interactive music demo in the context of a story driven situation.
Physics proved to be much easier than originally anticipated, mostly because of only one object being used (a barrel) but also because Matthew already had some scripting in place that could be expanded (footsteps). Code that detected a roll or slide factor was used in a similar way as footsteps, with a simple raycast collider at various angles.
As with footsteps, the colliders linked via script to another randomized set of sound files each with its own pitch and volume variation. In previous engine, impact force had a direct relationship with the volume (loudness) of the impact sound. That is not so in this particular demo though as with music, a specific â€śphysicsâ€ť expansion is planned with more items to manipulate in different ways on different surfaces, also exploring limiting simultaneous sounds depending on how many objects are present and how many impacts are taking place.
It has been written about quite well by the LucasArts team and their awesome game "The Force Unleashed", but how cool would it be to play around with a physics engine and control what objects you manipulated and how, watching debug information of sounds played back?
One calm day
Weather systems were definitely something that came onboard later in the cycle. Matt at dotBunny found a great tornado using the Unity Asset Store and he plugged it in, after which I applied ambient sound. Ideally it would throw things around, including the player, and more physics fun could ensue, but it was fun enough to create multiple radii to indicate varying levels of wind and debris as you approach and retreat.
Bumps in the road
Given our result, we accomplished what we set out to do. And Iâ€™m super happy with the result. It feels like a mini Myst. But what was learned?
Years ago during the development of the first â€śUnrealâ€ť game at Epic, a great deal of inspiration was drawn from the art of Roger Dean and Rodney Matthews as early levels started to be built. However it was quickly discovered that in 3d space, walking along a huge stone bridge to get to a beautiful spire can take awhile even if they are running unusually fast (20+mph), and what does the player do in this space (both distance wise and time wise)? Therefore, some distances in the game were drastically cut to achieve more gameplay in a smaller space.
Youâ€™d think Iâ€™d have learned from this. But Â the altars had to be a certain distance apart to effectively use sound based radii to locate them, and not be in easy view. This proved frustrating in an environment with no landmarks other than the altars themselves. To compensate, colored strips fly from the playerâ€™s location to each altar, but even with these custom paths, the time it takes to get to each altar is a bit too long.
In addition to finding your way, some players werenâ€™t sure just what to do, so blue orbs were added that if approached, would give hints at various locations. I never realized how difficult it is as a designer to make a mechanic and / or goal obvious as well as clever and / or unique. My goal was to give the demo an â€śindieâ€ť feel with the abstract white foyer, but in the end it proved a bit too much of a head scratcher for some.
Second, this project is huge in size for an online playable demo, mostly because of the audio, and the audio mostly comprises of music. Unity thankfully and smartly uses OGG format for its native compression, and a lot of tweaking was done to each set of sounds to achieve the best compression setting. Lower frequency sounds use much higher compression, for example. Even with this, on an average US internet connection of 6mbps download, it takes at least 3 minutes to load the entire demo. Quite a while to wait.
Finally, when swinging the hammer in the metal room to hear our physics sounds in there, the player is treated to some booming, reverb heavy clangs. The only drawback to this is that the material collision does not correspond with geometry in that level exactly, so when the hammer is swung at a surface it makes a sound, and when pulling away from the surface, it makes another sound as it â€śemergesâ€ť from the material, as if the player penetrates the material itself and the impact happens on both sides.
Since the demo is meant to be wide ranging in showcasing audio, more specific â€śexpansionâ€ť demos of IS are intended this year, starting with a showcase of our Gun Sound Library (a gun range of course, but no ordinary gun rangeâ€¦). In the meantime I hope this has helped you understand the process of really digging into an engine to make things sound pretty, and you can play your game from anywhere with Unity's web export option. The industry may be rough and tough, but we've come such a long way.Â
Please comment away, ask any questions you like and I'm happy to help.