{"id":58,"date":"2022-11-25T14:17:42","date_gmt":"2022-11-25T14:17:42","guid":{"rendered":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/?p=58"},"modified":"2022-11-25T14:17:42","modified_gmt":"2022-11-25T14:17:42","slug":"week-7-developer-journal","status":"publish","type":"post","link":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/2022\/11\/25\/week-7-developer-journal\/","title":{"rendered":"Week 7: Developer journal"},"content":{"rendered":"\n<p>This week was making final changes to the game, sending of feedback and final work for submission.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"964\" height=\"308\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-player-create.png\" alt=\"\" class=\"wp-image-91\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-player-create.png 964w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-player-create-300x96.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-player-create-768x245.png 768w\" sizes=\"auto, (max-width: 964px) 100vw, 964px\" \/><figcaption class=\"wp-element-caption\">Not much has changed here I added the controls UI to explain controls at the bottom of the screen and added some comments to the code.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"138\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-game-over-changes.png\" alt=\"\" class=\"wp-image-92\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-game-over-changes.png 972w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-game-over-changes-300x43.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-game-over-changes-768x109.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><figcaption class=\"wp-element-caption\">I also moved all of the logic of when the game is over to within the call for it instead of having it happen before the call as it meant less repetition of code when I wanted to call to restart after winning through the reset button.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"702\" height=\"43\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-restart-key.png\" alt=\"\" class=\"wp-image-93\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-restart-key.png 702w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-restart-key-300x18.png 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><figcaption class=\"wp-element-caption\">This was done in the enemy update function where this adds the r key as a control.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"173\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-screen.png\" alt=\"\" class=\"wp-image-94\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-screen.png 739w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-screen-300x70.png 300w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\" \/><figcaption class=\"wp-element-caption\">This is the code for the winning screen after beating the final wave which just has some UI congratulating the player and giving the option to restart. <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"134\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-restart-1024x134.png\" alt=\"\" class=\"wp-image-95\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-restart-1024x134.png 1024w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-restart-300x39.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-restart-768x101.png 768w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Victory-restart.png 1189w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">This is a condition constantly called after victory is set to true when if r is pressed (restart key) then game over is set to true which calls to the restart of the game. <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"524\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Invulnerability-changes-1-1024x524.png\" alt=\"\" class=\"wp-image-97\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Invulnerability-changes-1-1024x524.png 1024w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Invulnerability-changes-1-300x154.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Invulnerability-changes-1-768x393.png 768w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Invulnerability-changes-1.png 1231w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">I also made changes to the invulnerability after getting damaged system to a time based system over the frame based that it was before. This works through taking the length of time of the invulnerability timer dividing it by the current time minus the time since last frame. I also added more comments to this section of code.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"405\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Changes-to-healing.png\" alt=\"\" class=\"wp-image-98\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Changes-to-healing.png 908w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Changes-to-healing-300x134.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Week-7-Changes-to-healing-768x343.png 768w\" sizes=\"auto, (max-width: 908px) 100vw, 908px\" \/><figcaption class=\"wp-element-caption\">I also made some changes to the healing system which was increasing healing from 2 to 5 and adding a condition to if the player has 100 health (full health) then it won&#8217;t pickup the consumable.<\/figcaption><\/figure>\n\n\n\n<p>Final version of the game: <a href=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/2D%20Game\/2DGame.html\">https:\/\/georgebaker.nuacomputerscience.co.uk\/2D%20Game\/2DGame.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week was making final changes to the game, sending of feedback and final work for submission. Final version of the game: https:\/\/georgebaker.nuacomputerscience.co.uk\/2D%20Game\/2DGame.html<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-devlog"],"_links":{"self":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=58"}],"version-history":[{"count":2,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/58\/revisions\/99"}],"wp:attachment":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}