Making a RTS game #46: Saving our game scene data… (Unity/C#)

Today, let’s continue our RTS and discuss serialisation for our game scene data!

Mina Pêcheux
.Net Programming
Published in
9 min readJan 27, 2022

--

⬅️ Tutorial #45: Importing models & animating our characters 2/2 | TOC | Tutorial #47: … and loading back our game scene data! ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

A couple of episodes ago, we prepared a basic main menu to create new game sessions, and we now have a multi-scene workflow with cross-scene data.

But so far, we haven’t discussed how to reload a game once it’s been created!

So, today, we are going to see how to store the important data from our game scene into binary files, just like we did for our game parameters a while ago, so that we can keep track of the current state of our various game sessions. Then, next week, we’ll work on the counterpart and talk about loading back this data from the main menu, with a new “load game” panel.

Note: and afterwards, we’ll see in a bonus interlude how to take advantage of our map minimap screenshot tool to show the games’ updated minimaps :)

A quick peek at our save mechanism

--

--

Mina Pêcheux
.Net Programming

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)