{"id":1039,"date":"2025-04-27T19:32:11","date_gmt":"2025-04-27T19:32:11","guid":{"rendered":"https:\/\/sites.wsagames.com\/pe1n23\/?p=1039"},"modified":"2025-10-07T11:40:51","modified_gmt":"2025-10-07T11:40:51","slug":"easter-break-development","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/pe1n23\/easter-break-development\/","title":{"rendered":"Easter Break Development"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Adding Tweens<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To ease me back into development over the Easter break, I decided to add some visual polish to the game via <strong>tweening<\/strong>. Tweens are essentially smooth animated transitions between any two values in the game. They are usually done for things like UI sliding into place, or a character squashing and stretching when landing and jumping.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For this I used the PrimeTween package, which essentially has the same features of popular packages such as DOTween but automatically takes care of things like memory management in a much more efficient way, making it a very easy choice to simply drop straight into the project.<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"PrimeTween | High-Performance Animations and Sequences | Available on Asset Store\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/MuMKwxOzc3M?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The first script I changed to test it is the RoomTrigger script, which fades in and out the name of any new room the player enters. Before, the code to do this was a very long-winded couroutine which used a timer.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"867\" height=\"592\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/05\/image-7.png\" alt=\"\" class=\"wp-image-1043\" style=\"width:557px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/05\/image-7.png 867w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/05\/image-7-300x205.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/05\/image-7-768x524.png 768w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With PrimeTween, all this code could be replaced by a simple sequence:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img decoding=\"async\" width=\"769\" height=\"432\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/05\/image-8.png\" alt=\"\" class=\"wp-image-1044\" style=\"width:598px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/05\/image-8.png 769w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/05\/image-8-300x169.png 300w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This perhaps wasnt entirely necessary but taught me all the essentials of using the plugin. After this, I added a tween to the camera&#8217;s script so the player smoothly transitions to a higher FOV when sprinting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding Tweens To ease me back into development over the Easter break, I decided to add some visual polish to the game via tweening. Tweens are essentially smooth animated transitions between any two values in the game. They are usually done for things like UI sliding into place, or a character squashing and stretching when [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,29,30],"tags":[],"class_list":["post-1039","post","type-post","status-publish","format-standard","hentry","category-development","category-semester-2","category-year2"],"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/1039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/comments?post=1039"}],"version-history":[{"count":2,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/1039\/revisions"}],"predecessor-version":[{"id":1045,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/1039\/revisions\/1045"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/media?parent=1039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/categories?post=1039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/tags?post=1039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}