<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Marlena Martin  on Medium]]></title>
        <description><![CDATA[Stories by Marlena Martin  on Medium]]></description>
        <link>https://medium.com/@marlenacmartin?source=rss-14f55c9f047a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1lZ-PYxp43na4J9O</url>
            <title>Stories by Marlena Martin  on Medium</title>
            <link>https://medium.com/@marlenacmartin?source=rss-14f55c9f047a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:54:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@marlenacmartin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building for WebGL]]></title>
            <link>https://medium.com/@marlenacmartin/building-for-webgl-639844fa05fc?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/639844fa05fc</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Thu, 21 Mar 2024 03:48:43 GMT</pubDate>
            <atom:updated>2024-03-26T03:42:34.859Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ll show you how to build for WebGL. Begin by going File, Build Settings, WebGl.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*FrByvKh7hb8KHHO-aIZ49Q.gif" /></figure><p>Select Switch Platform, Unity will compile for the WebGLenvironment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*LfRa9gf4BzmbEy60w6E9vQ.gif" /></figure><p>Go to Player, Other Settings and change from Linear to Gamma. It’ll compile your configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CzhfsRmLwJDWMf20UyNC8g.gif" /></figure><p>Now click Build, create a folder and name WebGL Demo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*n_zs5dWobryIeiHbZduyvA.gif" /></figure><p>When it finished compiling, you’ll see the files listed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*NpkgXc3WcN9AY8pBPEYzTA.png" /></figure><p>Because I dont have a server or webpage, I wasn’t able to preview the game, but I did use a workaround.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*On05Bec1GJOpyMZSrQVDJw.png" /></figure><p>To test the game out, I used the Build and Run option and create a folder in my desktop to test it out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*FwfVTrDuHfOgv8KoyTjNmg.png" /></figure><p>Now to test on the Web, download Xampp <a href="https://www.wikihow.com/Install-XAMPP-for-Windows">https://www.wikihow.com/Install-XAMPP-for-Windows</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*gafPqBVaKUf3tKVNungzhA.png" /></figure><p>Next, locate the folder that Xampp create called “htdocs”, in there you will put / place your WebGL build folder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*PBal4rSEzGOsFOg32SLb5w.png" /></figure><p>Open Xampp and turn on the Apache Server, status will change to running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*DK-J46_jL6dVopCz20-siw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*TjyCHvXXIsixaYcN6oT5rA.png" /></figure><p>Next, in a browser type in local host and the WebGL folder name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_pw8b9pf0tHRC81PyLwhA.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=639844fa05fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PC/Mac/Linux Build]]></title>
            <link>https://medium.com/@marlenacmartin/pc-mac-linux-build-14d53f56cbc7?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/14d53f56cbc7</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Wed, 20 Mar 2024 04:22:45 GMT</pubDate>
            <atom:updated>2024-03-20T04:43:08.086Z</atom:updated>
            <content:encoded><![CDATA[<p>To begin, we’ll go File, Build Settings, and default PC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*xed0rm5HnGEN0ldqpEPXPg.gif" /></figure><p>On the right, you’ll see Windows and the Architecture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*d0MslumnzSlksRSw4Djg7A.png" /></figure><p>Click Player Settings and choose a company name, product name, version, etc. along with build settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*RiJTtp_uTzMTSMhEndUubg.gif" /></figure><p>Next, we’ll set the Fullscreen Mode to Windowed, next set the default width and height.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cdbv4f6L7004e3mE8m1kVg.gif" /></figure><p>Select Build and create the Windows Playable Build (Note this is a lil slow)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IeF8I_NBT7V2FvffRa1S9g.gif" /></figure><p>I saved this to my desktop and removed it from the game folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rofF8bQ2YlSuZZrpL_FDQ.png" /></figure><p>Next click on the SpaceShooterPro and the game should launch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yrruoeaZozoNwmnvRAN8ww.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14d53f56cbc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Powerup Sound adding the Sound Effect]]></title>
            <link>https://medium.com/@marlenacmartin/powerup-sound-adding-the-sound-effect-852e4cc27c95?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/852e4cc27c95</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Sun, 03 Mar 2024 07:36:44 GMT</pubDate>
            <atom:updated>2024-03-03T07:36:44.325Z</atom:updated>
            <content:encoded><![CDATA[<p>Go to Powerups.CS and delete the reference to the audio source. Make a reference instead of the click that’s going to be played.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*vIX1hytv5BYYU24HCVCrGA.gif" /></figure><p>Save and head into Unity and select Shields_Powerup, Speed Powerup and Triple_Shot_Powerup from the Project tab.</p><p>In C#, type private Audio clip _clip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*jnvSiZXJv13n0ma3kL-MIw.png" /></figure><p>Delete the audio source = GetComponent&lt;AudioSource&gt;()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*L_-P7HqLYnSLuFJlADmPjA.png" /></figure><p>Also delete the if statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*e-8_V95Z1QOzdqWs_toE6w.png" /></figure><p>Remove the Audio Source component from the Shields, Speed and Triple powerups and shot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*n_zs5dWobryIeiHbZduyvA.gif" /></figure><p>Delete _audiosource.Play from script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*xZPXX3zNnvtMPs8ij5T1JA.png" /></figure><p>Remove the AudioSource from the Shields, Speed and Trip Shot powerups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*bMMg2Iqnjc6wiLlPSSeVhA.gif" /></figure><p>Head back to Powerup script and access the audio source component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*iH_-QjmP3A8bwLnXuQd3tg.gif" /></figure><p>Now run the game to check the results. The Sound when hitting objects will play.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*2GtBdESovjR5hiSdkSzi2Q.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=852e4cc27c95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Background Music]]></title>
            <link>https://medium.com/@marlenacmartin/background-music-5f19ff6a4eea?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f19ff6a4eea</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 04:35:37 GMT</pubDate>
            <atom:updated>2024-02-26T04:35:37.168Z</atom:updated>
            <content:encoded><![CDATA[<p>Making background music for our game</p><p>To begin create and empty game object and name Audio_Manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*IYqisBA-0kEpWcBcX8C0Uw.gif" /></figure><p>In the Audio_Manager create an empty object named Background.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*BofTIcI9iw0kAhROrEu11w.gif" /></figure><p>On the Audio_Manager add Component, Audio Source.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*cl_0UcC1EQ1s4-LMxV55sQ.gif" /></figure><p>Go to the Audio folder in Project view and select music_background and place in the AudioClip area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*VqMNYH8b8pyCt1hHWeCE3Q.gif" /></figure><p>Make sure Play on Awake and Loop is checked</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*4tG4kafWQgKAtuFGgG4oaA.png" /></figure><p>Save scene and run the game. (Note — Gif doesn’t play audio but there’s audio in the scene).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*OO-4VdxtsqPDIMmWKCOwqg.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f19ff6a4eea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Applying Post Processing Effects]]></title>
            <link>https://medium.com/@marlenacmartin/applying-post-processing-effects-d2fba92ab57e?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2fba92ab57e</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 03:59:47 GMT</pubDate>
            <atom:updated>2024-02-26T03:59:47.826Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ll begin by creating a post processing profile and manipulating settings for optimal color options.</p><p>Start by creating an empty object in Unity and naming it Post Process Volume. It’ll control all of our effects in Unity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*3TigA-te4ke29b1aEutzTA.png" /></figure><p>Next add a component called Post Process Volume.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*2LqvZ-hN-XrxlOnjX0LqCg.png" /></figure><p>Check the box for Is Global so everything in the world is affected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*l1hPkfKFQ6IEQx-Hku4hew.png" /></figure><p>Click the New button on Profile to create a profile and attach it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*STonzZaPt_WIrwycN8DCNA.png" /></figure><p>In Scenes you’ll see the profile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/243/1*6YDqCufX5It8zwRRxRCF9A.png" /></figure><p>Click on Post Process Volume and add effects, we’ll choose Bloom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*gYjZYZPpt2mEgR7p5TPmZw.gif" /></figure><p>Now go to Main Camera, add Component, choose Process Layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*mt2wCZ5AWdP5RSSLGtKCng.gif" /></figure><p>Now select Post Process Volume, go to Layer in the Inspector, click Add Layer and name it Post Processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*VGNsCbDB9Bba2eBh7mPuDA.gif" /></figure><p>Now select Main Camera and in Post Process Layer in the Inspector, choose Post Processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*VWIpsrCTyFSg07OODv5Kug.gif" /></figure><p>Lastly, click Post Process Volume and in Layer, choose Post Processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*bxRG97qAehbXotK-g6dgIA.gif" /></figure><p>Next we’ll add Color Grading in the Add effect tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*yZwbNAO78CzzSXMvdYGnUQ.png" /></figure><p>Select <strong>All </strong>for color grading.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*Hzoe6qpn6gE0jbSFK58Q8w.png" /></figure><p>Next, I switched to Linear by going File, Build Settings, Player Settings, Player, Color Space, and change from Gamma to Linear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*LbUbQ3ZqW1tkYkcCdXSrJg.gif" /></figure><p>Next choose High Definition Range under Mode and for Tonemapping, choose one of the settings or create a custom.</p><p><strong>Example Neutral settings</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*Qg2Y9nUeBdgO1IN0RO3Emw.png" /></figure><p>Can also experiment with the Temperature and Tint</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*TJ_uqZ6QBupWUz965ZzoiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*9y0c8HM0-jvzBAM4qq3wxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*VIgOBT-X2Phtq5wxJHSc_w.gif" /></figure><p><strong>Example ACES settings</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*OkPOUkbLkgfDTK3Fw0aPSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*LLDJMaWjg6x2n-qlM350_Q.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2fba92ab57e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Player Damage Visualization]]></title>
            <link>https://medium.com/@marlenacmartin/player-damage-visualization-228321e5becb?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/228321e5becb</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 02:05:21 GMT</pubDate>
            <atom:updated>2024-02-26T02:05:21.499Z</atom:updated>
            <content:encoded><![CDATA[<p>Now we’re adding the damage thrusters in our game that deal with the left and right engines. Because they’re shared type variables, we’ll put them on the same line.</p><p>We’ll start by creating a variable under our shieldVisualizer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*uEiAyKxdYSo3o8vfeRDiGw.png" /></figure><p>Head back to Unity and add our left and right engines to our Player script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/1*HKyC_Ok7nMlUJFBudZIRjQ.png" /></figure><p>Now we’ll head back to our Player script and in Lives, we’ll write an If/Else statement for lives weather it’s 2 or 1 life</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*FYvIehHXRQcyuRtZ_iqSEg.png" /></figure><p>Now we’ll animate the game object. Select the Right Engine and create a animation clip. Name it Engine Failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VxXf5gJDkIGrZgaSDzZt_A.gif" /></figure><p>Next go to the Hurt sprites and drag into the Animation window. You wont be able to see them playing because they are off in the game object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1XiDpB53mvOr1qU5uP2YfQ.gif" /></figure><p>On the left engine, be sure to add component. And select engine failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*Q4ZpG0ga82anCRAri1z6jw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/149/1*XooHYjyXPX7JzS5o2HVOuw.png" /></figure><p>Next, we need to find the controller for the left engine. Under Animations, choose Right_Engine.</p><p>We’ll add the animations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JZmpGXm3e8Asw31gfm1HyA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*Ru7MMRdaDyHzNraJv6_JWQ.png" /></figure><p>You’ll see it added the Animator component with Right_Engine controller.</p><p>On the left engine, add the Animator component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*MtP9WzkEHjclXf8mj6oV-w.png" /></figure><p>Also assign the engine failure controller so it can also play the animations.</p><p>Rename the Right_Engine to Engine_Failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/167/1*SOzx_Tbkwx3MiUend6ymFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/143/1*CfKO-L4_cRwCNPup4787nQ.png" /></figure><p>Make sure Engine_Failure is assigned to the Animator Controller slot for Left_Engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*oAby0AIEWMgEKZlKofxzhg.gif" /></figure><p>Now test game. After the 3rd hit, the game should end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*DyeYzIU4LtNLY-WEPSWkVw.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=228321e5becb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enemy Explosion]]></title>
            <link>https://medium.com/@marlenacmartin/enemy-explosion-c690baf2c910?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c690baf2c910</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Tue, 23 Jan 2024 04:34:36 GMT</pubDate>
            <atom:updated>2024-01-23T04:34:36.710Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating the trigger animation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*MknERCji4tTTCmIUW2pcbA.png" /></figure><p>On the Enemy create a handle on the Animator component that’s attached to the enemy.</p><p>Now null check to see if the player is equal to null. Give a null message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*hKHJZpUHSgMohO34uba5cw.png" /></figure><p>Now assign the component to Anim and null check if an issue arises.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*b4FbF04Wtp1ZUUo3uV_Crg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*cOgkurr2_BCpk99qYalOkQ.png" /></figure><p>Now trigger the animation to play, On death animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*BSFaB2NVH2mYmvgzLJnG1w.gif" /></figure><p>Now go down and do it again under the Laser. This happens when the player collides and then enemy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*XNMapLMSxphwVV1uLNdqRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*Z8PX_JvuGYsrh0FyeYWGJA.gif" /></figure><p>Before heading to Unity, lets revise this and add time to when the explosion happens. So at the end of both of the Destroy script, add seconds 2.8f or whatever deemed necessary for project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*0ysBtSnOBiW5w3D2fTOIiw.png" /></figure><p>Save and go to Animator and uncheck the OnEnemy checkbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*VYP1yL4_crlWnZhELxkaXQ.png" /></figure><p>Head back to the script, and add _speed =0; so, when we are attacked, it stops moving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*uRDWxlx3nil_LA99wscsRQ.gif" /></figure><p>Save and head back to Unity to test. You’ll see a delay when the explosion happens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*qxOCzrO8ud3iaBh1iqgqAQ.gif" /></figure><p>To fix this, click on the enemy and head to the Hierarchy. Press play and select one of your enemy clones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Shx1IjPedmSLB3alaKC6dg.png" /></figure><p>Go to Animator and you’ll see it repeats your Empty animation. It waits to the empty animation finishes and then goes to the Enemy_Destoryed_anim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*8tfl7xazZGDKgzV6xpjwJw.png" /></figure><p>Click on the transition, you’ll see Has Exit Time in the Inspector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5td_Wg9w8HVG6euo6narA.png" /></figure><p>To have it immediately transition, set the exit Time to false by unchecking it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*3YRZb0YydPygoKKcCIAMXQ.png" /></figure><p>Set the Transition Duration to 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*7ne8OJTWahaz1qec5lUU6w.png" /></figure><p>Run to test the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*mwXJy3-FKwIRnbhsEs9cRA.gif" /></figure><p>Now there’s a more responsive destruction of the enemy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c690baf2c910" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Loading Scenes in Unity]]></title>
            <link>https://medium.com/@marlenacmartin/loading-scenes-in-unity-c281c0fbdd7b?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c281c0fbdd7b</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 06:52:32 GMT</pubDate>
            <atom:updated>2024-01-16T06:52:32.022Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ll be creating the main menu and to begin, I’ll create a new scene.</p><p>Go File, New Scene and save the current scene.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LfsXMf2d3bnQVc-Ht-czA.gif" /></figure><p>Hit Control S and rename to Main_Menu</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*ll3m50xwzBN4ZHBoTkpvfA.gif" /></figure><p>In the Project view, make sure Main_Menu is open in Scenes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*ei1drNXUh0Zc3ujCcJsRtA.png" /></figure><p>Now we’ll create our background. Right click, go to UI and choose Image. Name it Title_Screen_img.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/219/1*Y6XpMsQseYZGnXkIEg9SnA.png" /></figure><p>In the Inspector, go to Image and grab in the Project setting, the UI image that&#39;s named MainMenu and drag it into Source Image dropdown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*_Pa5TGJARus3N2dESLCtwA.gif" /></figure><p>With the image selected, zero out the X,Y and Z axis to center the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*tlqrU-njBGMPWTne0WWhNg.png" /></figure><p>While hard to see from the image, the measurements are listed as 512 x 512. Under the width and height, plug in those dimensions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*D5mZjgHYAywx88oxiDH7cA.png" /></figure><p>Now darken the environment by changing the background color in the Inspector tab. Select the main camera and change the color to your choosing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8inPUJkNzuM4M28J8jGF1w.gif" /></figure><p>I’m toying around with different colors here to see which I like best.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*skWlNKd_HoGvY3PM4LOH-Q.gif" /></figure><p>Change the Clar Flags to a solid color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eA9JWjHJnz9QR-8xwS7X8Q.gif" /></figure><p>Now add the Nebula background by grabbing the SpaceBG_overlay and drop into the scene.</p><p>Now we’ll create a new game button, go Canvas, UI, Button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*AO9Zwy8baVLYfY9YO0Avxg.gif" /></figure><p>Rename to New_Game_button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*qc-3frzv8bZUTH5GWhf3bg.png" /></figure><p>Move over to the side and rename to New Game. Added color tweaks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0DmkMqex32t70dpeigzHQ.gif" /></figure><p>Now lets create a Main_Menu script and attach it to the Canvas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*6-dJ7O_-wIXK5d9JYATQcg.png" /></figure><p>Change the UI Scale from Constant Pixel Size to Scale with Screen Size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*hSuufSE1Ret6N43Y_p5Ibw.gif" /></figure><p>Change the New_Game_button and have it anchored to the far right corner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*v9vg5JYGlmYUUx4lBrJYcQ.gif" /></figure><p>Now open MainMenu script and create a method that we’ll call when we do a button click.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*m-Ibi1Lp_O08WA_6KEFBXg.png" /></figure><p>Now we’ll head back to Unity, click File, Build Settings, highlight the current scene and delete it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*dCnzjkMHFXy5zeJAaXdrEA.png" /></figure><p>Now click Add Open Scenes, it’ll populate Main_menu and drag the Game into the area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SK-Js_HfTeZW74rjxqmXMw.gif" /></figure><p>In the script add the Scene Management to the script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*n2FOzeA8dSbMc55x5aKGjA.png" /></figure><p>Now write the SceneManager code below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*kU2HBwAzYiyBpvQAMSDEaw.png" /></figure><p>To call it in your UI, use the On Click event on the New Game button. We&#39;re saying when we click the button, we want to talk to an object.</p><p>We’ll drag the Canvas onto the On Click Object area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/236/1*Ka5mY10pLgNilCnlZ70aPg.png" /></figure><p>Click the No Function and choose MainMenu in the drop down and choose Load Game. Save and head back to Unity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*Ojg5chsn5QPh2O7_zLQzBw.gif" /></figure><p>Go back to our SceneManager script and change LoadScene from 0 to 1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*rrYIiXlt9aZqNZ-n1LVBdg.png" /></figure><p>Now test scene:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*bvgQeFamcVrhaAX54MuEIQ.gif" /></figure><p>Create Text and add your name. Right click on Canvas, UI and Text. Give it your own unique name. (Marlena the Martian)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YS_cR4ZsaA5INU_KyGEmpg.gif" /></figure><p>Final look</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*NwNnuB7IVW0VIH0wGjc9qg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c281c0fbdd7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Game Over Text Flicker]]></title>
            <link>https://medium.com/@marlenacmartin/game-over-text-flicker-862ad3ebfbd3?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/862ad3ebfbd3</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 00:23:07 GMT</pubDate>
            <atom:updated>2024-01-16T00:23:07.014Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m going to be creating text flicker behavior like a simulation of the Game Over text going on and off when all the lives are lost.</p><p>In the UI Manager script, we’ll create a coroutine create a IEnumerator called GameOverFlickerRoutine() and enter into an infinite loop and input text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*klzk13tc9V67763XE6T9eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*esrgxB7XhHxi8uZJ7mIBIw.png" /></figure><p>Now add yield return to make it wait 0.5 seconds before it says, “Game Over Player 1”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*4eqAxnSPof_tvwuGJau0wg.png" /></figure><p>So, every half seconds, it’ll flicker.</p><p>Now call the IEnumerator by checking if the lives are 0. If they are then we’ll write StartCoroutine(GameOverFlickerRoutine()));</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*5zPfc80qJ5iAGJ8AOeuBpg.png" /></figure><p>Save and run game. Now lose 3 lives and afterwards, you’ll see the Game Over text flicker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*-9ySWrK-B4mn_tUwwNodng.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=862ad3ebfbd3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Game Over Text]]></title>
            <link>https://medium.com/@marlenacmartin/game-over-text-b9e6c683ebb4?source=rss-14f55c9f047a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9e6c683ebb4</guid>
            <dc:creator><![CDATA[Marlena Martin ]]></dc:creator>
            <pubDate>Mon, 15 Jan 2024 21:32:12 GMT</pubDate>
            <atom:updated>2024-01-15T21:32:12.377Z</atom:updated>
            <content:encoded><![CDATA[<p>When the player has run out of lives, I’m going to display a Game Over message on the screen.</p><p>We’ll start by clicking on Canvas,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*rHlnhA7dV8DsBc6dsHO4pQ.gif" /></figure><p>Next change the name to Game Over or whatever you like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*bp5nt38JfwBh7ZW-t8pkzw.gif" /></figure><p>If you want to increase the size of your text and keep it on the same line, go over to Wrapping and change from enabled to disabled. Then increase your font size and center to your choosing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVTN2HFGtz4fO0ejI3rYRQ.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9e6c683ebb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>