{"id":455,"date":"2024-02-21T02:39:31","date_gmt":"2024-02-21T02:39:31","guid":{"rendered":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/?p=455"},"modified":"2024-02-21T12:52:52","modified_gmt":"2024-02-21T12:52:52","slug":"bsc2a-hypercasual-prototype-continuation","status":"publish","type":"post","link":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/2024\/02\/21\/bsc2a-hypercasual-prototype-continuation\/","title":{"rendered":"BSc2a &#8211; Hypercasual Prototype Continuation"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Some time has passed since I last worked on the game due to working on other elements of the brief so I&#8217;m due a moment to look at how i&#8217;ve set things up.<br>Now that I have a blueprint prototype, first thing I want to do is add a little more visual clarity for a small round of playtests. I&#8217;m gonna add controls and a timer to the UI so the player is actually aware there&#8217;s a time limit. The on-screen controls will be a temporary remedy until a tutorial is properly added.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, I noticed from my own test that if the bar can appear completely empty or full by default. I thought this might confuse the player so I&#8217;ve opted to raise the minimum by 5 and lower the max by 5.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"546\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image.png\" alt=\"\" class=\"wp-image-456\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image.png 974w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-300x168.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-768x431.png 768w\" sizes=\"auto, (max-width: 974px) 100vw, 974px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Looking back at some of the setup for the widget<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"202\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-1-1024x202.png\" alt=\"\" class=\"wp-image-457\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-1-1024x202.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-1-300x59.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-1-768x152.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-1.png 1123w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Setting up the text visibility like this wasn&#8217;t necessary since the return node has an output set up for it which I could use a select blueprint with a bool to determine if the text will be visible or hidden.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"300\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-2.png\" alt=\"\" class=\"wp-image-458\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-2.png 921w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-2-300x98.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-2-768x250.png 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">There&#8217;s a lot of tweaks that could be made to improve the feel of the game.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I packaged the game and sent it for written verbal feedback from my peers, first elements of confusion was being able to navigate the background. Second was the UI being disconnected from anything where adding background details to support the gameplay elements would make them stand at as part of gameplay.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">He did not like the game keybinds being TG YH which felt out of place which I agree as these were temporary buttons while figuring out the new enhanced inputs system for unreal. I suggested I make the controls WS, up\/down arrow keys for each gauge which would make mechanical sense however he suggested making the keys AD, JL to be more comfortable with natural hand placement. I&#8217;d like to try both.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I shared my game prototype with a friend and he immediately starting creating a new design for the UI based on my mock design.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"582\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-3-1024x582.png\" alt=\"\" class=\"wp-image-460\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-3-1024x582.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-3-300x170.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-3-768x436.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-3-1536x873.png 1536w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-3-2048x1164.png 2048w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-3-1568x891.png 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I really liked his new design which gave a lot of grounding for the game visually, I&#8217;ve sent a message to the course leader if I will be able to use my friends work as long as I credit him.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">He used this tool for getting a planet too which is a nice way to create some planet assets for the game: <a href=\"https:\/\/deep-fold.itch.io\/pixel-planet-generator\">https:\/\/deep-fold.itch.io\/pixel-planet-gener<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"104\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/Idea3-edited-1.png\" alt=\"\" class=\"wp-image-463\" style=\"width:831px;height:auto\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/Idea3-edited-1.png 463w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/Idea3-edited-1-300x67.png 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ve divided the UI into this hierarchy:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Space Background<\/li>\n\n\n\n<li>Planet Background (This will swap out between different variations)<\/li>\n\n\n\n<li>Background for TVs<\/li>\n\n\n\n<li>Display planet on big TV<\/li>\n\n\n\n<li>Display Gauges on small TVS<\/li>\n\n\n\n<li>A little CRT effect or overlay?<\/li>\n\n\n\n<li>Foreground decoration<\/li>\n\n\n\n<li>timer and planet counter<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Add own font<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve decided to try out this UI in the game to see how it feels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Setting up animated planets looks like a fun task, the site I found can export these planets as a png, gif or spritesheet, which using the spritesheet I can turn it into an animation in unreal as a flipbook. However I ran into the problem where widgets don&#8217;t implement flip books, looking for alternate solutions it would seem you can use materials in widgets and materials can create animations using flip books. I followed this tutorial to create the new animation material https:\/\/www.youtube.com\/watch?v=L0dT_dPPVPI and fixed the speed with a solution in the comments that said to take a time node and multiply it by 0.3.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"607\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-4-1024x607.png\" alt=\"\" class=\"wp-image-466\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-4-1024x607.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-4-300x178.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-4-768x455.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-4-1536x910.png 1536w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-4.png 1542w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The animation works perfectly, and I can even add parameters for the spritesheet and animation speed for easily changing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I thought I&#8217;d be able to set the material on a widget image and change the parameter from there but I can&#8217;t find any documentation for it. To workaround this I can instead create a dozen material instances for all the planets and store them as an array, then draw from one at random. Since I have <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"451\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-7-1024x451.png\" alt=\"\" class=\"wp-image-470\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-7-1024x451.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-7-300x132.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-7-768x338.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-7.png 1259w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">One more touch I feel that was missing is fonts, I&#8217;ve promptly found one at dafont.com available at https:\/\/www.dafont.com\/rainyhearts.font which fits my game nicely with the UI provided.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another thing I want to tweak is the rate at which the bars move which ill refer to as the climb rate. I&#8217;d like the bars to move faster when they&#8217;re further from their goal and I at first thought I could use Easing to do this where I can take two values and adjust based on an exponential and alpha, however when I implemented this I failed to consider that this will change the input from add &amp; subtract to just ease into the goal removing the game element. This blueprint below could hypothetically work for a built in &#8216;cheat&#8217; has a secret feature but still it was not my intended outcome. It would be worth in future approaching tasks a little more slowly by further breaking down the problem before finding a solution.<br><br>For understanding the ease blueprint, I found the documentation page at https:\/\/docs.unrealengine.com\/4.27\/en-US\/BlueprintAPI\/Math\/Interpolation\/Ease\/ but needed a little extra help understanding it so checked with a guide on Youtube to see them in action, https:\/\/www.youtube.com\/watch?v=3zRSoAfTnWE helped me figure out how to apply the ease blueprint and the difference between each element in the function enumerator part.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"330\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-8.png\" alt=\"\" class=\"wp-image-473\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-8.png 968w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-8-300x102.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-8-768x262.png 768w\" sizes=\"auto, (max-width: 968px) 100vw, 968px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Considering the reflection, the math I should be increasing the &#8216;gauge input rate&#8217; float rather than replacing the addition\/subtract equation completely as changing the value of the &#8216;gauge input rate&#8217; will change how much the bar increases\/decreases per tick.<br>I went through a lot of trial and error figuring out what would be the best way to manipulate the climb rate, though it&#8217;s less optimised than before it&#8217;s achieved my goal in mind with little trouble. Key part of figuring this out has been running print strings to see what the new &#8216;climb rate&#8217; is for the bar and making further changes based on that like seeing it went into negatives when &#8216;current&#8217; was higher than &#8216;goal&#8217; so I had to make it absolute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The final blueprint for easing that worked is this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"399\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-10-1024x399.png\" alt=\"\" class=\"wp-image-475\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-10-1024x399.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-10-300x117.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-10-768x299.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-10.png 1169w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">It doesn&#8217;t feel the most efficient but it works incredibly well after a lot of fine tuning of values for my purposes, I get the float range between the gauge fill line and the marker line, normalize to a range to fit the desired input rate,absolute to ensure it&#8217;s always positive before using clamp. I&#8217;ve tried careful adapting the &#8216;Normalize to range&#8217; function to find a good zone but it seems like it just needs a limit for the minimum and maximum climb rates.<br>I think it would be best to turn this into a function with pass-by-references to use for the other input actions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"161\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-12-1024x161.png\" alt=\"\" class=\"wp-image-477\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-12-1024x161.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-12-300x47.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-12-768x121.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-12-1536x241.png 1536w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-12-1568x246.png 1568w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-12.png 1858w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With the custom easing function seamlessly fed into each input, adjusting the gauges feels really fluid now, it doesn&#8217;t feel tedious when the marker is set really far away and slowing down briefly when it gets closer to the marker adds a &#8216;drag&#8217; effect which helps avoid overshooting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Compared to earlier, the game has come very far in a short time with the introduction of a UI, dynamic background elements and easing the climb.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-11-1024x552.png\" alt=\"\" class=\"wp-image-476\" srcset=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-11-1024x552.png 1024w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-11-300x162.png 300w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-11-768x414.png 768w, https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2024\/02\/image-11.png 1416w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Few remaining changes I could make in future include a little more difficulty elements that appear overtime such as disabling a monitor, disabling the gauge, potential hazards? I think it&#8217;s important thought that I focus on converting this game to C++ as I&#8217;ve developed the prototype far more than I anticipated after receiving a UI to use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reduce timer gain, redo gauge marker. Re-export for more feedback<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time has passed since I last worked on the game due to working on other elements of the brief so I&#8217;m due a moment to look at how i&#8217;ve set things up.Now that I have a blueprint prototype, first thing I want to do is add a little more visual clarity for a small&hellip; <a class=\"more-link\" href=\"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/2024\/02\/21\/bsc2a-hypercasual-prototype-continuation\/\">Continue reading <span class=\"screen-reader-text\">BSc2a &#8211; Hypercasual Prototype Continuation<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-455","post","type-post","status-publish","format-standard","hentry","category-uncategorised","entry"],"_links":{"self":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=455"}],"version-history":[{"count":9,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/455\/revisions\/501"}],"wp:attachment":[{"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lloydmills.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}