

Vegan Greek food
I just went to the Crazy Little Greek, an 100% vegan Greek restaurant in Berlin and it was delicious 😋 We ordered a Mezze plate for 2, for sure I will come back to try the other options!
Using steam clound save on your game
Hey there, I asked for help on this topic some time ago; unfortunately, I did not get the guidance I needed. So I want to share what I learned and what I did so it can help future devs.
How to sync your game saves on Steam Cloud
Before moving on with the development, there are two important decisions to be made:
- Do you want to use
Steam Auto-CloudorSteam Cloud API?Steam Auto-Cloudis way easier to set up, but has some drawbacks: it does not isolate individual users’ files, so if two Steam accounts are playing on the same computer, they will share their files; it only syncs at launch/exit, whereas with the API you can control when to sync and also benefit from Steam Deck's Dynamic Cloud Sync. Because now I am in the playtesting phase, and I needed it working for next week, I went with theSteam Auto-Cloud, but I do plan to use the API on a later update. - When saving on GameMaker, you should use buffers to be platform agnostic. Here you also have two options:
buffer_saveandbuffer_save_async.The first is useful for light files that will not drop your frame rate while saving (I am using on my audio configuration; see example below). The other is good for saving bigger files; it is what I will use for saving the player’s game progress (here is where you should also add some sort of animated icon and say for the player not to close the game while the saving is happening).
The step is super simple on the Steam Auto-Cloud.
- Install the Steamworks extension from YoYoGames, and do its setup. It is well documented here: Guides · YoYoGames/GMEXT-Steamworks Wiki
- Create something like
oSteamManager, withsteam_update(); onstep eventandsteam_shutdown(); ongame end event. - Turn it on in Steamworks by setting up Steam Cloud configurations, and select the path to sync to the cloud. GameMaker saves in
% localappdata%so you will have in the root path something like:Root: WinAppDataLocal | Subdirectory <Game Name>/cloud | pattern: *.sav | OS: All - When saving in GameMaker, save the file in the same path. Note: it is not good practice to save every configuration on the cloud; for example, screen resolution would break on Steam Deck if the player was playing before on a 4k monitor, so that is why I am saving what needs to sync on the cloud on /cloud
Code example for saving:
function Save_Audio_Settings(){
//Save audio settings
var _saveAudio = {
master: round(audio_get_master_gain(0) * 100),
soundFX: round(audio_group_get_gain(audiogroup_soundEffects) * 100),
music: round(audio_group_get_gain(audiogroup_music)*100),
}
//Turn all this data into a JSON string and save it via buffer
var _string = json_stringify(_saveAudio);
var _buffer = buffer_create(string_byte_length(_string) + 1, buffer_fixed, 1);
buffer_write(_buffer, buffer_string, _string);
buffer_save(_buffer, SAVE_AUDIO);
buffer_delete(_buffer);
}
Code example for loading:
function Load_Audio_Settings(){
if (file_exists(SAVE_AUDIO)) {
var _buffer = buffer_load(SAVE_AUDIO);
var _string = buffer_read(_buffer, buffer_string);
buffer_delete(_buffer);
var _loadData = json_parse(_string);
show_debug_message("Load! " + string(_loadData))
//Apply audio data
audio_master_gain(_loadData.master/100);
audio_group_set_gain(audiogroup_soundEffects, _loadData.soundFX/100);
audio_group_set_gain(audiogroup_music, _loadData.music/100);
}
}
Because I am terrible at writing strings without I typo, I just set a macro for the file location:
#macro SAVE_AUDIO "cloud/audioSettings.sav"
#macro SAVE_VIDEO "videoSettings.sav"
#macro SAVE_CONTROLS "cloud/controlsSettings.sav"
#macro SAVE_UNLOCK_PROGRESS "cloud/unlockProgress.sav"
#macro SAVE_RUN_PROGRESS "cloud/runProgress.sav"
Nepalese vegan food is delicious
The picture is from Dalbhat restaurant in Berlin. The place itself is not fully vegan, but there are plenty of options.
Question about saving
I have been working on a project for around 6 months, so it is already pretty complex, and just now I will implement a saving system. I was looking into tutorials for it and found this video from Sara Spalding: https://www.youtube.com/watch?v=R84mR52QaMg
My questions:
- This video is 6 years old, creating a JSON and saving it buffer is still the way to go on saving on Gamemaker?
- I will be selling my game on steam, and I want it to also save on steam cloud, are there any other things I should consider for the saving system?
Architecture wise I plan to have 4 saving files: 1) graphical settings (saves only locally); 2) sound and controllers settings (saves on cloud); 3) Metaprogression (my game is a roguelike, so this is the progress between runs, also saves on cloud); 4)Run progress (also saves on cloud).
Thanks in advance for the help :)