{"id":1131,"date":"2025-05-15T12:20:16","date_gmt":"2025-05-15T12:20:16","guid":{"rendered":"https:\/\/sites.wsagames.com\/aa14g23\/?p=1131"},"modified":"2025-05-15T12:21:20","modified_gmt":"2025-05-15T12:21:20","slug":"hud-p2-coding-redesign","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/aa14g23\/2025\/05\/15\/hud-p2-coding-redesign\/","title":{"rendered":"HUD P2 [Coding + Redesign]"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"781\" height=\"341\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-125428.png\" alt=\"\" class=\"wp-image-1133\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-125428.png 781w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-125428-300x131.png 300w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-125428-768x335.png 768w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img decoding=\"async\" width=\"345\" height=\"179\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-125352.png\" alt=\"\" class=\"wp-image-1132\" style=\"width:607px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-125352.png 345w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-125352-300x156.png 300w\" sizes=\"(max-width: 345px) 100vw, 345px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>After the second playtest, I knew I had to finish up on the HUD and get it condensed but fully functional. This gave me a list of things to do.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add the dash cooldown code<\/li>\n\n\n\n<li>Add terrashard counter and icon<\/li>\n\n\n\n<li>Update heart icons + add key icon for E-Jay as he asked for it<\/li>\n\n\n\n<li>condense HUD for more screen space<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img decoding=\"async\" width=\"513\" height=\"398\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-132044.png\" alt=\"\" class=\"wp-image-1150\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-132044.png 513w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-132044-300x233.png 300w\" sizes=\"(max-width: 513px) 100vw, 513px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"has-text-align-center has-extra-large-font-size\"><strong>Research<\/strong><\/p>\n\n\n\n<p>By this point in time, I&#8217;ve become experienced with Unity from all my other problems and just understanding the different coding calls, therefore I don&#8217;t require a tutorial to aid me on this one.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"has-text-align-center has-extra-large-font-size\"><strong>Coding<\/strong><\/p>\n\n\n\n<p>Before going to work on the new HUD assets, I decided to code the terrashard counter and dash cooldown first to get that out of the way. This would be the longest thing to do in the process.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong>Dash Code + Setup<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong>Counter Code + Setup<\/strong><\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"874\" height=\"929\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-172611.png\" alt=\"\" class=\"wp-image-1134\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-172611.png 874w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-172611-282x300.png 282w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-172611-768x816.png 768w\" sizes=\"(max-width: 874px) 100vw, 874px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"831\" height=\"556\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-153503.png\" alt=\"\" class=\"wp-image-1138\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-153503.png 831w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-153503-300x201.png 300w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-153503-768x514.png 768w\" sizes=\"(max-width: 831px) 100vw, 831px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"526\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-153736.png\" alt=\"\" class=\"wp-image-1135\" style=\"width:509px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-153736.png 704w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-153736-300x224.png 300w\" sizes=\"(max-width: 704px) 100vw, 704px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"515\" height=\"107\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-154137.png\" alt=\"\" class=\"wp-image-1136\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-154137.png 515w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-04-10-154137-300x62.png 300w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>I started with the dash cooldown script first. I made variables and a field to implement the dash icon within, so it knows what to show when active. It utilises the fill feature in the inspector, where it fills the empty space with the icon when active, therefore, the start method included the fill amount being 0, so that it doesn&#8217;t show at the beginning. Within the update method, I made it so that when the cooldown bool from the player movement script is called and explored. If the cooldown timer is less than or equal to 0, then it sets the cooldown to false and makes it invisible. However, when the dash key is pressed and the coolingdown bool is set to false, then the method TriggerCooldown will occur. This method makes the cooldown timer begin and fills the image up with the icon matching the speed of the current dash cooldown speed from another script.<\/p>\n\n\n\n<p>The terrashard counter shares information with the player inventory script that  E-Jay began on. I linked my terrashard counter script to his using a public int and called it in his script as well, and dropped my script in the inspector too. For my code, I referenced the text mesh and E-Jays code at the beginning to set up. There was no need for a starting method, so I just went straight to the Update method. In there, I made the text equal to the current player inventory terrashard count and made it a string, so it would update the text with the number.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"has-text-align-center has-extra-large-font-size\"><strong>Updating HUD Assets<\/strong><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"494\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-043922-1-1024x494.png\" alt=\"\" class=\"wp-image-1139\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-043922-1-1024x494.png 1024w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-043922-1-300x145.png 300w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-043922-1-768x370.png 768w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-043922-1-1536x741.png 1536w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-043922-1.png 1771w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1770\" height=\"644\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/IMG_1790.jpg\" alt=\"\" class=\"wp-image-1143\" style=\"width:734px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/IMG_1790.jpg 1770w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/IMG_1790-300x109.jpg 300w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/IMG_1790-1024x373.jpg 1024w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/IMG_1790-768x279.jpg 768w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/IMG_1790-1536x559.jpg 1536w\" sizes=\"(max-width: 1770px) 100vw, 1770px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>I started by creating an actual icon for the dash and made it pixelated. Then I condensed the HUD as much as I possibly could without losing the integrity of the design. I then made the terrashard icon, utilising the placeholder I used before. I also repurposed the key skill tree icon for the UI Key to keep everything consistent. I then made the heart icons include more pixels, which allowed for more detail; this would then match the new detail of the HUD.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"110\" height=\"110\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/dashcool.png\" alt=\"\" class=\"wp-image-1145\" style=\"width:223px;height:auto\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"340\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/terrashard.png\" alt=\"\" class=\"wp-image-1144\" style=\"width:219px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/terrashard.png 300w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/terrashard-265x300.png 265w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"635\" height=\"393\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/key-ui.png\" alt=\"\" class=\"wp-image-1142\" style=\"width:386px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/key-ui.png 635w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/key-ui-300x186.png 300w\" sizes=\"(max-width: 635px) 100vw, 635px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"166\" height=\"51\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/2025-05-1123-21-53-ezgif.com-crop-1.gif\" alt=\"\" class=\"wp-image-1146\" style=\"width:557px;height:auto\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"752\" height=\"565\" src=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-131927.png\" alt=\"\" class=\"wp-image-1147\" srcset=\"https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-131927.png 752w, https:\/\/sites.wsagames.com\/aa14g23\/wp-content\/uploads\/sites\/3\/2025\/05\/Screenshot-2025-05-15-131927-300x225.png 300w\" sizes=\"(max-width: 752px) 100vw, 752px\" \/><\/figure>\n\n\n\n<p>I asked for opinions from my teammates after I completed it, for their opinion, to see if I needed to do any final tweaks.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"has-text-align-center has-extra-large-font-size\"><strong>Personal Review<\/strong><\/p>\n\n\n\n<p>I liked how the HUD turned out, and I am really proud of it. The others loved it too, and I feel as though it matches its purpose perfectly whilst also doing even more past that. This has given me a love for UI, and I want to explore this more in the future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the second playtest, I knew I had to finish up on the HUD and get it condensed but fully functional. This gave me a list of things to do. Research By this point in time, I&#8217;ve become experienced with Unity from all my other problems and just understanding the different coding calls, therefore I [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1131","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/posts\/1131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/comments?post=1131"}],"version-history":[{"count":6,"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/posts\/1131\/revisions"}],"predecessor-version":[{"id":1155,"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/posts\/1131\/revisions\/1155"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/media?parent=1131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/categories?post=1131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/aa14g23\/wp-json\/wp\/v2\/tags?post=1131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}