[x] Save ESCItems subnodes data by implementing a get_save_data() function and restore_from_save() function in nodes to save data from (eg Sprite/AnimatedSprite in ESCItem)
bug fixes for this list:
[x] Issue 1)
Can't run a particular room directly - have to open the whole game then run a room.
[x] Issue 2)
1) Start the game. New game. Wait until the character is walking as part of the level 1 ESC script automated actions.
2) Save
3) Wait until they are doing the next walk in the automated cycle and then load
The transition out will half run, and then stop with the room mid-transition. The game then reopens with the player in their original start position and no ESC script running. The player is facing front.
[x] Issue 3)
Do the steps for issue 2 above. Once the game has loaded, load again. The player is now approx 100 pixels to the right and facing the right.
[x] Issue 4)
I started from loading the previous save. Look at the left room artwork until he gets to the last option ("NO, Seriously I have no idea what that is"). When the character is partway through (eg. at the end of "No") hit escape and try to save. It doesn't work. In the debug window I can see that it's still processing the speech lines as after a couple of seconds I see this show up as he finishes each of the two lines of text
2022-3-27T112910 (D) esc_statement [Statement ([Object:16739]) was completed.]
2022-3-27T112910 (D) Running command stop with parameters []
2022-3-27T112910 (D) [stop] Return code: 1
2022-3-27T112910 (D) esc_statement [Statement ([Object:16690]) was completed.]
2022-3-27T112910 (D) Event look ended with return code 1
[x] Issue 5)
Start from a new game. From room 1 open room 5. Immediately pick up the spanner. Save. Load.
The spanner is both in your inventory and on the ground. The mouse sees the spanner on the ground but clicking on the mouse does nothing. I'm seeing this error multiple times in the log when trying to interact with the spanner on the ground.
ESCObjectManager.has(): No room specified. Defaulting to current room.
I then used the wrench on the pipe to fix it. Went to room 6 and came back to room 5. The wrench on the ground has disappeared and the mouse no longer notices it when you put the mouse where it used to be.
If I now pick up the pen, then save and load, both pen and wrench are on the floor and in my inventory. Both disappear when I return to the room.
[ ] Issue 6)
I started from issue 5. Pick up the paper. Use pen with paper to make the "filled in form". Save the game. Reload the game.
My inventory contains the wrench, pen and filled in form (not the empty form). Clicking pick up on the paper on the ground results in the paper appearing in my inventory, but the player didn't move anywhere.
[x] Issue 7)
I started from issue 6. Clicked "use" then put my mouse over the inventory (not sure which item). Game crash (a bunch of "nonexistent signal" errors like the screenshot below. I then tried to reproduce it to confirm everything :
Started a fresh new game. Teleport to room 5. Pick up pen, then paper. Use pen with application form. Save. Load (without going back to the game first). Game crashes.
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (D) Running command set_interactive with parameters [r5_empty_sheet, True]
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (D) [set_interactive] Return code: 0
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (D) Running command set_state with parameters [r5_empty_sheet, default, True]
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (W) Can not find node at path
2022-3-27T1213 (D) [set_state] Return code: 0
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (E) Errors in file set_interactive: invalid object
Object with global id r5_filled_sheet not found
![image](https://user-images.githubusercontent.com/5151242/160262282-d5941731-ece2-43b6-b5e2-0aa7ead739b1.png)
- [ ] Issue 8)
The documentation should mention that animations run using an animation player (outside Escoria) with autoplay enabled will start from frame 0 on the reload
- [ ] Issue 9)
set_state animation status not restored properly
I created an ESCItem, gave it a sprite and an AnimationPlayer. I set up an animation "fly" and changed the position of the ESCItem over a 10 second animation.
I updated room01.esc to do
set_state escfly fly
When I start the game it animates as expected. I wait until it's halfway completed its animation and save the game. When I later restart the game, the animation starts from the start rather than halfway through.
- [ ] Issue 10)
New game. Start room 1 and the music starts. If I hit ESC to go to the main menu, the music pauses then restarts when I continue game (as expected). The music stays paused while I save my game.
If I load my game, the music un-pauses immediately (while the transition out from the main menu is displaying). I don't expect it to continue until the transition in starts (or maybe until the transition in completes) - particularly as it glitches during the change_room event.
- [ ] Issue 11)
I've tested adding a different music file to the setup event in room 2, then loading rooms 1 and 2. The correct music starts when you load each room (room 1 loads room 1's music, room 2 loads room 2's music). What does happen though is that the music file plays from the start rather than resuming mid-song.
Now while I don't consider this to be a big issue, it could be in relation to issue 9 above. If issue 9 is fixed (i.e. an animation that was halfway through when saved restarts halfway through) we'd need any sound effects to be restored to their halfway-through state to line up with the visuals.
- [ ] Issue 12)
I merged the room6 branch into issue-102. Start new game, change to room6. Worker is facing downwards (as expected). Go to room 5, go to room 6. Worker is facing down as expected. Save room 6, quit, start demo game again, load room 6 save, worker is facing upward.
- [ ] Issue 13)
Likely the same as issue 4.
Loaded room 7. Pressed a button to move the camera (e.g. the camera_push button). Tried to save while the camera was somewhere other than the player to see what it did on reload. Couldn't save this as the script to move the camera then reset it kept running in the background.
- [ ] Issue 14)
Update "use" in button_push.esc (room 7) to say
:use
camera_push r7_lower_stairs 1 LINEAR
Start new game. Change to room 7. "Use" the "button_push" button to move where the camera points. Save the game.
Load the game. The camera isn't pointing where it was when you saved the game.
- [ ] Issue 15)
I modified the button_push.esc file to have
:use
set_animations player res://game/characters/mark/mark_animations_weird.tres
Start a new game. Change to room 7. "use" the "button_push" button to run the script. You should now have the new animations active.
Save. Quit. Restart. Load the saved game. The animations set is not restored.
- [ ] Issue 16)
I modified the button_push.esc file to have
:use
camera_set_limits 2
Start a new game. Change to room 7. "use" the "button_push" button to run the script. Confirm new camera limits were applied.
Save game. Quit. Re-run the game. Load the save.
The camera limits are not restored.
- [ ] Issue 17)
Start new game. Go to room 2. Use the left button to close the bridge. Save. Go back to the game. Go back to the menu. Load the save. The terrain has reset to the original terrain so you can't cross the closed bridge.
- [ ] Issue 18)
Change the button_push.esc file (room 7) to have
:use
set_speed player 800
New game, change to room 7, push the button, note that you walk really fast. Save the game. Reload. Speed has reset to normal speed.
- [ ] Issue 19)
Room 15 changes the character's costume. Can the active animation set please be saved/restored.
From @balloonpopper's tests on https://github.com/godot-escoria/escoria-demo-game/pull/515
[x] Save object states
[x] Save ESCItems subnodes data by implementing a
get_save_data()
function andrestore_from_save()
function in nodes to save data from (eg Sprite/AnimatedSprite in ESCItem)[x] Issue 1) Can't run a particular room directly - have to open the whole game then run a room.
[x] Issue 2) 1) Start the game. New game. Wait until the character is walking as part of the level 1 ESC script automated actions. 2) Save 3) Wait until they are doing the next walk in the automated cycle and then load
The transition out will half run, and then stop with the room mid-transition. The game then reopens with the player in their original start position and no ESC script running. The player is facing front.
[x] Issue 3) Do the steps for issue 2 above. Once the game has loaded, load again. The player is now approx 100 pixels to the right and facing the right.
[x] Issue 4) I started from loading the previous save. Look at the left room artwork until he gets to the last option ("NO, Seriously I have no idea what that is"). When the character is partway through (eg. at the end of "No") hit escape and try to save. It doesn't work. In the debug window I can see that it's still processing the speech lines as after a couple of seconds I see this show up as he finishes each of the two lines of text
[x] Issue 5) Start from a new game. From room 1 open room 5. Immediately pick up the spanner. Save. Load. The spanner is both in your inventory and on the ground. The mouse sees the spanner on the ground but clicking on the mouse does nothing. I'm seeing this error multiple times in the log when trying to interact with the spanner on the ground.
I then used the wrench on the pipe to fix it. Went to room 6 and came back to room 5. The wrench on the ground has disappeared and the mouse no longer notices it when you put the mouse where it used to be.
If I now pick up the pen, then save and load, both pen and wrench are on the floor and in my inventory. Both disappear when I return to the room.
[ ] Issue 6) I started from issue 5. Pick up the paper. Use pen with paper to make the "filled in form". Save the game. Reload the game. My inventory contains the wrench, pen and filled in form (not the empty form). Clicking pick up on the paper on the ground results in the paper appearing in my inventory, but the player didn't move anywhere.
[x] Issue 7) I started from issue 6. Clicked "use" then put my mouse over the inventory (not sure which item). Game crash (a bunch of "nonexistent signal" errors like the screenshot below. I then tried to reproduce it to confirm everything : Started a fresh new game. Teleport to room 5. Pick up pen, then paper. Use pen with application form. Save. Load (without going back to the game first). Game crashes.
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (D) Running command set_interactive with parameters [r5_empty_sheet, True]
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (D) [set_interactive] Return code: 0
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (D) Running command set_state with parameters [r5_empty_sheet, default, True]
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (W) Can not find node at path
2022-3-27T1213 (D) [set_state] Return code: 0
2022-3-27T1213 (T) ESCObjectManager.has(): No room specified. Defaulting to current room.
2022-3-27T1213 (E) Errors in file set_interactive: invalid object Object with global id r5_filled_sheet not found
set_state escfly fly
:use camera_push r7_lower_stairs 1 LINEAR
:use set_animations player res://game/characters/mark/mark_animations_weird.tres
:use camera_set_limits 2
:use set_speed player 800