{"id":33,"date":"2022-11-24T15:25:24","date_gmt":"2022-11-24T15:25:24","guid":{"rendered":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/?p=33"},"modified":"2023-10-20T11:52:47","modified_gmt":"2023-10-20T10:52:47","slug":"week-3-journal-log-24-10-22","status":"publish","type":"post","link":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/2022\/11\/24\/week-3-journal-log-24-10-22\/","title":{"rendered":"Week 3 Journal Log 24\/10\/22"},"content":{"rendered":"\n<p>This week we were introduced to Phaser, a JavaScript coding utility. This allowed us to simulate physics and arcade type games.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bullet Bro&#8217;s<\/h2>\n\n\n\n<p>Bullet Bro&#8217;s is the game I decided to make, it&#8217;s a mix of Smash Bros and a Bullet Hell type of game. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"604\" src=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-9.png\" alt=\"\" class=\"wp-image-34\" srcset=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-9.png 802w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-9-300x226.png 300w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-9-768x578.png 768w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><figcaption class=\"wp-element-caption\">This game originated from the JavaScript Demo file which looked like this<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-11-1024x550.png\" alt=\"\" class=\"wp-image-36\" srcset=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-11-1024x550.png 1024w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-11-300x161.png 300w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-11-768x412.png 768w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-11-1536x824.png 1536w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-11-1200x644.png 1200w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-11.png 1925w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">This is what the game looks like now<\/figcaption><\/figure>\n\n\n\n<p>This is my main focus as our deadline is on the 25th of November, I have used the demo to familiarise myself with how phaser works and am currently using the Phaser api to give myself a solid foundation to improve my code and design a working JavaScript game.<\/p>\n\n\n\n<p>I changed the start to not just give points, but to make the player invincible and give the player a higher shooting rate, this was inspired from Super Mario, and I decided to show that by making the player change colours while the invincibility is in effect.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"441\" src=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-12.png\" alt=\"\" class=\"wp-image-37\" srcset=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-12.png 614w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-12-300x215.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><figcaption class=\"wp-element-caption\">This code shows the invincibility being set and the duration for how long it lasts.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Collision Detection<\/h2>\n\n\n\n<p>This week we also worked on using physics on our sprites and collision detection.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"758\" height=\"279\" src=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-13.png\" alt=\"\" class=\"wp-image-38\" style=\"width:610px;height:224px\" srcset=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-13.png 758w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-13-300x110.png 300w\" sizes=\"auto, (max-width: 758px) 100vw, 758px\" \/><figcaption class=\"wp-element-caption\">This was the axis aligned collision detection that we researched. Axis aligned bounding box collision is a collision type that detects collision between 2 rectangles that have the same axis rotation. This means that rectangles with different rotations cannot be compared.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"562\" src=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-14.png\" alt=\"\" class=\"wp-image-39\" srcset=\"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-14.png 726w, https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2022\/11\/image-14-300x232.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><figcaption class=\"wp-element-caption\">This is the circle collision. With circle collision it will take the radius of the 2 circles and add them together, if the distance between the centre points of the 2 circles is less than the value of the 2 radii\u2019s added together than they are colliding, if the distance is greater than the value then they are not colliding.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This week we were introduced to Phaser, a JavaScript coding utility. This allowed us to simulate physics and arcade type games. Bullet Bro&#8217;s Bullet Bro&#8217;s is the game I decided to make, it&#8217;s a mix of Smash Bros and a Bullet Hell type of game. This is my main focus as our deadline is on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":2,"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":48,"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions\/48"}],"wp:attachment":[{"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danielharris.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}