PC GAMER (US)

INSIDE DEVELOPMEN­T

How developers make the beloved moist sky bullets.

- By Xalavier Nelson Jr.

The water cycle is one of the first scientific concepts you learn about. Water evaporates from the surface of the Earth, rising, accumulati­ng, and condensing before returning to lakes and oceans in forms, such as rain, before beginning the process all over again. I don’t have to explain what rain is to you. You know rain. It’s a part of many of our daily lives, and among the most common stylistic elements in fiction. Considerin­g its familiar nature, it’s surprising how little we know about how rain is created in videogames— and how widely these approaches can vary. VFX artist Aaron Miller speaks to me about how Fireblade Software created the furious rainfall of naval roguelike Abandon Ship. “In Abandon Ship we wanted the weather to have a gameplay effect, which for rain was to extinguish fires. It also had to fall either straight down, or be at an angle depending on the strength of the wind.” The solution the team decided upon was to create ‘billboards’, or images of sheets of rain, in the distance of the player’s perspectiv­e, and reinforce the idea that rain is lashing your ship by spawning rain particles in cylinders attached to the game’s camera. This solution didn’t have the elusive measure of ‘thickness’ necessary to be a convincing extinguish­er of in-game fires. So, Miller and company improvised. “We spawned an insanely high amount of rain particles, took screenshot­s of it into Photoshop, added this to the original texture, and reimported it into the game. This resulted in it looking like thousands of rain particles were being spawned, when in fact it was only hundreds. This allowed us to achieve the desired result without it impacting the framerate,” Miller says. “Creating visual effects is often about taking a bunch of disparate systems and making them work in quirky ways to achieve the desired result.” For 2D games, one of the most simple and common implementa­tions of rain is to spawn particles above the screen, and once they reach the bottom of the screen, move them back to the top again. “For Airships: Conquer the Skies, I made a really basic 2D rain system,” says developer David Stark. “Each raindrop is a randomly placed vertical gray line. When it vanishes off the bottom of the screen, it gets moved back up to the top. There’s more intricate effects for other things, but for rain, this works fine.” The key, as always, is the end result, and how it contribute­s to the overall presentati­on of a game.

“When it vanishes off the bottom of the screen, it gets moved back up to the top”

Coding in the Rain

Attaching rain to musical cues or player actions brings an unexpected set of complicati­ons to even simple weather implementa­tions, as James Earl Cox III found with his reflective 2D music art game Temporalit­y. “The game only has two inputs: ‘D’ which moves the character forward through time, and ‘A’ which moves the character backwards. Without any input, time stands still … The rain system occurs during a childhood memory, and although a bit primitive, the rain needs to pause and play backward depending on the player’s input. The droplets spawn above screen, with random adjustment­s to their size, speed, and transparen­cy, and fall below screen, where they’re deleted. When the player moves in reverse, the spawner creates them below the screen instead so they can fall up.”

Kas Ghobadi has made two separate systems for rain to date for their experiment­al musical adventure Stereophyt­a. The first used Unity’s default particle system to generate raindrops and elongate them as they fell. But only the second truly began to reach Ghobadi’s goals of having a wholly musical experience. “I wanted this version to be rhythmic,” Ghobadi says. “So in this version, a cloud moves in one of four directions when spawned and it receives messages from an audio clock. When it’s generated, it randomly picks a tempo to spawn raindrops at and does that its whole lifespan. Based on the speed of the tempo, it spawns either more or less rain. When they hit the ground, other particle systems appear to create a big splash effect. When players see the raindrops strike trees or plants, they cause music to play from them.”

Even in situations where rain is less impressive, a large amount of effort can still go into its creation. Daniel Fedor, lead developer of hardcore survival roguelike NEO Scavenger, sourced everything from precipitat­ion, to cloud cover, to temperatur­e rates over the winter and summer, from weather data compiled by the NOAA. He’s another developer in a long line, putting obsessive amounts of detail into something we’ll almost never recognize beyond white lines streaking across a screen.

Newspapers in English

Newspapers from United States