adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Game saving


From: Kai Sterker
Subject: Re: [Adonthell-devel] Game saving
Date: Tue, 04 Dec 2001 19:01:50 +0100 (CET)

On 04 Dec 2001 18:37:22 +0100 Alexandre Courbot wrote

> ...and to keep my reputation of pain in the neck ;) I'll speak against
> the key/value format too!

Traitor! ;)


> If we use this format, saved games from prior versions may be
> incomplete. Of course you could fill with default values, but that's not
> safe at all. And what if a key has changed it's signification? We
> couldn't have a totally safe system if we do so, I fear.

We couldn't go without proper version checking, that's for sure.

It's true that (key, value) pairs consume more bandwidth, but they add
additional safety. If you just send the data, you have no way to make sure
that it is assigned to the right variables. With key/value pairs you can
check.

Besides, the key needs not be huge. 2 to 4 characters would be enough.
It'd just would be a matter of the protocol.

I agree that this won't be 100% safe, but I believe it is safer than
sending all the data without any meta information and hope that the other
side will handle it correctly.


> I'd rather suggest we rely on version &
> integrity checking and make converters (that knows what they have to do)
> available. Also, you talked about a checksum to ensure the file is well
> written - provided the OS gives a mechanism that will rise an error if
> an IO issue occured, is this necessary?

The checksum was meant for the integrity check :). 

I talked about I/O errors in connection with file access happening at a
single point in the code. That means we can easily catch and handle any 
IO problems there, like disk full or missing permissions etc ...

Kai





reply via email to

[Prev in Thread] Current Thread [Next in Thread]