Regarding Save Game Function

Discussion and feedback on Construct 2

Post » Sun Mar 30, 2014 4:08 am

1. Is "save game" functionality intra-frame or post-frame? Which of the following are correct?

A. Post-frame: When "save game" action is called, after all events in this frame (or tick, if you prefer) have finished executing, all data in this particular frame are saved.

B. Intra-frame: When "save game" action is called, all data in this particular frame are saved, right when "save game" is called. This implies, if there is another variable set after "save game", that variable will not have this value in the saved data. However, when "load game" is called, the actions and events after "save game" action will be executed, along with "on load complete" trigger in the next frame.

C. None of the above.


2. I am curious about internal working of "save game" functionality. Is the following paragraph correct?

When "save game" action is called, a separate thread is created. Since saving might not be complete in one game frame, and to ensure that there is no hiccup, a copy of all data is created right on the frame that "save game" is invoked. This halts the game execution until all data are copied. The thread for "save game" then write everything down with the copy of all data, and call "on save complete" afterward.
I got a game that you multiply, breath fire with two heads and brawl foes to oblivion with your clones: http://www.newgrounds.com/portal/view/660664 (use Chrome on Windows for best performance)

My sites:
http://twinblazar.deviantart.com
http://twinblazar.newgrounds.com
https://twitter.com/twinblazar
http://www.pixiv.net/member.php?id=15072448
B
30
S
11
G
11
Posts: 411
Reputation: 8,469

Return to Construct 2 General

Who is online

Users browsing this forum: dop2000 and 3 guests