{"id":896,"date":"2026-02-13T09:14:11","date_gmt":"2026-02-13T01:14:11","guid":{"rendered":"https:\/\/edu.circuspi.com\/?p=896"},"modified":"2026-03-09T15:54:45","modified_gmt":"2026-03-09T07:54:45","slug":"8-1-learning-to-calculate-scores","status":"publish","type":"post","link":"https:\/\/edu.circuspi.com\/index.php\/gamebit-en\/8-1-learning-to-calculate-scores\/","title":{"rendered":"8.1 Learning to Calculate Scores"},"content":{"rendered":"\n<p>First, open your project from the previous unit. You should have two sprites, and when they overlap, the non-player sprite is destroyed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"863\" height=\"418\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_01.png\" alt=\"\" class=\"wp-image-1191\"\/><\/figure>\n\n\n\n<p>Taking the characters in the image as an example, our idea is: when the Burger is &#8220;<strong>destroyed<\/strong>&#8220;, we &#8220;<strong>gain points<\/strong>&#8220;. In MakeCode Arcade, a group of blocks is dedicated to handling this information: the &#8220;<strong>Info<\/strong>&#8221; category in the <strong>Block Toolbox<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"495\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_02.png\" alt=\"\" class=\"wp-image-1192\"\/><\/figure>\n\n\n\n<p>The &#8220;<strong>Info<\/strong>&#8221; category contains blocks like &#8220;<strong>Score<\/strong>&#8220;, &#8220;<strong>Life<\/strong>&#8220;, and &#8220;<strong>Countdown<\/strong>&#8220;, which we will use in order.<\/p>\n\n\n\n<p>When we drag score-related blocks into the <strong>Workspace<\/strong> and assemble the code correctly, a score area will appear in the top-right corner of the <strong>Game Simulator<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1043\" height=\"498\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_03.png\" alt=\"\" class=\"wp-image-1194\"\/><\/figure>\n\n\n\n<p>Now, let&#8217;s drag the &#8220;<strong>set score to ( 0 )<\/strong>&#8221; block and place it inside the &#8220;<strong>on start<\/strong>&#8221; block (it can be placed anywhere inside). Placing it in &#8220;<strong>on start<\/strong>&#8221; ensures the score resets to zero when the game restarts.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1145\" height=\"457\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_04.png\" alt=\"\" class=\"wp-image-1195\"\/><\/figure>\n\n\n\n<p>Next, we need a block to help us adjust the score. Also found in &#8220;<strong>Info<\/strong>,&#8221; drag out the &#8220;<strong>change score by ( 1 )<\/strong>&#8221; block.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"494\" height=\"394\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_05.png\" alt=\"\" class=\"wp-image-1196\"\/><\/figure>\n\n\n\n<p>The &#8220;1&#8221; in &#8220;<strong>change score by ( 1 )<\/strong>&#8221; means adding 1 to the current score. If you enter a negative number, it will subtract from the score, as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1144\" height=\"576\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_06.png\" alt=\"\" class=\"wp-image-1197\"\/><\/figure>\n\n\n\n<p>We can add this block to the &#8220;<strong>code that runs after the burger is eaten<\/strong>.&#8221; This way, when the Orange Dinosaur overlaps with the Burger, besides destroying the Burger, we also gain 1 point.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"258\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_07.png\" alt=\"\" class=\"wp-image-1198\"\/><\/figure>\n\n\n\n<p>Once finished, run it in the <strong>Game Simulator<\/strong> and pay attention to whether the score increases!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"848\" src=\"https:\/\/edu.circuspi.com\/wp-content\/uploads\/2026\/02\/eng-08-1_08.gif\" alt=\"\" class=\"wp-image-1199\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>First, open your project from the previous unit. You sh [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":416,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,23],"tags":[],"table_tags":[],"class_list":{"0":"post-896","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\/896","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=896"}],"version-history":[{"count":2,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/896\/revisions"}],"predecessor-version":[{"id":1221,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/posts\/896\/revisions\/1221"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/media\/416"}],"wp:attachment":[{"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/media?parent=896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/categories?post=896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/tags?post=896"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/edu.circuspi.com\/index.php\/wp-json\/wp\/v2\/table_tags?post=896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}