Skip to content

How does saving work? #97

Answered by VitoBarra
gro-david asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @gro-david, we use a simple system for saving chips: when you save a chip, we serialize and store a JSON representation of everything on the screen, including the current chips, connections, signals, and anchor points for wires.

During the loading process, we first check if the saved data is compatible with the current version. If it isn't, we update the save file accordingly. After that, since a chip may depend on other chips, we reconstruct each chip recursively by instantiating each one and storing the object for later reuse.

If you’d like to explore the code yourself, you can find all the related classes in the Asset/Module/SaveSystem folder. Be aware that there are a few issues, a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gro-david
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants