{"id":7733,"date":"2019-04-21T09:07:52","date_gmt":"2019-04-21T08:07:52","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=7733"},"modified":"2019-04-21T09:07:52","modified_gmt":"2019-04-21T08:07:52","slug":"p0-a3-part-551-server-persistence-debugging","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-a3-part-551-server-persistence-debugging\/","title":{"rendered":"P0-A3: Part 551: Server Persistence, Debugging"},"content":{"rendered":"<p>The server persistence issue is more serious that I thought.<\/p>\n<p>The issue is that in order to create the world I need to use unity&#8217;s transforms (to actually position the objects), but whenever I do this I lose precision. <\/p>\n<p>I can store the actual positions in 64-bit, but I can&#8217;t place the objects with 64-bit precision.<\/p>\n<p>Moving around the world works ok, because I am only adjusting the position of each object by a small amount as the player moves (to keep the players position at the origin), however when the player quits the game and resumes, I need to shift the world by a large amount to match their world space position, which is causing the issue.<\/p>\n<p><a href=\"https:\/\/imgur.com\/CZxWKxI\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/CZxWKxIm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/ivASRne\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/ivASRnem.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/z6bUVkA\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/z6bUVkAm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/yFle8WC\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/yFle8WCm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/VBR0iap\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/VBR0iapm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/hdzayXS\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/hdzayXSm.png\" title=\"source: imgur.com\" \/><\/a><br \/>\n<a href=\"https:\/\/imgur.com\/2A1Xo3g\"><img decoding=\"async\" src=\"https:\/\/i.imgur.com\/2A1Xo3gm.png\" title=\"source: imgur.com\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The server persistence issue is more serious that I thought. The issue is that in order to create the world I need to use unity&#8217;s transforms (to actually position the objects), but whenever I do this I lose precision. I can store the actual positions in 64-bit, but I can&#8217;t place the objects with 64-bit [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,3,17,10,11],"tags":[],"class_list":["post-7733","post","type-post","status-publish","format-standard","hentry","category-a3","category-astral-realms","category-p-0","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\/7733"}],"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=7733"}],"version-history":[{"count":1,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/7733\/revisions"}],"predecessor-version":[{"id":7734,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/7733\/revisions\/7734"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=7733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=7733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=7733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}