<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Hanami Devlog]]></provider_name><provider_url><![CDATA[https://electromagneticproject.wordpress.com]]></provider_url><author_name><![CDATA[push start to begin]]></author_name><author_url><![CDATA[https://electromagneticproject.wordpress.com/author/pushstarttobegin/]]></author_url><title><![CDATA[Save/Load Functions]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>The tricky part of implementing a save/load system is the painful process of working out what Game Maker will and won&#8217;t do using its default <em>game_save();</em> and <em>game_load();</em> functions.</p>
<p>Based on my original inventory menu, I&#8217;ve created two new menus in a similar style which represent the save menu, which is brought up by pressing the menu button at a save point, and a pause menu, which is brought up by pressing return/start and can be used to load up a saved game.</p>
<p><div data-shortcode="caption" id="attachment_1417" style="width: 274px" class="wp-caption aligncenter"><a href="https://electromagneticproject.files.wordpress.com/2012/04/save-game.png"><img loading="lazy" aria-describedby="caption-attachment-1417" data-attachment-id="1417" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/save-game/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/save-game.png" data-orig-size="264,130" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Save Game" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/save-game.png?w=264" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/save-game.png?w=264" src="https://electromagneticproject.files.wordpress.com/2012/04/save-game.png?w=264&#038;h=130" alt="" title="Save Game" width="264" height="130" class="size-full wp-image-1417" srcset="https://electromagneticproject.files.wordpress.com/2012/04/save-game.png 264w, https://electromagneticproject.files.wordpress.com/2012/04/save-game.png?w=150&amp;h=74 150w" sizes="(max-width: 264px) 100vw, 264px" /></a><p id="caption-attachment-1417" class="wp-caption-text">Save Menu</p></div><br />
<div data-shortcode="caption" id="attachment_1418" style="width: 274px" class="wp-caption aligncenter"><a href="https://electromagneticproject.files.wordpress.com/2012/04/pause-menu.png"><img loading="lazy" aria-describedby="caption-attachment-1418" data-attachment-id="1418" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/pause-menu/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/pause-menu.png" data-orig-size="264,154" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Pause Menu" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/pause-menu.png?w=264" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/pause-menu.png?w=264" src="https://electromagneticproject.files.wordpress.com/2012/04/pause-menu.png?w=264&#038;h=154" alt="" title="Pause Menu" width="264" height="154" class="size-full wp-image-1418" srcset="https://electromagneticproject.files.wordpress.com/2012/04/pause-menu.png 264w, https://electromagneticproject.files.wordpress.com/2012/04/pause-menu.png?w=150&amp;h=88 150w" sizes="(max-width: 264px) 100vw, 264px" /></a><p id="caption-attachment-1418" class="wp-caption-text">Pause Menu</p></div><br />
To activate these menus, I&#8217;ve used a similar set of code to that used to activate the inventory menu. In the case of the save menu, when the player is in contact with a save point object and presses &#8220;S&#8221;, all objects are deactivated and a temporary overlay is created from a still image of the background. The object <em>obj_save</em> is then created, which draws the save menu onto the screen.</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg"><img loading="lazy" data-attachment-id="1420" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/furin-object/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg" data-orig-size="769,457" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Furin Object" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg?w=769" src="https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg?w=640&#038;h=380" alt="" title="Furin Object" width="640" height="380" class="aligncenter size-full wp-image-1420" srcset="https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg?w=640&amp;h=380 640w, https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg?w=150&amp;h=89 150w, https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg?w=300&amp;h=178 300w, https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg?w=768&amp;h=456 768w, https://electromagneticproject.files.wordpress.com/2012/04/furin-object.jpg 769w" sizes="(max-width: 640px) 100vw, 640px" /></a><br />
I&#8217;ve included the object <em>obj_save</em> in my list of instances that are created when the game is started. When initiated by the save point object, it changes the state <em>global.save</em> from 0 (false) to 1 (true), and draws the menu sprite onto the screen as well as the highlight sprite which changes position when the left and right keys are pressed. The options in the save menu are the same size and shape as the menu slots in the inventory menu, so I was able to use the same highlight sprite for this menu. Like the inventory menu, each &#8220;slot&#8221; (s) is given a value, in this case because there are only two options the values are 0 and 1. If <em>s</em> is 0 when the X button is pressed, the game is saved. If <em>s</em> is 1 when the X button is pressed, the game returns- pauseon and global.save are both reset to 0. Game Maker uses a simple one line of code to save games: <em>game_save(&#8220;example.sav&#8221;);</em>. However, there are many things that aren&#8217;t included in this save file. I already discovered a while ago that temporary datastructures, such as the item lists I use to hold information about collected blossoms, are not saved in save files. To save this information, I&#8217;ve had to save each list as a separate text file, so the save code has become quite extensive!</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg"><img loading="lazy" data-attachment-id="1422" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/save-code/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg" data-orig-size="851,497" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Save Code" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg?w=851" src="https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg?w=640&#038;h=373" alt="" title="Save Code" width="640" height="373" class="aligncenter size-full wp-image-1422" srcset="https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg?w=640&amp;h=373 640w, https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg?w=150&amp;h=88 150w, https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg?w=300&amp;h=175 300w, https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg?w=768&amp;h=449 768w, https://electromagneticproject.files.wordpress.com/2012/04/save-code.jpg 851w" sizes="(max-width: 640px) 100vw, 640px" /></a><br />
The game here is saved as a file called <em>hanamisav.sav</em> in a designated folder called &#8220;save&#8221;. I made this empty folder to test if this save function would work, and sure enough the files appeared in the folder straight away.</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg"><img loading="lazy" data-attachment-id="1424" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/newsave/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg" data-orig-size="851,497" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="NewSave" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg?w=851" src="https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg?w=640&#038;h=373" alt="" title="NewSave" width="640" height="373" class="aligncenter size-full wp-image-1424" srcset="https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg?w=640&amp;h=373 640w, https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg?w=150&amp;h=88 150w, https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg?w=300&amp;h=175 300w, https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg?w=768&amp;h=449 768w, https://electromagneticproject.files.wordpress.com/2012/04/newsave.jpg 851w" sizes="(max-width: 640px) 100vw, 640px" /></a><br />
<a href="https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg"><img loading="lazy" data-attachment-id="1425" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/save-folder/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg" data-orig-size="698,579" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Save Folder" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg?w=698" src="https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg?w=640&#038;h=530" alt="" title="Save Folder" width="640" height="530" class="aligncenter size-full wp-image-1425" srcset="https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg?w=640&amp;h=530 640w, https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg?w=150&amp;h=124 150w, https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg?w=300&amp;h=249 300w, https://electromagneticproject.files.wordpress.com/2012/04/save-folder.jpg 698w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>As a symbol of the game being saved, I&#8217;ve made a floppy disc icon which appears at the top of the screen whenever the player opts to save or the game is autosaved. The floppy disc seems to be the universal symbol for &#8220;save&#8221;, whether used as an icon in software such as Game Maker or as a save point in games such as Cave Story!</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg"><img loading="lazy" data-attachment-id="1427" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/game-maker-floppy/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg" data-orig-size="527,52" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Game Maker Floppy" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg?w=527" src="https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg?w=527&#038;h=52" alt="" title="Game Maker Floppy" width="527" height="52" class="aligncenter size-full wp-image-1427" srcset="https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg 527w, https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg?w=150&amp;h=15 150w, https://electromagneticproject.files.wordpress.com/2012/04/game-maker-floppy.jpg?w=300&amp;h=30 300w" sizes="(max-width: 527px) 100vw, 527px" /></a><br />
<a href="https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg"><img loading="lazy" data-attachment-id="1428" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/cave-story-floppy/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg" data-orig-size="527,52" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Cave Story Floppy" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg?w=527" src="https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg?w=527&#038;h=52" alt="" title="Cave Story Floppy" width="527" height="52" class="aligncenter size-full wp-image-1428" srcset="https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg 527w, https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg?w=150&amp;h=15 150w, https://electromagneticproject.files.wordpress.com/2012/04/cave-story-floppy.jpg?w=300&amp;h=30 300w" sizes="(max-width: 527px) 100vw, 527px" /></a><br />
On my floppy disc icon, I&#8217;ve included the kanji I discovered before for &#8220;to save&#8221;. This is supposed to look like it written on the standard lined label that you used to get with blank floppies. Like the sushi icon which appears temporarily at the top of the screen, this icon remains for about three seconds before disappearing.</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/save-icon.jpg"><img loading="lazy" data-attachment-id="1430" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/save-icon/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/save-icon.jpg" data-orig-size="66,66" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Save Icon" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/save-icon.jpg?w=66" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/save-icon.jpg?w=66" src="https://electromagneticproject.files.wordpress.com/2012/04/save-icon.jpg?w=66&#038;h=66" alt="" title="Save Icon" width="66" height="66" class="aligncenter size-full wp-image-1430" /></a><br />
I&#8217;ve assigned the pause menu to the return key or start button on the SNES controller. Pressing either of these buttons will do exactly the save as all pause functions I&#8217;ve implemented so far, but will draw the pause menu sprite onto the screen. The options are actual strings of text which are drawn over the top of this sprite, according to the array I&#8217;ve set up in the object <em>obj_pause</em>.</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg"><img loading="lazy" data-attachment-id="1432" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/pause-code-1/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg" data-orig-size="757,378" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Pause Code 1" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg?w=757" src="https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg?w=640&#038;h=319" alt="" title="Pause Code 1" width="640" height="319" class="aligncenter size-full wp-image-1432" srcset="https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg?w=640&amp;h=319 640w, https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg?w=150&amp;h=75 150w, https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg?w=300&amp;h=150 300w, https://electromagneticproject.files.wordpress.com/2012/04/pause-code-1.jpg 757w" sizes="(max-width: 640px) 100vw, 640px" /></a><br />
This list of text acts differently to the slots I&#8217;ve used in my previous two menus, so I wasn&#8217;t able to use the same highlight sprite to hover over options in this case. Instead, I&#8217;ve used two different colours to show whether the text is highlighted or not. The lighter colour shows the option currently selected.</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg"><img loading="lazy" data-attachment-id="1434" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/loadgame/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg" data-orig-size="912,613" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="LoadGame" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg?w=912" src="https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg?w=640&#038;h=430" alt="" title="LoadGame" width="640" height="430" class="aligncenter size-full wp-image-1434" srcset="https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg?w=640&amp;h=430 640w, https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg?w=150&amp;h=101 150w, https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg?w=300&amp;h=202 300w, https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg?w=768&amp;h=516 768w, https://electromagneticproject.files.wordpress.com/2012/04/loadgame.jpg 912w" sizes="(max-width: 640px) 100vw, 640px" /></a><br />
At the moment, both the &#8220;continue&#8221; and &#8220;main menu&#8221; options will simply resume the game, as I don&#8217;t have anything that acts as a main menu yet! I may later change this option to &#8220;quit&#8221;, and simply make it close the game. To load the game, I&#8217;ve had to make sure that all five files are loaded and properly restored. I&#8217;ve written out the code in the opposite way to the save code, so that each text file is loaded then applied to one of my global.itemLists. As for the rest of the game&#8217;s properties, I&#8217;ve so far relied on the default <em>game_load(&#8220;save/hanamisav.sav&#8221;);</em> function to restore everything else.</p>
<p><a href="https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg"><img loading="lazy" data-attachment-id="1433" data-permalink="https://electromagneticproject.wordpress.com/2012/04/02/saveload-functions/loadgamecode/" data-orig-file="https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg" data-orig-size="912,613" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="LoadGameCode" data-image-description="" data-medium-file="https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg?w=300" data-large-file="https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg?w=912" src="https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg?w=640&#038;h=430" alt="" title="LoadGameCode" width="640" height="430" class="aligncenter size-full wp-image-1433" srcset="https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg?w=640&amp;h=430 640w, https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg?w=150&amp;h=101 150w, https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg?w=300&amp;h=202 300w, https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg?w=768&amp;h=516 768w, https://electromagneticproject.files.wordpress.com/2012/04/loadgamecode.jpg 912w" sizes="(max-width: 640px) 100vw, 640px" /></a></p>
<p>Loading the game shows some&#8230;.interesting results. Each of the text files are actually restored properly, this was the part that I was mainly worried about! Everything in the GUI returns to exactly how you left it, including level progress, health and collected sushi. However, I&#8217;ve noticed a couple of things that the aren&#8217;t restored properly due to faults in the default Game Maker save file. The sounds aren&#8217;t loaded, possibly because the SuperSound.dll doesn&#8217;t exist in the &#8220;Save&#8221; folder, and weirdly enough the mushroom&#8217;s particle system isn&#8217;t restored. Another MAJOR issue is that 8 times out of 10, the game will crash after you&#8217;ve taken a few steps from the restore point. Of the remaining 2 times out of 10, 1 of those will produce an error message stating that a non-existing background cannot be deleted, which is probably due to a fault in my code for the temporary pause background. Because of these problems, I&#8217;m going to look at alternative ways of saving that don&#8217;t use the default save functions. I may also make slight tweaks to the menu interfaces, but not too much.</p>
]]></html><thumbnail_url><![CDATA[https://electromagneticproject.files.wordpress.com/2012/04/save-game.png?fit=440%2C330]]></thumbnail_url><thumbnail_width><![CDATA[]]></thumbnail_width><thumbnail_height><![CDATA[]]></thumbnail_height></oembed>