How to Make a Save and Load System in GameMaker

preview_player
Показать описание
In this GameMaker tutorial learn how to code a save and load system into GameMaker. It will work with any game.

You'll learn how to implement:
* Writing and reading variables as text files
* Using structs & JSON
* Saving and loading multiple objects / rooms
* Using buffers

What is GameMaker? 👀
-----------------------------------------------------
GameMaker is the industry’s premier 2D game engine, used by thousands of developers every day to create indie gaming classics like Undertale, Hyper Light Drifter, and Chicory: A Colorful Tale.

It’s completely free to download and keep forever, with dozens of written guides and video tutorials to help you bring your games to life.

When your project is complete, you can publish your creations to all major platforms, including PlayStation 5, Xbox Series X|S, and Nintendo Switch.

Рекомендации по теме
Комментарии
Автор


In this tutorial learn how to code a save and load system into GameMaker. Implement:
* Writing and reading variables as text files
* Using structs & JSON
* Saving and loading multiple objects / rooms
* Using buffers

GameMakerEngine
Автор

Nice timing. I had just finished FriendlyCosmonaut menu tutorials and needed a to learn how to save and load settings. Started looking for a save and load tutorial on this channel and on the website, and came across this video from 6 days ago that I completely missed. Nice one!

teinimon
Автор

This tutorial is missing a few steps, . I wish this tutorial started from the very beginning with the development of the objects as well as the variables included in each object. The tutorial could also have been slowed down, its not a race. I spent so much time adding in a bunch of code, only for that code to be removed and then replaced with a different line of code. I did learn a few new things though, so I can't complain about that. I just really hope that there will be an updated/extended version of this tutorial that skips straight to the proper method as recommended in the video (using buffers).

christopherorestis
Автор

What an excellent video. The progression from simple to complex situations was tremendously helpful, and you covered everything in under 12 minutes.

pzaan
Автор

Thank you.
You just turned the game I'm making and all my future games into proper games. 😀

Widestone
Автор

It was a simple and easy-to-understand tutorial on how to handle JSON and how to save and load files.
However, this method has the problem that when instances are added to or deleted from a room, the save data becomes incompatible.
I understand that to solve this problem, instead of deleting all instances and recreating them when loading, I need to use a method that reflects the saved contents without deleting the instances in the room.
I'm looking forward to a tutorial that clearly explains this.

asamadoCH
Автор

Best tutorial for understanding saving, loading, arrays, structs and using buffer. It finally all fell in place for me. Thank you ever so much for taking the time making it. 🤗

evaisotalo
Автор

Really appreciate these videos. Recently started using game maker and its an amazing toolset.

marcussmithwick
Автор

I always sucked at making saving and loading system 😅 Thanks! ❤

geostargames
Автор

Quick question, How do I find the save.txt in MAC :/

tokensgaming
Автор

I've followed and triple checked everything in the video but I keep getting this error when hitting the save or load key. Variable <unknown_object>.save_game(100030, -2147483648) not set before reading it. Any idea what the issue is here? I tried making the save_game and load_game functions isolated to their own scripts without declaring as a function and that seemed to work but then there appeared to be issues because they weren't in the same script. Seems like it is something related to functions.

dylanmuss
Автор

It doesn't load the states of objects even though I followed this step by step. X and Y coordinations, image index and many other things don't work. It only loads the object's itself.

mrnobody
Автор

Very good!
One question, when exporting the game to Steam or another platform, if someone else takes the game with this .txt saving system and opens the file, will they be able to change the saved data? (examples: character level, upgrades, items, etc.)

pinatranaves
Автор

After saving the game to save.txt the JSON viewer complains that there is an unknown character at the end of the file. I manually removed it (it was not visible, as pressing backspace once made no visible changes to the file), and it now works. But after saving again I get the same error. Does anyone know why?

Here is the error:

Expecting 'EOF', '}', ', ', ']', got 'undefined'

kaspinator
Автор

Since this method works by deleting and recreating objects when loading a save, does that mean that the Instance Creation Code is no longer useable when using this method?

kaspinator
Автор

If you have a very large game with tons of objects each with tons of variables, this video sort of reads like "how to create a beach with one grain of sand at a time." There's gotta be a faster more efficient way of saving the state of the game.

svenjorgensen
Автор

Basically, if we need to save and load for console?

We need to use the async version and what are the differences from console to console?

Thank you!

ajejebrazord
Автор

@GameMakerEngine Please make a Tutorial about Resolution and how to debug in not fullscreen but have to viewport set to 1920x1080 and so on

LPmcGamer
Автор

I started the tutorial and 2 minutes in it isn't doing ANYTHING when i press S, I thought that i would go ahead and download the project to see what I was doing wrong and when i opened it up and pressed S, it also didn't work there??? really confused at the moment, and I would appreciate some feedback

Bretthejet
Автор

My god the pacing is PERFECT. Thank you for this

Palpus_X