{"id":113,"date":"2021-05-09T10:05:40","date_gmt":"2021-05-09T10:05:40","guid":{"rendered":"https:\/\/msc-ai.knipmeyer.co.uk\/?p=113"},"modified":"2021-05-09T10:06:28","modified_gmt":"2021-05-09T10:06:28","slug":"initial-map","status":"publish","type":"post","link":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/2021\/05\/09\/initial-map\/","title":{"rendered":"Initial Map"},"content":{"rendered":"\n<p>Having completed enough to create an initial map i set about designing the level. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"812\" src=\"https:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-30-1024x812.png\" alt=\"\" class=\"wp-image-114\" srcset=\"http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-30-1024x812.png 1024w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-30-300x238.png 300w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-30-768x609.png 768w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-30-1536x1218.png 1536w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-30-2048x1624.png 2048w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-30-378x300.png 378w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Initial Level Design<\/figcaption><\/figure>\n\n\n\n<p>For the first part our hero will have no &#8216;Hero Mode&#8217; activations, and will have to avoid the in-place monsters (which will seek) and the random spawn monsters (which will just move randomly). <\/p>\n\n\n\n<p>The map design ensures our hero has enough to make risky moves that increase in skill\/dexterity to complete, but are awarded higher scores. The gaps in the walls are intentionally off-set to the entrance making the hero cross the room, but if the treasure is to be avoided in the later stages, a dash across the room can be made, but at a lower score.<\/p>\n\n\n\n<p>The food and drink is added, with more towards the of the level ready to combat the dragon. The dragon will have &#8216;health&#8217; which will require several attacks in hero mode to win, also the special red key will need to be picked up to allow our hero to escape, having defeatd the dragon with all his treasures !<\/p>\n\n\n\n<p>I made code updates in the designer to reflect the button modes and actions, i.e.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"816\" height=\"608\" src=\"https:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-31.png\" alt=\"\" class=\"wp-image-115\" srcset=\"http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-31.png 816w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-31-300x224.png 300w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-31-768x572.png 768w, http:\/\/msc-ai.knipmeyer.co.uk\/wp-content\/uploads\/2021\/05\/image-31-403x300.png 403w\" sizes=\"auto, (max-width: 816px) 100vw, 816px\" \/><figcaption>Place Treasure, not pill<\/figcaption><\/figure>\n\n\n\n<p>and to create hero mode required adjust the shape and action within the code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>to place-pellet\n  ask patch (round mouse-xcor) (round mouse-ycor)\n  &#91;\n    ifelse pcolor != black\n    &#91; user-message \"You cannot place a treasure on top of a wall or a gate.\" ]\n    &#91;\n      if not any? turtles-here\n      &#91;\n        sprout-treasures 1\n        &#91;\n          set color yellow\n          set powerup? false\n          set shape \"box\"\n        ]\n        set treasures-grid? true\n        set pcolor black\n      ]\n    ]\n  ]\nend\n\nto hero-mode\n  if any? treasures-on patch mouse-xcor mouse-ycor\n  &#91;\n    ask one-of treasures-on patch mouse-xcor mouse-ycor\n    &#91;\n      set powerup? not powerup?\n      ifelse powerup?\n      &#91; set shape \"circle\" ]\n      &#91; set shape \"pellet\" ]\n      while &#91; mouse-down? ] &#91; ] ;; wait until mouse button is released\n    ]\n  ]\nend<\/code><\/pre>\n\n\n\n<p>The next step is within the game-code to add the additional code to update the UI, with values for each of the keys and also the dragon health, as well as the spawning of random monsters thru out the dungeon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having completed enough to create an initial map i set about designing the level. For the first part our hero will have no &#8216;Hero Mode&#8217; activations, and will have to avoid the in-place monsters (which will seek) and the random &hellip; <a href=\"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/2021\/05\/09\/initial-map\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":2,"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":117,"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/113\/revisions\/117"}],"wp:attachment":[{"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/msc-ai.knipmeyer.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}