GameMaker: Studio

GameMaker: Studio

檢視統計資料:
DirectOrder 2015 年 10 月 16 日 上午 5:26
What does game_save() actually save?
In the manual, it says that the game_save function will "not save any of the dynamic resources like data structures, surfaces, added backgrounds and sprites etc". So I assume this means that any ds_lists and arrays need to be saved manually. But what about variables? Do all global variables get saved and restored on load? What about the local variables in each object? What about alarm states? Object IDs (do they get the same IDs on load, or are they dynamically assigned again)? I'm assuming that none of these are saved, but the manual doesn't say anything about it.

If variables are not saved, then what is saved? Just the name of the current room? That's it? The manual is so vague on this it's infuriating :) I was planning on writing my own save system using .ini to save everything (including all variables), but if, by chance, this function already does that, then I'll just focus on saving the lists and arrays....

Can somebody tell me exactly what the game_save function actually saves?
最後修改者:DirectOrder; 2015 年 10 月 16 日 上午 5:48
< >
目前顯示第 1-1 則留言,共 1
FreshWaterFern 2015 年 10 月 22 日 下午 9:12 
It saves the current state of the game but no dynamic resources. So if you have a data structure (which is a dynamic resource), it will not be saved. However your variables declared within objects are kept.

Imagine it like saving the state of a game in an emulator. It literally snapshots the code at where it is currently at. In Game Maker though no dynamic resources are kept.
< >
目前顯示第 1-1 則留言,共 1
每頁顯示: 1530 50

張貼日期: 2015 年 10 月 16 日 上午 5:26
回覆: 1