How de­vel­op­ers make the beloved moist sky bul­lets.

PC GAMER (US) - - CONTENTS - By Xalavier Nel­son Jr.

The wa­ter cy­cle is one of the first sci­en­tific con­cepts you learn about. Wa­ter evap­o­rates from the sur­face of the Earth, ris­ing, ac­cu­mu­lat­ing, and con­dens­ing be­fore re­turn­ing to lakes and oceans in forms, such as rain, be­fore be­gin­ning the process all over again. I don’t have to ex­plain what rain is to you. You know rain. It’s a part of many of our daily lives, and among the most com­mon stylis­tic el­e­ments in fic­tion. Con­sid­er­ing its fa­mil­iar na­ture, it’s sur­pris­ing how lit­tle we know about how rain is cre­ated in videogames— and how widely these ap­proaches can vary. VFX artist Aaron Miller speaks to me about how Fire­blade Soft­ware cre­ated the fu­ri­ous rain­fall of naval rogue­like Aban­don Ship. “In Aban­don Ship we wanted the weather to have a game­play ef­fect, which for rain was to ex­tin­guish fires. It also had to fall ei­ther straight down, or be at an an­gle de­pend­ing on the strength of the wind.” The so­lu­tion the team de­cided upon was to cre­ate ‘bill­boards’, or images of sheets of rain, in the dis­tance of the player’s per­spec­tive, and re­in­force the idea that rain is lash­ing your ship by spawn­ing rain par­ti­cles in cylin­ders at­tached to the game’s cam­era. This so­lu­tion didn’t have the elu­sive mea­sure of ‘thick­ness’ nec­es­sary to be a con­vinc­ing ex­tin­guisher of in-game fires. So, Miller and com­pany im­pro­vised. “We spawned an in­sanely high amount of rain par­ti­cles, took screen­shots of it into Pho­to­shop, added this to the orig­i­nal tex­ture, and reim­ported it into the game. This re­sulted in it look­ing like thou­sands of rain par­ti­cles were be­ing spawned, when in fact it was only hun­dreds. This al­lowed us to achieve the de­sired re­sult with­out it im­pact­ing the fram­er­ate,” Miller says. “Creat­ing vis­ual ef­fects is of­ten about tak­ing a bunch of dis­parate sys­tems and mak­ing them work in quirky ways to achieve the de­sired re­sult.” For 2D games, one of the most sim­ple and com­mon im­ple­men­ta­tions of rain is to spawn par­ti­cles above the screen, and once they reach the bot­tom of the screen, move them back to the top again. “For Air­ships: Con­quer the Skies, I made a re­ally ba­sic 2D rain sys­tem,” says de­vel­oper David Stark. “Each rain­drop is a ran­domly placed ver­ti­cal gray line. When it van­ishes off the bot­tom of the screen, it gets moved back up to the top. There’s more in­tri­cate ef­fects for other things, but for rain, this works fine.” The key, as al­ways, is the end re­sult, and how it con­trib­utes to the over­all pre­sen­ta­tion of a game.

“When it van­ishes off the bot­tom of the screen, it gets moved back up to the top”

Cod­ing in the Rain

At­tach­ing rain to mu­si­cal cues or player ac­tions brings an un­ex­pected set of com­pli­ca­tions to even sim­ple weather im­ple­men­ta­tions, as James Earl Cox III found with his re­flec­tive 2D mu­sic art game Tem­po­ral­ity. “The game only has two in­puts: ‘D’ which moves the char­ac­ter for­ward through time, and ‘A’ which moves the char­ac­ter back­wards. With­out any in­put, time stands still … The rain sys­tem oc­curs dur­ing a child­hood mem­ory, and although a bit prim­i­tive, the rain needs to pause and play back­ward de­pend­ing on the player’s in­put. The droplets spawn above screen, with ran­dom ad­just­ments to their size, speed, and trans­parency, and fall be­low screen, where they’re deleted. When the player moves in re­verse, the spawner cre­ates them be­low the screen in­stead so they can fall up.”

Kas Ghobadi has made two sep­a­rate sys­tems for rain to date for their ex­per­i­men­tal mu­si­cal ad­ven­ture Stereo­phyta. The first used Unity’s de­fault par­ti­cle sys­tem to gen­er­ate rain­drops and elon­gate them as they fell. But only the sec­ond truly be­gan to reach Ghobadi’s goals of hav­ing a wholly mu­si­cal ex­pe­ri­ence. “I wanted this ver­sion to be rhyth­mic,” Ghobadi says. “So in this ver­sion, a cloud moves in one of four di­rec­tions when spawned and it re­ceives mes­sages from an au­dio clock. When it’s gen­er­ated, it ran­domly picks a tempo to spawn rain­drops at and does that its whole life­span. Based on the speed of the tempo, it spawns ei­ther more or less rain. When they hit the ground, other par­ti­cle sys­tems ap­pear to cre­ate a big splash ef­fect. When play­ers see the rain­drops strike trees or plants, they cause mu­sic to play from them.”

Even in sit­u­a­tions where rain is less im­pres­sive, a large amount of ef­fort can still go into its cre­ation. Daniel Fe­dor, lead de­vel­oper of hard­core sur­vival rogue­like NEO Scavenger, sourced ev­ery­thing from pre­cip­i­ta­tion, to cloud cover, to tem­per­a­ture rates over the win­ter and sum­mer, from weather data compiled by the NOAA. He’s an­other de­vel­oper in a long line, putting ob­ses­sive amounts of de­tail into some­thing we’ll al­most never rec­og­nize be­yond white lines streak­ing across a screen.

Newspapers in English

Newspapers from USA

© PressReader. All rights reserved.