{"id":9082,"date":"2022-02-06T20:49:50","date_gmt":"2022-02-06T20:49:50","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=9082"},"modified":"2022-02-06T20:49:50","modified_gmt":"2022-02-06T20:49:50","slug":"p0-b1-part-1022-debugging-improvements","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-b1-part-1022-debugging-improvements\/","title":{"rendered":"P0-B1: Part 1022: Debugging, Improvements"},"content":{"rendered":"\n<p>I have foud, and fixed, a fundamental bug within the project.<\/p>\n\n\n\n<p>This bug was intermittent, and hard to track down. It was caused by the load order of various objects and systems in the project.<br><br>I am using scheduled functions to load all objects, combined with a flag-based system to make sure that one function completes before another starts.<\/p>\n\n\n\n<p>In one case, I was running two functions within the same flag-block, so in some cases one of these functions would complete out of sequence, which would advance the flag to the next state before all objects had loaded in, meaning that the position shift to place the player in the world would occur before all objects had loaded, so those objects would be in the wrong place.<\/p>\n\n\n\n<p>I had to rewrite some of my loading code to handle this situation, which also involved rewriting quite a bit of other code, but I have fixed this problem now.<\/p>\n\n\n\n<p>I don&#8217;t know if this is related to the other issue that I am having with player saved positions ocassionally being wrong, but it could be.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have foud, and fixed, a fundamental bug within the project. This bug was intermittent, and hard to track down. It was caused by the load order of various objects and systems in the project. I am using scheduled functions to load all objects, combined with a flag-based system to make sure that one function [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,28,10,11],"tags":[],"class_list":["post-9082","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-p0_b1","category-software-and-games","category-spiritus-astrum","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/9082"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=9082"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/9082\/revisions"}],"predecessor-version":[{"id":9083,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/9082\/revisions\/9083"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=9082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=9082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=9082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}