{"id":40,"date":"2022-11-08T14:46:11","date_gmt":"2022-11-08T14:46:11","guid":{"rendered":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/?p=40"},"modified":"2022-11-25T14:18:11","modified_gmt":"2022-11-25T14:18:11","slug":"week-4-developer-journal","status":"publish","type":"post","link":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/2022\/11\/08\/week-4-developer-journal\/","title":{"rendered":"Week 4: Developer journal"},"content":{"rendered":"\n<p>This week was purely focused on the development of the game.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"599\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/What-the-game-looks-like-end-of-first-week-dev.png\" alt=\"\" class=\"wp-image-41\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/What-the-game-looks-like-end-of-first-week-dev.png 800w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/What-the-game-looks-like-end-of-first-week-dev-300x225.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/What-the-game-looks-like-end-of-first-week-dev-768x575.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">This is a basic look of what the game currently looks like at the end of this week so far a player and enemy have begun being implemented (movement for both of them), a background and displaying the players health. <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"807\" height=\"482\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Preload-create-and-update-end-of-first-week-dev.png\" alt=\"\" class=\"wp-image-42\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Preload-create-and-update-end-of-first-week-dev.png 807w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Preload-create-and-update-end-of-first-week-dev-300x179.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Preload-create-and-update-end-of-first-week-dev-768x459.png 768w\" sizes=\"auto, (max-width: 807px) 100vw, 807px\" \/><figcaption class=\"wp-element-caption\">These are the contents of all the fundamental functions of games in phaser there isn&#8217;t much code there as I had decided to do a lot in separate JavaScript files over everything being in the HTML script. With each of the functions I have them directing to these other files for what to do. For example in preload directing to the player preload function in the player JS file along with the keyword <strong>this<\/strong> which is necessary to pass along the game instance to the function in the player JS.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"842\" height=\"387\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Player-preload-and-create.png\" alt=\"\" class=\"wp-image-44\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Player-preload-and-create.png 842w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Player-preload-and-create-300x138.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Player-preload-and-create-768x353.png 768w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\" \/><figcaption class=\"wp-element-caption\">This shows the variables associated with the player and the preloads and create of the player as referred to in the HTML. The player preload loads the sprite sheet of  the player. The player create function creates the player in the scene, the collisions with the bounds of the scene so the player can&#8217;t leave the game scene, basics for keyboard input and the UI for showing the players health. <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Player-update.png\" alt=\"\" class=\"wp-image-45\" width=\"315\" height=\"668\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Player-update.png 315w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Player-update-141x300.png 141w\" sizes=\"auto, (max-width: 315px) 100vw, 315px\" \/><figcaption class=\"wp-element-caption\">So far the player update function just controls the movement of the player. <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"721\" height=\"247\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Enemy-preload-and-create.png\" alt=\"\" class=\"wp-image-47\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Enemy-preload-and-create.png 721w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Enemy-preload-and-create-300x103.png 300w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><figcaption class=\"wp-element-caption\">This shows the variables associated with the enemy and the preload and create functions as referred to in the HTML. The enemy preload loads the sprite sheet of the enemy and the enemy create function creates the enemy in the scene.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"261\" height=\"725\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Enemy-update.png\" alt=\"\" class=\"wp-image-48\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Enemy-update.png 261w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Enemy-update-108x300.png 108w\" sizes=\"auto, (max-width: 261px) 100vw, 261px\" \/><figcaption class=\"wp-element-caption\">So far the enemy update function just controls the movement of the enemy. This works through taking the current x and y position of the player and having the enemy move towards that position based of its current position.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"752\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Trello-board-end-week-1-dev-1024x752.png\" alt=\"\" class=\"wp-image-50\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Trello-board-end-week-1-dev-1024x752.png 1024w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Trello-board-end-week-1-dev-300x220.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Trello-board-end-week-1-dev-768x564.png 768w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Trello-board-end-week-1-dev.png 1114w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">The Trello board at the end of the week <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"373\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/Game-end-dev-week-1-gif.gif\" alt=\"\" class=\"wp-image-51\"\/><figcaption class=\"wp-element-caption\">This shows what the game\/gameplay looks like so far that being the player and enemy movement mostly. <\/figcaption><\/figure>\n\n\n\n<p>Links to assets used:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Background grass texture: <a href=\"https:\/\/opengameart.org\/content\/slates-32x32px-orthogonal-tileset-by-ivan-voirol\">https:\/\/opengameart.org\/content\/slates-32x32px-orthogonal-tileset-by-ivan-voirol<\/a><\/li>\n\n\n\n<li>Player sprite sheet: <a href=\"https:\/\/sanderfrenken.github.io\/Universal-LPC-Spritesheet-Character-Generator\/#?body=Body_color_light&amp;head=Human_male_light&amp;shoulders=Leather_blue&amp;bauldron=none&amp;bracers=none&amp;wrists=none&amp;gloves=Gloves_blue&amp;chainmail=Chainmail_gray&amp;armour=none&amp;legs=Pants_blue&amp;shoes=Boots_blue&amp;hat=Norman_helm_steel&amp;weapon=Slash_oversize_layered_longsword\">https:\/\/sanderfrenken.github.io\/Universal-LPC-Spritesheet-Character-Generator\/#?body=Body_color_light&amp;head=Human_male_light&amp;shoulders=Leather_blue&amp;bauldron=none&amp;bracers=none&amp;wrists=none&amp;gloves=Gloves_blue&amp;chainmail=Chainmail_gray&amp;armour=none&amp;legs=Pants_blue&amp;shoes=Boots_blue&amp;hat=Norman_helm_steel&amp;weapon=Slash_oversize_layered_longsword<\/a><\/li>\n\n\n\n<li>Enemy sprite sheet: <a href=\"https:\/\/sanderfrenken.github.io\/Universal-LPC-Spritesheet-Character-Generator\/#?body=Body_color_light&amp;head=Human_male_light&amp;shoulders=none&amp;bauldron=none&amp;bracers=none&amp;wrists=none&amp;gloves=Gloves_red&amp;chainmail=Chainmail_gray&amp;armour=none&amp;legs=Pants_red&amp;shoes=Boots_red&amp;hat=none&amp;weapon=Slash_oversize_layered_longsword&amp;clothes=Longsleeve_red&amp;bandana=Mail_steel&amp;headcover=none&amp;shadow=none\">https:\/\/sanderfrenken.github.io\/Universal-LPC-Spritesheet-Character-Generator\/#?body=Body_color_light&amp;head=Human_male_light&amp;shoulders=none&amp;bauldron=none&amp;bracers=none&amp;wrists=none&amp;gloves=Gloves_red&amp;chainmail=Chainmail_gray&amp;armour=none&amp;legs=Pants_red&amp;shoes=Boots_red&amp;hat=none&amp;weapon=Slash_oversize_layered_longsword&amp;clothes=Longsleeve_red&amp;bandana=Mail_steel&amp;headcover=none&amp;shadow=none<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This week was purely focused on the development of the game. Links to assets used:<\/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-40","post","type-post","status-publish","format-standard","hentry","category-devlog"],"_links":{"self":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/40","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=40"}],"version-history":[{"count":5,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"predecessor-version":[{"id":54,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/40\/revisions\/54"}],"wp:attachment":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}