![]() |
#21 | |
Veteran
Join Date: Apr 2007
Posts: 1,947
Donated: $40
![]() |
Quote:
__________________
takkaria whispers something about options. -more- |
|
![]() |
![]() |
![]() |
#22 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,913
Donated: $40
![]() |
Tak--
In concert with a compression library, human-readable save files might work. It is IO that is slowest, tho decimal-binary conversion still remains a hog.* Xml machine-encoding schemes are a possibility; they are widely used as a compromise between human readability (ASCII), schema conservation (XML), and performance in both disk and CPU. Here is one written in C. http://exip.sourceforge.net The most elegant, though, would be to use the existing parser model to read and write the save file. You'd have to flatten the various lists--one for dungeon architecture, other for monsters, objects, inventory, and player stats. As a matter of fact... maybe i should give it a try. * even in CPU-heavy apps, decimal conversion takes something like 50% of processor time. |
![]() |
![]() |
![]() |
#23 |
Veteran
Join Date: Apr 2007
Posts: 1,947
Donated: $40
![]() |
I don't really see the value in re-engineering the savefile code. It would add a load of weight and complexity to achieve the same result, and the advantages (which are minimal) don't seem worth it. But I'm not in charge anymore
![]()
__________________
takkaria whispers something about options. -more- |
![]() |
![]() |
![]() |
#24 |
Adept
Join Date: May 2007
Posts: 170
![]() |
Another approach could be to modify the wr_byte and such functions to write readable representation of the data. We could write # comments in the savefile to separate the big sections if someone needs to locate something in the generated code. Its a compromise solution.
|
![]() |
![]() |
![]() |
#25 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,913
Donated: $40
![]() |
Tak--using parse models is a lot more robust to code changes. In essence, the read and write parts of the savefile share schema logic.
|
![]() |
![]() |
![]() |
#26 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,592
Donated: $60
![]() |
A large part of the savefile is byte encoding of dungeon levels, which have no relationship to the parser. I'm with takkaria on this one - I can see it might be an advantage to have human-readable savefiles, but it would be a large amount of work and it's low on my priority list.
__________________
One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. |
![]() |
![]() |
![]() |
#27 |
Apprentice
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
![]() |
Besides, there ought to be some things only a wizard can do. Union rules and all.
![]() |
![]() |
![]() |
![]() |
#28 |
Knight
Join Date: Nov 2008
Posts: 753
![]() |
It could be worth it if the human-readable savefiles were also less prone to being broken by updates to the game. (Not that human-readable code would be the only way to achieve that; but it might be a way.)
__________________
The Complainer worries about the lack of activity here these days. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restore Lost Life | DavidMedley | Vanilla | 18 | December 6, 2019 20:46 |
Whatever happened to 'restore artifact'? | Gram | Vanilla | 71 | December 1, 2015 15:06 |
Is there a way to Restore my Game? | Bombadil | Vanilla | 4 | September 30, 2012 19:26 |
How to restore lowered stat? | rythin | Vanilla | 21 | August 28, 2010 16:26 |
Drained stats, how to restore? | Zambaku | Vanilla | 2 | January 3, 2008 13:22 |