{"id":1880,"date":"2023-11-27T09:43:51","date_gmt":"2023-11-27T09:43:51","guid":{"rendered":"https:\/\/anaesthetic.pl\/?p=1880"},"modified":"2023-11-27T09:43:51","modified_gmt":"2023-11-27T09:43:51","slug":"save-load-system-implementation","status":"publish","type":"post","link":"https:\/\/anaesthetic.pl\/?p=1880","title":{"rendered":"Save\/load system implementation"},"content":{"rendered":"\n<p>If you neglect the core mechanics of your game for too long, it will become harder to implement. The further you go, the harder it gets, especially if you are learning along the way.<\/p>\n\n\n\n<p>We implemented a save\/load system and survived that test, yet learned our lesson the hard way&#8230; \ud83d\ude09<\/p>\n\n\n\n<p>How does it work&#8230;?<\/p>\n\n\n\n<p>We had a couple of game controllers (player character, UI containing inventory, global volume, etc.) and decided that the easiest way to do this would be to create a global prefab of these controllers (by creating an empty game object, moving all controllers to it, and packaging it as a prefab). Then, we saved and serialized the needed data. On loading, the script instantiates the prefab and applies all the necessary variables to it (inventory, health, player position, etc.).<\/p>\n\n\n\n<p>Soon, you will be able to save and load the game with the new update that we hope to upload directly to Steam (the current build of the game is under review)<\/p>\n\n\n\n<p>We&#8217;ll keep you posted \ud83d\ude09 <\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-text-align-center wp-element-button\" href=\"https:\/\/anaesthetic.pl\/?page_id=1689\">Back to Devlog<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you neglect the core mechanics of your game for too long, it will become harder to implement. The further you go, the harder it gets, especially if you are learning along the way. We implemented a save\/load system and survived that test, yet learned our lesson the hard way&#8230;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1881,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devlog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Save\/load system implementation - Anaesthetic<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/anaesthetic.pl\/?p=1880\" \/>\n<meta property=\"og:locale\" content=\"pl_PL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Save\/load system implementation - Anaesthetic\" \/>\n<meta property=\"og:description\" content=\"If you neglect the core mechanics of your game for too long, it will become harder to implement. The further you go, the harder it gets, especially if you are learning along the way. We implemented a save\/load system and survived that test, yet learned our lesson the hard way&#8230;...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/anaesthetic.pl\/?p=1880\" \/>\n<meta property=\"og:site_name\" content=\"Anaesthetic\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MainProtege\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-27T09:43:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1070\" \/>\n\t<meta property=\"og:image:height\" content=\"304\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Head Protege\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Napisane przez\" \/>\n\t<meta name=\"twitter:data1\" content=\"Head Protege\" \/>\n\t<meta name=\"twitter:label2\" content=\"Szacowany czas czytania\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuta\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880#article\",\"isPartOf\":{\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880\"},\"author\":{\"name\":\"Head Protege\",\"@id\":\"https:\/\/anaesthetic.pl\/#\/schema\/person\/8566f14360534c0581f282a2b579d77e\"},\"headline\":\"Save\/load system implementation\",\"datePublished\":\"2023-11-27T09:43:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880\"},\"wordCount\":175,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/anaesthetic.pl\/#organization\"},\"image\":{\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880#primaryimage\"},\"thumbnailUrl\":\"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png\",\"articleSection\":[\"Devlog\"],\"inLanguage\":\"pl-PL\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880\",\"url\":\"https:\/\/anaesthetic.pl\/?p=1880\",\"name\":\"Save\/load system implementation - Anaesthetic\",\"isPartOf\":{\"@id\":\"https:\/\/anaesthetic.pl\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880#primaryimage\"},\"image\":{\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880#primaryimage\"},\"thumbnailUrl\":\"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png\",\"datePublished\":\"2023-11-27T09:43:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880#breadcrumb\"},\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/anaesthetic.pl\/?p=1880\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880#primaryimage\",\"url\":\"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png\",\"contentUrl\":\"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png\",\"width\":1070,\"height\":304},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/anaesthetic.pl\/?p=1880#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/anaesthetic.pl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Save\/load system implementation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/anaesthetic.pl\/#website\",\"url\":\"https:\/\/anaesthetic.pl\/\",\"name\":\"Anaesthetic\",\"description\":\"Welcome to The Clinic\",\"publisher\":{\"@id\":\"https:\/\/anaesthetic.pl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/anaesthetic.pl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pl-PL\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/anaesthetic.pl\/#organization\",\"name\":\"Anaesthetic\",\"url\":\"https:\/\/anaesthetic.pl\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/anaesthetic.pl\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2024\/04\/logo-\u2014-kopia.jpg\",\"contentUrl\":\"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2024\/04\/logo-\u2014-kopia.jpg\",\"width\":1920,\"height\":1264,\"caption\":\"Anaesthetic\"},\"image\":{\"@id\":\"https:\/\/anaesthetic.pl\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/MainProtege\",\"https:\/\/discord.com\/invite\/K8cjZMDt7p\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/anaesthetic.pl\/#\/schema\/person\/8566f14360534c0581f282a2b579d77e\",\"name\":\"Head Protege\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/anaesthetic.pl\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4fe71978db41d0e032360a6eacbdbb861d72dcd3ee4b3a757296acfeec7639da?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4fe71978db41d0e032360a6eacbdbb861d72dcd3ee4b3a757296acfeec7639da?s=96&d=mm&r=g\",\"caption\":\"Head Protege\"},\"sameAs\":[\"http:\/\/anaesthetic.pl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Save\/load system implementation - Anaesthetic","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/anaesthetic.pl\/?p=1880","og_locale":"pl_PL","og_type":"article","og_title":"Save\/load system implementation - Anaesthetic","og_description":"If you neglect the core mechanics of your game for too long, it will become harder to implement. The further you go, the harder it gets, especially if you are learning along the way. We implemented a save\/load system and survived that test, yet learned our lesson the hard way&#8230;...","og_url":"https:\/\/anaesthetic.pl\/?p=1880","og_site_name":"Anaesthetic","article_publisher":"https:\/\/www.facebook.com\/MainProtege","article_published_time":"2023-11-27T09:43:51+00:00","og_image":[{"width":1070,"height":304,"url":"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png","type":"image\/png"}],"author":"Head Protege","twitter_card":"summary_large_image","twitter_misc":{"Napisane przez":"Head Protege","Szacowany czas czytania":"1 minuta"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/anaesthetic.pl\/?p=1880#article","isPartOf":{"@id":"https:\/\/anaesthetic.pl\/?p=1880"},"author":{"name":"Head Protege","@id":"https:\/\/anaesthetic.pl\/#\/schema\/person\/8566f14360534c0581f282a2b579d77e"},"headline":"Save\/load system implementation","datePublished":"2023-11-27T09:43:51+00:00","mainEntityOfPage":{"@id":"https:\/\/anaesthetic.pl\/?p=1880"},"wordCount":175,"commentCount":0,"publisher":{"@id":"https:\/\/anaesthetic.pl\/#organization"},"image":{"@id":"https:\/\/anaesthetic.pl\/?p=1880#primaryimage"},"thumbnailUrl":"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png","articleSection":["Devlog"],"inLanguage":"pl-PL"},{"@type":"WebPage","@id":"https:\/\/anaesthetic.pl\/?p=1880","url":"https:\/\/anaesthetic.pl\/?p=1880","name":"Save\/load system implementation - Anaesthetic","isPartOf":{"@id":"https:\/\/anaesthetic.pl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/anaesthetic.pl\/?p=1880#primaryimage"},"image":{"@id":"https:\/\/anaesthetic.pl\/?p=1880#primaryimage"},"thumbnailUrl":"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png","datePublished":"2023-11-27T09:43:51+00:00","breadcrumb":{"@id":"https:\/\/anaesthetic.pl\/?p=1880#breadcrumb"},"inLanguage":"pl-PL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/anaesthetic.pl\/?p=1880"]}]},{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/anaesthetic.pl\/?p=1880#primaryimage","url":"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png","contentUrl":"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2023\/11\/obraz_2023-11-27_104344499.png","width":1070,"height":304},{"@type":"BreadcrumbList","@id":"https:\/\/anaesthetic.pl\/?p=1880#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/anaesthetic.pl\/"},{"@type":"ListItem","position":2,"name":"Save\/load system implementation"}]},{"@type":"WebSite","@id":"https:\/\/anaesthetic.pl\/#website","url":"https:\/\/anaesthetic.pl\/","name":"Anaesthetic","description":"Welcome to The Clinic","publisher":{"@id":"https:\/\/anaesthetic.pl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/anaesthetic.pl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pl-PL"},{"@type":"Organization","@id":"https:\/\/anaesthetic.pl\/#organization","name":"Anaesthetic","url":"https:\/\/anaesthetic.pl\/","logo":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/anaesthetic.pl\/#\/schema\/logo\/image\/","url":"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2024\/04\/logo-\u2014-kopia.jpg","contentUrl":"https:\/\/anaesthetic.pl\/wp-content\/uploads\/2024\/04\/logo-\u2014-kopia.jpg","width":1920,"height":1264,"caption":"Anaesthetic"},"image":{"@id":"https:\/\/anaesthetic.pl\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MainProtege","https:\/\/discord.com\/invite\/K8cjZMDt7p"]},{"@type":"Person","@id":"https:\/\/anaesthetic.pl\/#\/schema\/person\/8566f14360534c0581f282a2b579d77e","name":"Head Protege","image":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/anaesthetic.pl\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4fe71978db41d0e032360a6eacbdbb861d72dcd3ee4b3a757296acfeec7639da?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4fe71978db41d0e032360a6eacbdbb861d72dcd3ee4b3a757296acfeec7639da?s=96&d=mm&r=g","caption":"Head Protege"},"sameAs":["http:\/\/anaesthetic.pl"]}]}},"_links":{"self":[{"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=\/wp\/v2\/posts\/1880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1880"}],"version-history":[{"count":1,"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=\/wp\/v2\/posts\/1880\/revisions"}],"predecessor-version":[{"id":1882,"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=\/wp\/v2\/posts\/1880\/revisions\/1882"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=\/wp\/v2\/media\/1881"}],"wp:attachment":[{"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anaesthetic.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}