Can't save when closing game

Okay so this is correct, but you misunderstood one major component : you cannot save other objects.

What you need to do is, save all the variables necessary to rebuild from scratch the state you want. By variables I mean primitive ones, such as strings, floats, integers, and also arrays and structs of primitive variables.

In your case you need to figure out a way to save the state of your map, which seems to be randomly generated, and then player can progress through it. I can see two approaches :

(1) Change your random map generation a bit to use Random With Seed everywhere. When generating a new map, start by generating a Seed, then generate the random map using that seed. Then, you can store the Seed of the map in SaveGame, and when loading, use that Seed to regenerate the map. Afterwards, you need to save which nodes have been visited by player (progression). You can do so with an array of booleans, or something like that. Looks like a bunch of rows, so probably an array of array of booleans. If you need to save more information than just the visited state, make a struct representing the state of a node.

(2) Alternatively (but similarly), don’t touch your random generation, and save everything you need to regenerate the graph, including positions and types (which were randomly generated). Start by making a struct representing the state of a node, including its X,Y position, room type, and visited state (and other things if necessary). Make a “Row” struct which is just an array of nodes. Then in SaveGame store everything into an array of Rows. After loading you should have everything you need to recreate the graph.

The first approach should be easier as you can re-use your existing generation code to rebuild most of it.