{"id":517,"date":"2025-01-10T23:49:43","date_gmt":"2025-01-10T23:49:43","guid":{"rendered":"https:\/\/sites.wsagames.com\/pe1n23\/?p=517"},"modified":"2025-10-07T11:40:51","modified_gmt":"2025-10-07T11:40:51","slug":"prototype-remake-in-unity","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/pe1n23\/prototype-remake-in-unity\/","title":{"rendered":"Prototype Remake in Unity"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">After my ideas for my game were more fleshed out I wanted to make a solid prototype to experiment with art style for my environment, movement mechanics, as well as perhaps some level design. I worry that the concept of my game may come off as technically challenging to create, so it could also serve as a source of inspiration (not to copy from, as the code will be quite haphazardly made) for a potential team that could make my game.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As such, I decided to adapt the movement code from my <a href=\"https:\/\/sites.wsagames.com\/pe1n23\/godot-experiments-and-initial-game-concepts\/\" data-type=\"post\" data-id=\"28\">Godot prototype<\/a> into Unity, starting with the scene. I created a sphere for the character with a Rigidbody component, meaning they are a physics object that can have forces exerted on them based on player input. I also created a white room with a tasteful orange floor similar to my Godot level as a testing zone, and gave the player sphere the billiard-ball material to test rotation.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1560\" height=\"1021\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-5.png\" alt=\"\" class=\"wp-image-519\" style=\"width:645px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-5.png 1560w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-5-300x196.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-5-1024x670.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-5-768x503.png 768w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-5-1536x1005.png 1536w\" sizes=\"(max-width: 1560px) 100vw, 1560px\" \/><figcaption class=\"wp-element-caption\">I forgot to mention, but I also enabled ACES tonemapping. It makes it look so much better!<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now came the difficult part: Translating the GDScript code from Godot into C# on Unity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This was actually much simpler than expected, however, after looking up equivalent functions from one language to the other. However, I also wanted to use Unity&#8217;s new Input System to make eventually testing things like controller support much easier, and also just to get some experience with it. I created a new PlayerMovement script and added it to the player, as well as an Actions object, which let me set actions for moving, jumping and looking. Then I just had to enable it in the script and bind the Jump command, as I wanted the player to be able to hold down space for successive jumps.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img decoding=\"async\" width=\"999\" height=\"256\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-6.png\" alt=\"\" class=\"wp-image-520\" style=\"width:644px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-6.png 999w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-6-300x77.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-6-768x197.png 768w\" sizes=\"(max-width: 999px) 100vw, 999px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"147\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-8-1024x147.png\" alt=\"\" class=\"wp-image-522\" style=\"width:641px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-8-1024x147.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-8-300x43.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-8-768x110.png 768w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-8.png 1069w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">In my previous Godot experiment, I had the ball roll and be pushed on both the floor and in the air, while limiting the angular velocity and slowing the player down while on the ground:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1438\" height=\"540\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-7.png\" alt=\"\" class=\"wp-image-521\" style=\"width:636px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-7.png 1438w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-7-300x113.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-7-1024x385.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-7-768x288.png 768w\" sizes=\"(max-width: 1438px) 100vw, 1438px\" \/><figcaption class=\"wp-element-caption\">GDScript code from my Godot project<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">However, this didn&#8217;t feel quite right. In my Unity prototype I experimented with different movement code on both the ground and in the air. I wanted to emulate the snappy controls from Marble Blast, so I tried to increase the ball&#8217;s friction and make the angular, or rolling velocity, high. However, this made the ball begin to ride up walls, so for now I am simply pushing it with a force on any input and additionally letting the ball &#8220;spin up&#8221; while in the air by giving it angular velocity.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1937\" height=\"1549\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-16.png\" alt=\"\" class=\"wp-image-561\" style=\"width:801px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-16.png 1937w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-16-300x240.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-16-1024x819.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-16-768x614.png 768w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-16-1536x1228.png 1536w\" sizes=\"(max-width: 1937px) 100vw, 1937px\" \/><figcaption class=\"wp-element-caption\">My fully commented movement code for my prototype.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I also inserted some code at the beginning to slow down the ball&#8217;s angular and linear velocity when no player input is detected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now I just had to adjust the roll, push and drag force as necessary as well as the ball&#8217;s mass to make the player character feel good.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, I am still not happy with the movement in its current form and a team making the game would probably use other techniques to deliver the intended gamefeel. Regardless this gave me a lot of insight on improving the movement in the <a href=\"https:\/\/sites.wsagames.com\/pe1n23\/gdd\/mechanics\/\" data-type=\"page\" data-id=\"270\">Mechanics section of my GDD<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"environment-settings\">Environment Settings<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">I also made some further adjustments to the level&#8217;s environment and graphics. For example I made a custom skybox based off the sky colours in <em>Katamari Damacy<\/em>&#8216;s box art:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"1018\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-17.png\" alt=\"\" class=\"wp-image-563\" style=\"width:474px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-17.png 1022w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-17-300x300.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-17-150x150.png 150w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-17-768x765.png 768w\" sizes=\"(max-width: 1022px) 100vw, 1022px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I also removed all the real-time and baked global illumination as well as any ambient occlusion to get a flat shaded look, and made the shadows sharp instead of soft. I also use <a href=\"https:\/\/github.com\/Robinseibold\/Unity-URP-Outlines\">Robin Seibold&#8217;s open-source outline shader<\/a> for outlines around the environment, and this is the result:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1042\" height=\"646\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-19.png\" alt=\"\" class=\"wp-image-565\" style=\"width:631px;height:auto\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-19.png 1042w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-19-300x186.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-19-1024x635.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/01\/image-19-768x476.png 768w\" sizes=\"(max-width: 1042px) 100vw, 1042px\" \/><figcaption class=\"wp-element-caption\">The cubes here were just for physics testing. Moveable objects in <em>Kinetic Panic<\/em> will not be shaded like the rest of the level.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is super reminsicent of my inspirations like <a href=\"https:\/\/sites.wsagames.com\/pe1n23\/research-inspirations-katamari-n-littlebigplanet\/\" data-type=\"post\" data-id=\"62\">N++ and Rez<\/a>, and pretty close for what I want the base environments to look like, but the real-world objects without outlines would need to be implemented in the finished game, as well as perhaps some clouds and distant collage backdrops for different levels.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After my ideas for my game were more fleshed out I wanted to make a solid prototype to experiment with art style for my environment, movement mechanics, as well as perhaps some level design. I worry that the concept of my game may come off as technically challenging to create, so it could also serve [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,28,30],"tags":[14,15,11],"class_list":["post-517","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-semester-1","category-year2","tag-art","tag-gameplay","tag-gamedev"],"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/517","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=517"}],"version-history":[{"count":12,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/517\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/517\/revisions\/609"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/media\/565"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/media?parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/categories?post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/tags?post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}