Ticket #73 (closed bug: fixed)
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
Change History
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: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
- Attachment BasicSaveLoad.patch added
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.
Changed 9 years ago by kaydeth_parpg
- Attachment save_load.patch added
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
- Attachment logfile.txt added
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.