{"id":1731,"date":"2025-11-29T14:55:05","date_gmt":"2025-11-29T14:55:05","guid":{"rendered":"https:\/\/sites.wsagames.com\/pe1n23\/?p=1731"},"modified":"2026-01-12T15:18:14","modified_gmt":"2026-01-12T15:18:14","slug":"godot-prototyping-3","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/pe1n23\/godot-prototyping-3\/","title":{"rendered":"Godot Prototyping 3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">After my presentation on Monday of my game Pusher, I wanted to try and recreate the movement in Godot while using my existing rhythm system as a base.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Grid System<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Firstly I had to get grid-based movement working in Godot. I used the following video as a basis to get it working:<\/p>\n\n\n\n<figure class=\"wp-block-embed 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=\"Grid-Based Movement In less than 3 minutes Using Godot 4.0!\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/Kx4qVuG4LgM?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\">This was extremely simple but it was more than good enough for a prototype. I then also added a tween to make the player&#8217;s movement more satisfying between grid spaces:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"880\" height=\"205\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2026\/01\/image-16.png\" alt=\"\" class=\"wp-image-1732\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2026\/01\/image-16.png 880w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2026\/01\/image-16-300x70.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2026\/01\/image-16-768x179.png 768w\" sizes=\"(max-width: 880px) 100vw, 880px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I also added a Camera node that follows the player automatically with some inertia, making the play space feel fully open. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rhythmic Movement<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Movement was now feeling very satisfying but it now needed to be synced with the rhythm. To do this I needed to know what the most recently pressed direction key is and move the player in that direction on every beat. To do that I added the following code which essentially pushes the most recently pressed key to the front of the &#8220;queue&#8221; or list of held inputs:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"843\" height=\"364\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-3.png\" alt=\"\" class=\"wp-image-1736\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-3.png 843w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-3-300x130.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-3-768x332.png 768w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then on every beat I run the move code and feed in that direction. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"156\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-5-1024x156.png\" alt=\"\" class=\"wp-image-1738\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-5-1024x156.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-5-300x46.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-5-768x117.png 768w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-5.png 1033w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I also added a &#8220;buffered move&#8221; which can store a move to be played on the next beat if the player is already moving when the button is first pressed, reducing frustration when the player barely misses their window to move:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"153\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-7-1024x153.png\" alt=\"\" class=\"wp-image-1740\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-7-1024x153.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-7-300x45.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-7-768x115.png 768w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-7.png 1122w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now when holding the movement keys the player moves on every beat:<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"720\" style=\"aspect-ratio: 1280 \/ 720;\" width=\"1280\" controls muted src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/VID20260112150548.mp4\" playsinline><\/video><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Attracting a Crowd<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After this I then wanted to add the &#8220;crowds&#8221; which follow the player. These were quite simple to add as I could make Rigidbody2D (or physics object) nodes in the game scene with scripts to make them get the players position and move themselves towards that every frame if they&#8217;re close enough:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"427\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-9.png\" alt=\"\" class=\"wp-image-1745\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-9.png 967w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-9-300x132.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-9-768x339.png 768w\" sizes=\"(max-width: 967px) 100vw, 967px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This worked as expected and they now surround the player and can be pushed by them:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"602\" src=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-8-1024x602.png\" alt=\"\" class=\"wp-image-1744\" srcset=\"https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-8-1024x602.png 1024w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-8-300x176.png 300w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-8-768x452.png 768w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-8-1536x903.png 1536w, https:\/\/sites.wsagames.com\/pe1n23\/wp-content\/uploads\/sites\/10\/2025\/11\/image-8.png 1954w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>After my presentation on Monday of my game Pusher, I wanted to try and recreate the movement in Godot while using my existing rhythm system as a base. Grid System Firstly I had to get grid-based movement working in Godot. I used the following video as a basis to get it working: This was extremely [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":1744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-1731","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-year-3"],"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/1731","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=1731"}],"version-history":[{"count":4,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/1731\/revisions"}],"predecessor-version":[{"id":1746,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/posts\/1731\/revisions\/1746"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/media\/1744"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/media?parent=1731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/categories?post=1731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/pe1n23\/wp-json\/wp\/v2\/tags?post=1731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}