{"id":521,"date":"2025-05-09T07:28:40","date_gmt":"2025-05-09T06:28:40","guid":{"rendered":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/?p=521"},"modified":"2025-05-09T11:52:24","modified_gmt":"2025-05-09T10:52:24","slug":"bsc3b-week-17-final-week","status":"publish","type":"post","link":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/2025\/05\/09\/bsc3b-week-17-final-week\/","title":{"rendered":"BSc3b Week 17- Final week"},"content":{"rendered":"\n<h4 class=\"wp-block-heading has-text-align-center\">Day 1- Morning<\/h4>\n\n\n\n<p>Firstly I started of with changing the enemy AI to use navigation invokers to decrease the performance hit that would come with having a large nav mesh with a lot of enemies path finding constantly. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"484\" height=\"786\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-63.png\" alt=\"\" class=\"wp-image-522\" style=\"width:461px;height:auto\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-63.png 484w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-63-185x300.png 185w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/figure>\n\n\n\n<p>Firstly these are the settings for the navigation invoker which only really relevant changes are the generation radius of 1000 and removal radius of 3000 which represents how far around the enemy tiles are generated and how far away the enemy has to move out of radius to start removing tiles.<\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"94\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-64.png\" alt=\"\" class=\"wp-image-523\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-64.png 654w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-64-300x43.png 300w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/figure>\n\n\n\n<p>This is the project settings for the navigation system where because I&#8217;m now using navigation invokers I have enabled generate navigation only around navigation invokers and set the active tiles update interval to 0.4 seconds.<\/p>\n\n\n\n<p><a href=\"https:\/\/blueprintue.com\/blueprint\/nb18xqce\">https:\/\/blueprintue.com\/blueprint\/nb18xqce<\/a><\/p>\n\n\n\n<p>This shows the changes to the free roam logic of the enemy first change being checking if movement is enabled which is related to the activate and deactivate of the nav invoker events (more on them later). <\/p>\n\n\n\n<p>The next changes is when movement is disabled at which point it calls activate nav invoker (calling it evoker is a typo it does get updated later just a minor detail) with a delay then calling free roam. <\/p>\n\n\n\n<p>The next change is after the ai move to node where now both on the success and failure calls top deactivate the nav invoker then calling back to free roam. <\/p>\n\n\n\n<p><a href=\"https:\/\/blueprintue.com\/blueprint\/it1hln7d\">https:\/\/blueprintue.com\/blueprint\/it1hln7d<\/a><\/p>\n\n\n\n<p>This is the logic for both the activation and deactivation of the navigation invoker.<\/p>\n\n\n\n<p>For deactivating it first checks if the distance between the player and enemy location is &lt;= 2000 which if it&#8217;s not then it deactivates the navigation invoker sets movement enabled to false print strings movement disabled (testing purposes to see when the enemies movement is getting disabled) then calls free roam.<\/p>\n\n\n\n<p>For activating it does the same check as deactivating just does it if the condition is true instead it then continues to checking if movement is enabled which if it&#8217;s false activates the navigation invoker sets movement to enabled print strings movement enabled then has a 0.4 second delay (to give time for the nav mesh to update around it) before calling free roam.<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-text-align-center\">Day 1- Afternoon<\/h4>\n\n\n\n<p>Next I added 2 box colliders to every room to act as spawning validators and have changed how the room validation works as shown below.<\/p>\n\n\n\n<p><a href=\"https:\/\/blueprintue.com\/blueprint\/as_-zenc\">https:\/\/blueprintue.com\/blueprint\/as_-zenc<\/a><\/p>\n\n\n\n<p>The start of the blueprint is still the same as it was before changes don&#8217;t start to come until the for each loop after the set actor location node. This loops through all the overlapping actors of 1 of the spawning validator with checking if each is equal to the spawned actor (itself) or the owner of the spawn arrow (the room that spawned it) which if both conditions are false sets invalid room to true.<\/p>\n\n\n\n<p>Once that first loop is complete it goes in to the next for loop which does the exact same thing as the previous one for the after spawning validator.<\/p>\n\n\n\n<p>On the completion of that loop it then checks the value of invalid room which to start simple if is false sets all of the room failed to false and the value of rooms failed to 0 before calling the spawn enemies node that works the same as previously.<\/p>\n\n\n\n<p>On invalid room being true it does a for each loop of the all rooms array to check each of the rooms for which one was the room that failed which when found sets that room to failed if it&#8217;s not already print strings the room failed and increments rooms failed by 1 which then calls for the break of the loop. On complete of the loop it destroys the room that failed then checks if rooms failed is equal to 6 which if false calls back to setting target room to try again. <\/p>\n\n\n\n<p>However if it&#8217;s true print strings no valid room resets all the failed rooms set failed rooms to 0, invalid room to false and print strings the rooms failed which was for testing but is pointless at this point.<\/p>\n\n\n\n<h4 class=\"wp-block-heading has-text-align-center\">Day 2\/last day<\/h4>\n\n\n\n<p>I spent the day playing around with enemy AI fixing the animations so it now can use the Manny animations and playing the attack animation. The fix for the animations was just a simple enabling the use of acceleration for paths in the character movement component. <\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"290\" src=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-66-1024x290.png\" alt=\"\" class=\"wp-image-529\" srcset=\"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-66-1024x290.png 1024w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-66-300x85.png 300w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-66-768x218.png 768w, https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-content\/uploads\/2025\/05\/image-66.png 1442w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is the first and simplest change to the enemy starting with using the same logic the player class uses to attach an enemy sword to the enemy on the begin play of the enemy.<\/p>\n\n\n\n<p><a href=\"https:\/\/blueprintue.com\/blueprint\/_urtdcxd\">https:\/\/blueprintue.com\/blueprint\/_urtdcxd<\/a><\/p>\n\n\n\n<p>This is the only other place with changes in the enemy actor with it now having on success of the AI move to the player character acceptance radius it does once a call to an attack function which plays the enemy swing sword animation montage on complete of that it delays a second and then resets the do once.<\/p>\n\n\n\n<p>Link to the project on Github: <a href=\"https:\/\/github.com\/GeorgeBGames\/FinalProject\">GeorgeBGames\/FinalProject<\/a><\/p>\n\n\n\n<p>Link for specifically commit history: <a href=\"https:\/\/github.com\/GeorgeBGames\/FinalProject\/commits\/main\/\">Commits \u00b7 GeorgeBGames\/FinalProject<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Day 1- Morning Firstly I started of with changing the enemy AI to use navigation invokers to decrease the performance hit that would come with having a large nav mesh with a lot of enemies path finding constantly. Firstly these are the settings for the navigation invoker which only really relevant changes are the generation [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,3],"tags":[],"class_list":["post-521","post","type-post","status-publish","format-standard","hentry","category-bsc3b","category-devlog"],"_links":{"self":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/521","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=521"}],"version-history":[{"count":6,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":532,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/posts\/521\/revisions\/532"}],"wp:attachment":[{"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/georgebaker.nuacomputerscience.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}