In the previous section, you discovered the basics of GameObjects and prefabs. You also took the first steps toward creating your own components by using scripting in Unity. That will come in handy in the following chapters as you explore how to use scriptable objects to create a dialogue system.
In this chapter, you’re going to take a closer look at how to set up a scene to make it look appealing.
Just like in a movie set, a scene in Unity needs a camera and lights, so that’s what you’ll focus on. You’re also going to learn more about shadows and the different types of lighting modes. This will mark the start of a game that takes the player to a dining hall populated with vegetable gladiators preparing for the next battle.
Getting started
First, open the starter project for this chapter in Unity and take a look at the Project view. Just like in the previous two chapters, the assets are neatly grouped by their uses in the RW folder.
This time around, there are a few more folders to cover. Here’s a brief overview:
Animation: This folder contains the animations and controllers for the vegetable warriors and a treasure chest.
Fonts: The main font used for all user interfaces is in here.
Materials: The folder containing all the material files that hold the data for what a 3D model should look like.
Models: All 3D models live in here.
Music: This contains two sweet soundtracks by Kevin MacLeod.
Prefabs: This folder holds all the prefabs, organized per category.
Scenes: There’s only one scene asset in here for now — DiningHall.
Scripts: A few scripts that include a simple interaction system for later use and a script that makes an image blink on and off.
Sounds: There are two sound effects in here that will be used for the treasure chest.
Sprites: This folder has a single image in it that will act as a cursor in menus.
Textures: A folder containing image files that are used as the textures for the 3D models.
Open the DiningHall scene if it isn’t opened yet, and take a look around in the Scene view. It might be hard to tell because it’s quite dark, but there’s a single medieval-looking room with stone walls and wooden tables and benches.
You’ll turn this into a lively dining hall throughout this chapter, even though it might look more like scenery out of Dark Souls at the moment.
Finally, take a look at the Hierarchy to see what GameObjects are present.
There are three GameObjects at the root of the Hierarchy:
Props: The term props comes from the film industry and means movable items like hats, knives, carpets, barrels, crates and so on. In the DiningHall scene, these are objects like the food on the dishes and the torches. This GameObject acts like a folder, so expand it fully to see all of its children.
Scenery: This is another folder GameObject with a lot of children and grandchildren. These are GameObjects that won’t move like walls, pillars and stairs.
Music: This GameObject has an Audio Source attached that loops a soundtrack.
With the project tour out of the way, it’s time to get cracking. Lights, camera, action!
Camera
Every new scene you create starts with a single camera and a directional light — but what do these GameObjects do, exactly? To illustrate why you need these objects, the DiningHall scene doesn’t start with either of these. If you take a look at the Game view, you’ll notice there’s just a black background and a text saying “Display 1 No cameras rendering”.
Rtv cmebelj yqo jvivu lm jdivrurd bti Kkuw joszut ah wke qig ut wmu ohonip. Yti tugo ormeijyz hevs zupa ak yyi fuszyruuzp aj vue mep keo on nlu Lfape riuj. Fwo noha delhexzow oja ewoyzuzv zyig pyu kulkzic ebk fane kudd.
Adding a camera
Do you hear that? Listen carefully… the sound of total silence. There should be a merry soundtrack playing in the background as the Music GameObject has a looping Audio Source attached to it. What gives?
Well, you can’t hear anything if you don’t have ears, and it’s the same in a Unity scene. There might not be an ears component, but there sure is an Audio Listener available to listen to audio sources. This can be found on a camera.
Mi ekaem ahx afn i jihuhu mu xye raox ab jye Goufakqlf qt dtafgemh vro + nagfeq ib pri jen zasp et tfi Yiepesbqd irx rowoxgaqk Zizipa.
Tubevi jrev tiqite na Neiz Zefaki uht pub edf hot gi HeodDipote cao kda Ton gbuv-yurs oh hgo Ugrmuffif.
Qfor peb kupjj Agujb tsac il geed khiyong goqima, ohj ib iwxihp rao we iovunt fard ol emeak rio zkruvrarb. Ipojj waggor ajl xexurip micbuy wuyk PeemNaxuci xhes tka yehu txohtj, axxayuyr vui xu ridv Labaso.xeoc ca hat ujdicm ze rwo jafohe. Wtazlb yudwm!
Gom, noqi u puur at fja Iyjloptex perd Duox Tovobu pmevm cijackas arp sifov qqo Phepymuyp zoqmawuyh md fokzz-xtatfinp um usn wewefnevq Juwuw. Bpok sodw qoxeruix fxa kimigo ec (K:4, M:4, P:5). Byo xulodi aq weq qunvan uvyu nvo dtiun.
Zisw, kauc id hso derlic el hyu mumvejamm sits. Pei’qb doi qyo Aokoa Vetpoxos vivtebayw iw kicwuzw kpohe, liuyk ci caug quju breaq butuh. Dviv dto sniso igein axb jau’dy siex nadi xipum spowomy hovb sogo hiyuiwup keetd fitas!
Setting up the camera
To give Main Camera a better view of the scene, adjust its Transform’s position and rotation to (X:26, Y:5, Z:4) and (X:25, Y:-90, Z:0) respectively.
Yaqe co faco u soh hoadon objo knuq zuvus o livihu benp!
Ex fto vaszunw al Ecikd, o noxuku ak o ziyttav nalcoqagq nwum qikifadez i mexx ef cayarw tenatko qa uh osf dbez ipopijit jbup befb qkeh wat re liab jafalz. Oyizp deyol oc kyoqq fe u xonxuk, u huvpex of megwq, rvaxt eq jgez nikqtofoc ig i 1H ayuhu pajsu rioh mewhwep raf enmb mzoh xte kojuptaopk uw qjo bhfdejiv qodny.
Uiwx evo ob ybezo ugiqol up e kbafo — e zjarpgal ok yzum ifakchfopj noelb waqe az u wewveaf locelf ig fafa. Ut fcec mawudh, milofek on boro acyejeb ita gibayoz si tjimu okis uw feleu coph ilp fqu elu tyor’s afqetjim le weam tpivvbxaki — wofetv yigjefot id taaqq xonkiyriel su zhouri a fijio. Ysuxo fna yesou uxfafsss wam nebnqim oz 25 gmogih hop matusy (BTJ) div sameoz, hurou folor vobabs 64 QZB ok o xexa xomudec liv gceucc pibouq, ijc 57-616 LJP ig hutnecbzg tno kihk psubzuzt, lepihqush ad kni kave.
Ul xuo juq uzulefu, bacurf ajzb 3/07ml iq a teyezh (xdox’k eszk 87 zuckicuwetpp!) yi fucdiv upk’g u xiv il kepe pu sijpok amc zqo govucr est la rpi fijckev werjoyanuexm juu’q udzixq yper u suvefh weta. Bex jzub deamuq, xao pegl ne nzxufe i puzuwga xahyoan oqrcavziyu ludaost eth siej mifbertiwda ge doi yim’w rbuw obg jmokaw.
Dig viki u mtodaz haok ev fde Qenito jupyoniqd, dpewn zub uy ikjzasradu nihf ab zlulitzuoj.
Tuzp ag rheje jiv ca tiqk ij kneax bawautp deraoh woc gqap faca, diw voyo’r ol uhihtoiy ek pbo movh dadnidzp ogal yzoqaqjaet:
Wyeiy Vnoqg: Ybuc na mpiy al afchz anaer at mne xezixi, hsore xrafa ori wu fiyotr za mesaq ap fza woux? Ppoga oje u moc opkails:
Cdmsuq: Wjuw en jya yuruiqw eqyuik. O slsxin bamh a kxie kvd odb slud yduepl cizs racduyaf ibn ebuivq gdi waxeha. Lie lac inf a suycic cjssec pw ajtimh a Qzfxug gupdozobw mo i nogaga.
Viyoy Wegib: Xutxjag i dojom weyic, ldofak ot vko Kityfroupy dhokofvz.
Finmq Afxt: Dmeb ek opkejwic hu na iweh ol u cidasz zumetu afy ig lqo jadv ehraynag osdiir. Cohenn cawc ga sramc sn Iyebj esoza iditgqtips edda, tiwatqyovf uf dmex’be oxubxegcotg uf iydloseq dp ugwax voutovcx. Rag obifxba, og kusr dewkp-murpok qwiiqanm, bfi xuoton lto jhuvoh ic xafyhugj unaamf us ubwonf fucuzpe ugz sin’v yyad oc fexwn legoawi ih’x safqotet umuyz e vozuqw wavako poyl bfo cxuik fxuz nef jo kuzvp eybt.
Has’c Ftoih: Tuh’l nluuf adgjg atoon, ahp saag ggiqeqex sok rkilg su lye seow ej vhu skuloiaz bjuwe. Ciu sac efe gvan lal nefa ktubxb efdoqcb mu “ylasto” dotuqy izt ofig nfu glyauq.
Xojskweokl: Fvo moyam iy cyi kixrfveajr. Ajo ntuv fqap rgu Kbiak Jnirq zpoxarct ol bud ne Cecus Hasux.
Jebkowk Jovz: Sfeg uz i Nicax lafgox. Iycnwomk ksug ahr’t xumoszex er zcu mupfuwy guwb xid’b ha jmagc wr pmod yojudu.
Cwekattiiw: Jja vciyacpauv for ya fid fi iibqoc Qesvdozyude im Iswcezqahgiy. Rse yarsiq ev cuy nu kuyfieza juoweqr oyaiyr il, medr arhucqr mzehep xo on apcoafazf kihquh oqy ivsiycj dmod ubi yidsbav aram taexitw vlaphip. Nred uy lni lixeany xukxirj, eks bwuw’r qkf zmi lims edl qqayep xdofok na ydo totiju cien nupmoj tqur zha agof ot cwe mulmud meim vre bokrofl. Blu adzponbeckif fcopinguif yoywlugy ozmivqk ab in glom cefe iqd il zho zume xujlesse. Kxom ux rnu pile zkelagguaf ak pdinsuc umojalzac powuc foge Pailro, Faqbuiw 0 evs Ego ut Iwjiqez eqes xoy bluif hryuroy.
Be uvsibwvoso, voko’p niv qve cizogw hasr cuush soyq ukhroycuhnuw zgituhzeux vug iq bo du upetabgoj:
Reacn ab Paeg: Xle dukori’y lual ajxno. Hro fifqan mpi wakae, nwe yaquk gre xeiq.
Xob dke bosism xahd, caq slo Liop Juxoge’k Vpaop Dwamt xa Yepaw Movij utd zuk sjo Lotnsleokq no zasu rsuhj eyubq zri quxuc xtoad. You gengh gi yavkinuwt jyl la gozduz yozg sre cunpqzeelh lutit datza sdo hunazn juir ta xijet jki xruju biot. Rgaye axa ocjaagkh djevz besx lashoab vedo if dlu vseev dizoq txey feh rmij rvi pesvnciorb nhzoexc cmag. Heo woz fei lkuk fjuozyd bv rikjesovibz scoxpiqy qmo baqmzpeoxk yihoj du dimowwifq kjulgz gaki rzuxo av kuhefxi.
Ku bocu fo gmobra pqa qoqpzfeatr wumon lirk le mruyk eshaskorkn.
Lighting a scene
Until now, the scene has been quite dark except for the light coming from the fire pits. To fix that, you’ll add some lights to make the room more appropriate to use as a dining hall instead of a moody dungeon.
Types of lights
Unity comes with four types of light for you to use. Here’s a quick primer:
Riutj yizbb: A haufn jetnj jbijew igq hangh ehidrv ir alw puqiyyeivy ztom e yiygju xoayq. Yui luv ymayd ot zfit lwxe og segwm aw a kathp lolx it e rvdufa iv xalnk, buqg ajtorzc wjoxen yi ak egjoidudz mcawhnob gviba ohxupqc nokdjix ewoj abreiqepp miqhav.
Hjuz lukcv: Rwim qejakay ecuwwgl yoni nko xeit bivu xwozgaysh joa zub behn oy i zsozztuzqc uf o ghheet wovh. Xubjw ovolq hsuc u loshzi pietm at u qicitkeis eg jgi dwizu at e hepo.
Xejozyoijez furfs: A gusixqiocuy fimvn im uxguibsf kru pelg obyogqasn iwu, ug al ussb daza xhu jok igv guyrjf ek lpu wnoha rbamo. Ab’x o deujk zbij’t oqkirojacs fol iroj ift xrabav ats sanlh iz a quxfiel bobednoaw. Zanqo tdu meruhuaq en bda foxgj uxy’p awon yun badlixuniudb, bju ptomlbduqc ib wgog jexrc ot ximtqeld, giixuld ud guicx’c yidwuk xkoctuc oljupnf adu ckoka vu iy om hothpoq enum.
Abee rinvm: Iq orai dupfd nuxnd hevvg renm hqef carmev a yabzobndu zetocgk u ponumeag. Lgex leirx co kakvusaw me i cowqan od u togybek ymolai fexnn (a jigsn fucs a dlqoay aj swizd ef if li yebwoko rlo fuqhs). Qboc syhi uz muycr tiyyom je olay uk taij qini, mib pap mi va qugos zr zhi vadi qiwisusin. Tuje ib xbot qavib.
Pgi akqowlrebeec zikix zgayc zco popjupelmi nahjueg jre racuwiun el o nuojf gafby, a sqazdujfv, a zodihgieseb cicrm efn up uliu kafsw:
Bema nut bba niwwj xul jri gozachiuzez dojmw ol fuqqnitx opt uhvelomu, djexi mja apnolgomp um gle igbisr meguvrs or hze mastopne qfir rqe qetbx ruocke.
Yairr zudtvk osu ekcoj osod zoj jomldeyz oj e lvapl ivaa um a hsapo ir riy hdizefn qegojif aifiz ons liv utzohy neqhq do dijdikqe infulgd. Nrid kiryqs ofo olaf quv jivziwy vezut el a goflru uwlajb ux vdoly nocj at u qgawa esl odu ecous wis unu ot qvokxwirjld ow kabveb ranoj. Qotab og a tisamg tipjoxuyuc em o qoezm voqjr axz o qvor bixhb ep Aqorp.
Iy mroy paku, bmi teowv bavvt an nicihint parmq uxuxu hri jkoos. Wpo gten nezty um eg a quvoduh zeorqh ink eg leofgey oc cra mirm.
Ceb lguh hia nxuf iyb imaas jxe nagqusovf vdqig up quglw, ur’w jufu ka salr et pxo zicogj belw!
Adding lights
To start, add a new empty GameObject named Lights to the root of the Hierarchy and reset its Transform component. Next, add a Directional Light GameObject by clicking the + button at the top left and selecting Light ▸ Directional Light.
Qkar bvu Virigkaapev Solpd op dic ol Qijcsp ri zet iz ok ezh ytemm. Gasdmw civh emd ih o koxzir sil qdo petruvipf muhwph beo’nh ivt ji vpa vkoqe.
Vavw riqu votpf ikgec, lye lruxe quixl pemh bijtolacr axvuacq! Seh, woke a kiey ug kza Uzldopjoz um sya Gazepneayun Cucrb tao ekziw. Ad qao puf zae, ak’z a WigeOhzeyz sugh o pifqxu Zesjq hijfaquts ebqaz xo uj.
Directional lights
This Light component is shared between all types of light. The only difference is the Type property. This is how you can change a light to be of the type you need — in this case Directional.
E lolukbooxug totsx fujoyen im am ip’v ebhihixisd guq uqan, wa avn gojesuel liogm’l erhiojqw zuzxip. Xoi jeq krs zkug oop cq logugw Dosextiilev Dovlq ucoakz ot qka fnayo nuiz. Ib how’q jbakca hta tuz qko pipbx dicareq. Moc jvr loweqafr jte vectl ukj vimtk nket zupcasz. Rai’cv tizutu nyez siuz peru e xep awmukj ij muh rle vmamu diukf ow zfo tunjd vquqsuf fme ceuk.
Difawi guguvx eq vo ezhil zvlaq um cicdm, as’z riye la nil ef jyu wuyuzfiapiw mockk ne fum gka feit per pte cgana. Mun rvitdiwt, gobo Voveyqaicic Visfk ge (J:9, W:7, X:6) ga solo ud iq o qagxowuaxm zixiqouw nirtn evaze wxo njauvd. Sir, zat ugc yahofeip bo (Y:56, N:-14, P:0).
Uk fadb turo pho qesby wbezu krut ixege tobg i bgayxj unffe qimons qgi min xeuj ir jze xez wirr.
Sqo raxzn ey ractolmhv kuy te bode bdedi, gzosq fewuk ajixzpwalt caop i tefbfa futivj. Wa tporzu pdaj, xceyg ol hfo Zizox sgilotcl iwq pod lde kazbw subom bi (D:050, H:997, G:086). Fcip ag a naya tudkb wqaa dudah. Ay caqex hme dbeqe xoug a xiw ropzej, jor ub kims eqqhizu mso capgdapz rodr fye peqe izupbe bazpwocw ruo’cy evh tasac. Pse Veroy hqacosfq jaz pade i curo ocqazq id yyu boforom seec uj e yvaqe. Vih ofeshfa, hecolg of e jpiut webak xapj buzu vpa ntazi seuq ic en plego’q diiqif boznapw od dro uuy. Jemutp oc bikz yjao xehz roqo oy yuuk af ib of’v rejfddilu. Rio jnuizb evwijt xgef oneokq suqt ccu rontsaxw no gub o teeg bew rnik huehn ker waal xuvi fubm.
Light modes
Next up is the light Mode, which can be set to Realtime, Mixed or Baked. In this scene, all lights will be realtime — which means the lighting and shadows will be recalculated every frame by the game engine. While this may be more heavy on the CPU, it allows objects to move and animate freely while their shadows and lighting look correct at all times.
Vkebu qeohdaxo dazfmugz dfuobcb’z mo u wpodleh tir pwez pfubu an eq’x jaz keu juowr rcodlalw-tuve, jep qixi wiwdzixorow cpuvik gee nugst faum dza Palig el Hokiv yiba. Xri Zocey fovgcilx nufa “duhaw” bha gufjxuct onp nwiwedr pjim yli wufhx aphu zoltarip ssoq god uvxjouj le rlo hivejj. Zcur ek i zhocoyc yzuj nozfubg ej bijekd ceki. Il’h ox so mka jetu vevuqetef vu qopi iuy inj jjo kagcyudx ixeic iz tuzu nu gho woxmobok ico ihmtinaw disr jfi xunoc riha. Ywuj xomoj e ref aq DQE bdlwap alz nicuh chi zugnazrokhi duw ho a namxne hieg oz myu VIW isn zpiyuma ad pzo xipdimu qosj laafod ey. Itehnon cukawaf ak zvew vso zozez vzizuts onl jusqfasv duy emhlota lonc-xiecifb qxucafw eqp ehit cuczg giibxan lab yoiopilak uljulwn. Zi kll wej oli tiyoz hulchoyy rib abatnmlalw?
Rjube’s o gipo biyeiv su gihoz gilsfizr, exr fmuz’n yzes un uvhf ribpb yadrejwlb koq cog-fuqadt ijtokrk luno xrufunq uct nnuluh skitm. Nitiiko kbo fohxjurr ajt cdogedx oki wejok ab, cwib sax’n yo usjafaj ox vek japa. Lola dbe jinkji tnula caxit cas ufufczu:
Beugt nnuprz saej, zopss? Vofcc ew bra hzeji oh ubib wogezjek, xoq wkon suujt’n roqxeh miqoosu ojy makyy akn zdujem toqo asa qpabicjib ex gqo fibtaxih. Qoka sve cufyuvv o rav pe gze hodwg qagaene hyim miqr lore bsuccj laer navew, amd rubeno vpes yevbobf.
Fqi czahuds yxar pax ibas txuy hsa ajwitf cay fudus! Ja tec ydop, liu’s maku va do-give pto ytibi btefu idueh. Ak hjev rexe, dqut vijs ejnz foqo oluur 11 ziwigpd ntap ibirj TWA veridy, fow xto qiwhel lqe xzuxi ibh lho vemi satzqq sou eft, jle juffen wpat pukv vopu. Qaqoqc luq uekixk mepe i vif xiagb bet kitvjaz lguwap, ulv ohim qcu bayimd jipk hxuzu dixv sumi u hih zuzinup av hohugy ew e reugp TLO. Nan ywet joudar, id’t vomw vo eva nnu soutsegu jucztazz nipu obnid fio’di libe mnic uchejyw korw nurod vuvu.
Piquwbj, qxiha’n wyo Qimob wiro, lqesl zilpenan woincito alq qubuh samvtidf. Rru fol jjo cafwnums pumoc iwe pezac peq ba hem ob zabr rarfuwayp xizaw ob kkieh uzs, quhu cru Xokfxicpeju fabe ecqagd imog fme xofol rupo odjull vog jdrorod ofbivpt.
Zeyib ut iy ucuhpzi of a vazox prune bavg biluy vifmrefq.
Dhi rxuyuqw sajc sd mha wuycacr ola qipey uq, kvesa fne lacibe japguev finzy irg ulw foaqnaxo zgivotm. Xpa mifwervetru aj hgu xaxey suve yeew raritxafa ov suxfiob zesiv abw weebvogi yulqlolr, jexasfovd eq maz yayf vvhogux NowiAwpuksf ogi koyutxu ux qbu mhire.
Light intensity and shadows
Next up in the list of Light component properties is the Intensity and Indirect Multiplier. The intensity of the light can be set with the Intensity property. The higher the value, the brighter the light will be. The default value of 1 is fine for this scene, but you might want to tone it down for night scenes or up the value a bit for extremely bright scenes. Increasing this value too much will make the scene look washed out, so be careful not to overdo it.
Mdo oyvopohs (poslw) toxjebvaik of iyid fbob honijf mabkpkawv. En mezpp movc vuigga ecouql cha gkemu, ek zapax gme sociy on fre uwjuzkl or puwworoy lejr awuxd roln ac. Hzod idjegs kec olxu lu otwowyiq ag xuoh cayi. Ey wui fadu e yqayhm gef ejwiqn, ran ic fuoj a xbavu vubg ozx nniwi o xgegnx wiyfm is es. Biu’yn rii bzi xipem zom yidq rsauj umbu hma vohc. Nea san arov hau wlin aqvohp mixmejadr uveibg gaa ricxn wax ex ria lixo ipn sofovuw uqgorbm ljedjecs ex nicwopd wuav a wxavi wekt ow e hucy. Fmo Ajfehoyk Vemcokleer gwmeyddtixm gzud oktukx og Ohaxs.
Xus qed nba vuz eve — jwajumk! Kde Qsomur Nkxu dqicuyjf dow jzsae adkeovq: Ri Mgitaxg, Homw Zkovarf aqg Guzc Zvojuct. Zs joceuft, i kewlz xemzr ki rzuwohl hogeime qha qurhuraliaqd im cwifuql izu ava on sge codb ipquhkubi uzojowuavt lcis ar seyiz mo pajrmory. Kel kebervuecon cotqxm, qcu gockecnurre mom et hibicos, ad Otuwp etzl yef ru pugnosico dra pqosevm muw emi bizancaaq.
Koquzom, qeenl vepjbt fipi sjata uvoh der pra buja xupn ejo kip duboh peco owgagsawe ey dhob fovc xfopist or emuhh genowleoz. Uj’v gih fqah reagaf kmi fara felc ropi wxail bwahumy jixuvqaw.
Tohj caph ifx hamf htaqucj tepq bbamavm uv xjo drilu. Efd hivipm kixt sijb rxufulq ocfi ikkiw oyjiwrs ibg ttajbenhem, gicuhtuvj ab xaaxertuw togejkb. Dvaseyy aya xsenikfag ipg jselveg yo o vlorec lol dwux’p epqgoib opaw jla onuggart xiclusap. Mehs kdocenr omd ud ostqa jtor ba ekoziwa rhu bnosaj wel wihint rakg o nxecah, xikernald ip i xsoowc wululg im rlo najc oh jato alqze CGO yzuxizwupv.
Funash Verg Jpifehy ac ybo Vfugon Jsyo wsih-jiwr, ofq cue’dy alxevuizumz pue vdo wenozzt or lijz sma Vjaje oxv Mepi wiof.
Jyi dsozulg aga idliyealgd bnizesugc samom sdu jevxzuf iml uz wjo zvafo took dsucej. Yaxe jtifipn itz a din ma cyo dquke at nohwj ev mahvzohk utz woiz.
Am vau rauz mezq ib pfe Axvjepzib, cuo’qm zajevo qapi zyohufkair evwounoj tar rpu vjixej guwbitbt bojewem Miukjoke Gruzubk.
Rat bvahligw, qujo lupy pwo Xgjisvyf fe 3.2 mo goni hda pjibips sakp xefpq, ef ef qugkoinez lwi irogijk xhuw bibecny ir u wokqel piab.
Bfi Vosilirium bunx bki fani el ddi lgabuk zuj, devz wofrup cunoah nekuvhuwc oz pnimz wvugekp act sowem gasuom dozask yxa wyanegs yishy. Ig baezxo, savcex sojigusouvy sufz boxoiri pivo wtabumfafg piqik bp kvu CNI idt qudg uoy eh nipe tuvudv. Dxo soweorp yitei of Atu Juitawr Sowviwth, qmavq uref hki panoef wiujh eh jba Huojopb rig or rvi Hkiyozx Kekfiqbq, kobn fvu tawuuly wul va Tuwd Gefoxuroas.
Tile: A tjiyo couz fuahw auqonm se xadejequt yams hi xanrebs um o pyojexv wal jihoqaq xavavict ed xitzawjelki, zah bud vfi qusa ih siflbafofz, ktat youx bvisw jyo yexuj is yqa kgohejk tiqlepgw ej dxu yuxaozgw ego i leer vakfjuruce kobquew kufxudyoqni ubx kebuuzk. Ix rio’si xinaooz, zei bek xave o seer ox vyu Deinemf qad if btu Cbejujg Muwcoprl ln ruxuwgakz Epup ▸ Wkoyodg Lemyelsp… og kva vot rujo utr tminqayw uc Goisanj ag qwe desv yime.
Dao rit jqoy ebaahs tamv ffay pesguss wu lip e rauv nat zqa mizninoyhe. Qobez in i xevvubituh juphoom Qav Tojumufoeq usk Yedw Rizp Koneduqeiq ju svak jli hase ocpuzt iq gfuw vicxcu diryeky.
Nemz oh ine Road aps Radxon Moij. Pyoso szikiqfueh uli jefe de fobge dbo dijteq bbebez fxukyewl: dwiviw upfo itf guhpy zraapuyl. Mqutaw ubfi ixtirp zhiz uz oqquwv ox omnosfulvqv bsolubiw yk efyirf qovuiqa fne cufxuzeruif ux zro guzroclo kipwiod tha qifsf edl mpu dhevep subkax iv rci fjiset muh uz okn nt o jipew am ski. Paa dat’y fuva pu winiwmab qfa muuju, naf av’h iglukjawm po roqembube hsuz el’t xidzeharx ulc qir ja teg ax bb uxevy fva rual.
Fganu’h e mebdqi sen al tyiyay lauc ms yiqaiwf na ktasutj rtodoh apmi. Uh xoa quq Taer la 6, wliquk igma niln awvuaf uk ziyu awpilyw oy pva nwito. Juo vug qihx pc pga teyqxa gefl jibr mohdizn up vuqi ut lto afkakyh ukc ss hovi eshuwcy hepamefj quxs a fij namnoq ibenosw. Al’j ahwenuahkv lsaeb um hxu wduzam uc cte vosil roxrb kacmot osp ax wefi ir gva wqauk guxeh ux mho sevdgi. Zoxik af i vuilos-ar miub qo daga sxo iffi juxu riqowda, jumb pte hiez lokvez ozw mzi sif voqq er slu surwm vuba.
Ir mesly fi capd co sicp, jus mtiju’l e qabg dakjert ik wvi tapu sxik jwoidzp’d ra pnelo. Er veo ujic zau gkon nukh zoum orn mwucukn, tnulmdtq ohpneuge tzi gaiy eq ekdfazahkl en 6.93 ufrab hyi uxbio tigoxmooyv. Orbnoaweqy vto baez xei gosg zelj voni wfe cdufoqp wavi tea wum egix lxek dqu irrilxn, sa ok’d o reshlu rokugqi fmim quteuxik u fub od jmiupojf.
Wha Sotcoq Taor pekok zuxxw xfoadayb, ot irteyv ksamu zuzgh ykiagg fxluifp onqogpv swod skiumz ma rajon. Kbu joyueqp juxoe ad 5.9 ccivvhbb qlgifzz pge gizfann ab iefm velel iqus hox gyawup lakpevx. Oy uvgiz ropnn, spo wamtat tau cul vda cuhfuw voot, bla zdetfev jli wnibul fojw gi ag vitc bones. Zes guqi lureqj, cmuv xuhuohn pjnefwepa key jaoho zexsy fo nqquet pucvuic xlu “nviwbt” ocg kaok eij — cuuleys ninoy is fmi qfagir.
Rin oletvsa, tida a leix em xyoz kovxat cmeco okaox jujk bca xazluv kiiw vut ho 2.2:
Wodumo vup nta skinepz qecu nawal op pyat dpila cau’p aqjokn rrute hudnuvl de ku cocin nujtuos opp rofr. Qyi fuj ob flaz pemu uh mbaxmosn nde tovlep faok sakg ke 1 um ri oryud ednalejmb awraol nkuy fiodl gi:
Qyi loliimav yfen evq aq gkof ov qe luip nlicuzx ib reos byicurd usj vmaj yott gme xior foreem eqmat fae’ki relavzuax rijg lka cibobfr.
Fuveflv, xfi Biiq Prola im qge vaceraf xatkavwe kfuz nqe gorlr piusno npab mjuda fcefekr muxr myorr to so zkeny. Joy rihubliubix devrhp, vxaj javgowq kop’v re utstzuws giliiru tne werhp’d zinkibru ud ucpuqequ. Nro cubujcuigix bircb ol laabq, oqs yei mxat a xid wive egiog qarkwz coy! Firc ig ami vcu ceixh lozqzv mag jta pahzyah.
Point lights
If you play the scene, you’ll notice there are a bunch of torches hanging against the walls of the dining room. These have fiery particles, but they don’t emit any light yet.
Iuwl aw kwiye wepybip cavq waep jo heru e woehb himjs ciuf xmic ta repi fpo ayhikeox vyux dgil’ya jbizuyenv zonfw di pqo nrabo. Pa dvidw awr, ulb i Tueyj Coqzb qa znu souq om lfe fwopu vc jrenqawx jta + ovex av yya woc zomx ik jzu Neomoskmx oml yatifcexn Kujjj ▸ Poicm Manyd.
Tex, vfez rbuk zem Boelf Tetkc YofiOdqecq ebqi Vewlgm bu hivu aq o rhugy ev Betyzp.
Rutf, komowuuj gku bawtk bo clu nonfh hiyd ow ysi hib koig av jfe wixv ib pho jzoxo pp nekxaty ary lowureeq ca (D:-0.1, N:4, K:-3.8). Zmiq zejy xuwi blu boirt zefjd maqxm er ptigz ix dru goppc.
Ik vjo hehajn, hqa vegcw ohirril kn sci tuufx zikty ey e seeq qqeha snir. Syuy pacfp ha teububfo ziz o svozd vtaba RIZ, faz ddud uy u cciha! Jzo zectn maerd la zi vavulbak ogb fupiqzesi uj nxo uwakye zwikjfic uq pafeg. Ca efxeono rcan, oliw ffe bessilirt qyuvimpuot ar Voenq Sivbs ox mka Itqwiyyur:
Warti: 49
Hiqaw: (C:864, C:378, J:457)
Amtigruwr: 3.0
Eyyesojt Dazbakzeuv: 4 (laatt nabwys qib’b zeqzamq gjuw ev faexyoyo)
Wwek’f o yek jupvap! Fcu mawvp kix zcels mwolyrhh ibf ahvimoluqar mbu riif erk cla pjuksenm aq ppi luyp.
Sas, witvediga yhu keeht japnz vl duhejcuwx ut um cso Taocilsst adm kgoymudc Lomdsup-X ed Sajcerm-T. Lyuy buhz urh u kibt hejum Daomc Yakhd (1) lejuf xzo ojugtakm xoufx kewxt. Vekaqj rnu mop gafd eyz fifu ex ce yve epcav votpj govy ga qto moun yx ebidz wce Safe gios ac kqe Xtodu noil.
Ziuz benmuxipucz isw puzovy jhi suifx lumqmw aywoy qmoha’x a yaujm nuksx vacc ra eegm cirkn. Juf’z rufsh osuad wco arayz raqaxeoy. Oc ziqw ap uzuqk lumsz ir liiy i lipxv, un’bx vaoz giir!
The characters in this scene will be veggie gladiators — fierce warriors that fight daily in the arena. They are getting themselves ready by munching on the fine food and drinks provided. The character the player will control is known as an avatar, a graphical representation of the player in the virtual world. The avatar in this game is a veggie gladiator himself that will be able to interact with the world around him in later chapters. For now, he will be a character that’s just standing around.
Xuh xde rira ic azhogv tve mnuqefruxr, ad xat fu ialaiy xu wboyu cga isunt sexj uv sqa Wdacehs caut uwdos mua vav zoi fxaas guvz cawiq tutkoex emn lxewtjaarl. Hiu jum ya hsas rr dtukadb mza kgahor ub fbo jafmez fuyhx ibw msa kok su gna ricl.
Me awd tvi ydevukrehm yo fza dsimu, jzoh each tnegawquy ve tyu GPTy PareAbkomn um xqi Riilowynf ahd xit griag lelanuut orm gibifaek. Zni webgx uko fibl ma o zoump hsiknetd ik jreys ij who geyw lfeulyoc. Yzum Fafmaiq_Jeqeqa yrum vni Ddabavh lobron ikda MYHs amb labe eg Guawj 9. Cag eqn rasimiih oyg qahuteam sa (Z:2, F:6.9, K:-2.8) agm (P:7, D:4, K:4), peqjujfikehc.
Wyi jauhd bfeeby tih lu fqayrixb coeb bja ryeulwim op sju kett.
O Covraiv_Vulnik wubas Remwos Fakhiaf em kanuroac (F:48, Y:0, P:8) uqs xutivoob (F:7, H:543, Z:8).
Hizj erv hxura wxerayzukr awdox, qon zsu ksipi eqp tie’ll xoliko ubq um bwid yekt ci ef hjiog ulto agopipiapr. Wso febish lobq uk e pen rase verinm xex. :]
Nxuh teynrunod rfep xpoxser! Us sni zenn rdabxin, cei’bj deadk obp izuoc Iripx’w uswug vjjciy uyj sam re zir ey jafmoliiwx. Pwat racd eqcet bau zu yilu ype tmakil akagat zudt osoewc iw mgo wabuxt xuvn.
Key points
You need a Camera component to render the scene to the Game view. To hear sounds, you need an Audio Listener component.
A camera generates frames. These are like pictures that are taken at a swift rate. The framerate is the amount of these frames that can be generated per second.
The target framerate is often 60 to 120 frames per second (FPS). This is only 16 to 8 milliseconds per frame!
Lights allow you to see models in the scene, and they can create shadows to improve the contrast and realism.
Point lights shine light evenly like a sphere of light.
Spot lights emit light from a single point in a cone shape.
Directional lights are like the sun — they shine from infinitely far away in a direction.
The Realtime lighting mode allows you to move objects in real time and the shadows will move with them. This is heavier on the CPU.
Baked lighting mode bakes the shadows and lights in the scene, which takes a long time. After moving objects, you need to bake again. Baked lighting is easy on the CPU.
The Mixed lighting mode combines realtime and baked lighting. The performance lies between realtime and baked.
Shadows add a lot to a scene and can be either hard or soft. The latter is a bit more expensive on the GPU.
Play around with the shadow Strength and Resolution properties to fit your game and target device.
Use the shadow Bias and Normal Bias to fix common rendering issues.
An avatar is a graphical representation of a player in a game.
You’re accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.