Modify

Ticket #73 (closed bug: fixed)

Opened 10 years ago

Last modified 9 years ago

Saving/Loading of the game does not work

Reported by: Kaydeth_parpg Owned by: kaydeth_parpg
Priority: major Milestone: Techdemo 1
Component: scripts Version: trunk
Keywords: Cc:
Blocked By: Blocking:
Department:

Description

The Saving/Loading? functionality needs to be fixed. It was broken by some code rework.

Attachments

BasicSaveLoad.patch (4.7 KB) - added by rexiebaby 9 years ago.
Game no longer crashes during save/load or map changes. NPC and PC position information are NOT saved.
save_load.patch (11.0 KB) - added by kaydeth_parpg 9 years ago.
current state of work. Just posting it here so I can transfer it home.
logfile.txt (28.5 KB) - added by barra_parpg 9 years ago.
Logfile of segfault when trying to save with SVN r397

Change History

comment:1 Changed 10 years ago by bretzel_parpg

  • Owner changed from parpg to bretzel_parpg

comment:1 Changed 10 years ago by Kaydeth_parpg

  • Milestone changed from Techdemo 1 to Milestone 1

comment:2 Changed 9 years ago by bretzel_parpg

  • Owner changed from bretzel_parpg to parpg

comment:4 Changed 9 years ago by eliedebrauwer

(In [302]) Ticket #73: Patch by Elie De Brauwer, partial fix of load/save, this fixes the map load failure but does not fix the failure to load/save PC and NPC behaviour refs #73

comment:5 Changed 9 years ago by eliedebrauwer

At this point there seem to be two problems related to the load/save. The first and most trivial one that the map load requires a map name and a map filename while only the filename was available. This was added to the gamestate but also required a fix not to load the map if it was already loaded.

The second part of the fix (which still needs to be done) is in engine.py, the save() function sets all behaviours of PC's and NPC's to None, so that data is lost. They are set to none since pickle can't serialize/deserialize SwigPyObjects?. And in our case ActorBehaviour? is a subclass of fife.InstanceActionListener? (and hence the guilty one) (see objects/actors.py).

comment:6 Changed 9 years ago by kaydeth_parpg

  • Owner changed from parpg to eliedebrauwer

comment:7 Changed 9 years ago by eliedebrauwer

(In [319]) Ticket #73: Patch by eliedebrauwer. Fixed save to match the recent adaptations to gamestate.py, load is still WIP. refs #73

comment:8 Changed 9 years ago by eliedebrauwer

(In [323]) Ticket #73: Patch by eliedebrauwer, removed obj_hashes from world, and from the maps, added logic to restore PC and NPC behaviour based on the layer ID, added logic to trigger the map load using within the pump(). Load still not functional. refs #73

comment:9 Changed 9 years ago by eliedebrauwer

At this point we still need to reload the actual map and while doing this use objects from the gamestate.

Changed 9 years ago by rexiebaby

Game no longer crashes during save/load or map changes. NPC and PC position information are NOT saved.

comment:10 Changed 9 years ago by eliedebrauwer

  • Owner changed from eliedebrauwer to parpg

rexiebaby, I took a quick look at your patch, and I think that at this point it will break teleport (teleport which also has recently changed) so at this point I won't apply your patch till we get that sorted out.

General note, reassigning bug to parpg, to give other people the chance to take a look at it.

comment:11 Changed 9 years ago by kaydeth_parpg

  • Owner changed from parpg to kaydeth_parpg

Changed 9 years ago by kaydeth_parpg

current state of work. Just posting it here so I can transfer it home.

comment:12 Changed 9 years ago by Kaydeth_parpg

  • Status changed from new to closed
  • Resolution set to fixed

(In [356]) Ticket #73. Patch by Kaydeth. Most of the changes were made to the map loading logic in the Engine, World, and Map classes to make sure it could handle loading maps after the game state has been restored by a load game. Also added a floating door back to both maps so map changing can still be tested in game. closes #73

comment:13 Changed 9 years ago by barra_parpg

  • Status changed from closed to reopened
  • Resolution fixed deleted

Saving is broken again right now; confirmed for SVN revision 397.

Whenever you try to save the game from the ingame interface, PARPG will segfault. Log attached.

Changed 9 years ago by barra_parpg

Logfile of segfault when trying to save with SVN r397

comment:14 Changed 9 years ago by kaydeth_parpg

  • Status changed from reopened to closed
  • Resolution set to fixed

The new problem with saving/loading has been identified and a root cause has been found in ticket #200. The problem will be handled in the new ticket.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.