{"id":932,"date":"2026-02-13T09:53:13","date_gmt":"2026-02-13T01:53:13","guid":{"rendered":"https:\/\/edu.circuspi.com\/?p=932"},"modified":"2026-03-09T16:29:03","modified_gmt":"2026-03-09T08:29:03","slug":"11-1-3-jumping-and-crouching","status":"publish","type":"post","link":"https:\/\/edu.circuspi.com\/index.php\/gamebit-en\/11-1-3-jumping-and-crouching\/","title":{"rendered":"11.1.3 Jumping and Crouching"},"content":{"rendered":"\n<p>If you want to design a game like the <strong><a href=\"https:\/\/dino-chrome.com\/\">Google Dino Game<\/a><\/strong>, the character needs to &#8220;<strong>Jump<\/strong>&#8221; and &#8220;<strong>Crouch<\/strong>.&#8221; For crouching, we also use the method of changing the sprite&#8217;s image.<\/p>\n\n\n\n<p>However, unlike projectiles where we spawn <em>new<\/em> objects, here we are modifying the <em>existing<\/em> character, so the process is slightly different.<\/p>\n\n\n\n<p>To change the sprite&#8217;s appearance, we can use the &#8220;<strong>set [mySprite] image to [ ]<\/strong>&#8221; block found in the &#8220;<strong>Sprites<\/strong>&#8221; category.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"930\" height=\"590\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-11-1-3_01.png\" alt=\"\" class=\"wp-image-1289\"\/><\/figure>\n\n\n\n<p>Set the variable name to the character you want to transform and draw the &#8220;<strong>Crouching Pose<\/strong>.&#8221; We want the character to crouch when &#8220;<strong>A is pressed<\/strong>&#8221; and return to the original state when &#8220;<strong>A is released<\/strong>.&#8221;<\/p>\n\n\n\n<p>Therefore, we need to add another block: &#8220;<strong>on [A] button [released]<\/strong>,&#8221; and place the original standing image inside it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"958\" height=\"245\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-11-1-3_02.png\" alt=\"\" class=\"wp-image-1290\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"792\" height=\"654\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-11-1-3_03.gif\" alt=\"\" class=\"wp-image-1291\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you want to design a game like the Google Dino Game, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":513,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,23],"tags":[],"table_tags":[],"class_list":{"0":"post-932","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-gamebit-en","8":"category-freeinfo-en","9":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/comments?post=932"}],"version-history":[{"count":2,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/932\/revisions"}],"predecessor-version":[{"id":1307,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/932\/revisions\/1307"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/media\/513"}],"wp:attachment":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/media?parent=932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/categories?post=932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/tags?post=932"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/table_tags?post=932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}