Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: Linux saved game crashes client on Solaris (PR#1522)
Home

[Freeciv-Dev] Re: Linux saved game crashes client on Solaris (PR#1522)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Vasco Alexandre Da Silva Costa <vasc@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Linux saved game crashes client on Solaris (PR#1522)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Fri, 31 May 2002 22:21:31 +0200

On Fri, May 31, 2002 at 07:49:58AM -0700, Vasco Alexandre Da Silva Costa wrote:
> On Fri, 31 May 2002, Jules Bean wrote:
> 
> > On Fri, May 31, 2002 at 03:42:50AM -0700, Per I Mathisen wrote:
> > > On Fri, 31 May 2002, Raimar Falke wrote:
> > > > > > Attributes aren't endian safe. CMA uses attributes.
> > > > >
> > > > > Shouldn't they be?  savegames are supposed to be portable?
> > >
> > > > There is no easy way to make this automatic. It would only affect
> > > > clients which switch during a game the architecture. IMHO the
> > > > cost-benefit ratio isn't nice. I would vote to list it as a limitation.
> > >
> > > If we cannot fix endianness of attributes, then we have to detect wrong
> > > endianness, stop freeciv from loading the data, and regenerate it somehow.
> > >
> > > I don't have problem with dropping worklists and recalculating CMA data,
> > > but savegames _must_ be portable, otherwise we cannot have scenarios and
> > > bug reports become more difficult.
> > >
> > > This issue will make attributes less useful if left unsolved, as we always
> > > have to have a backup solution and we cannot save critical data in it.
> >
> > All data which goes over the network or into a file should be network
> > byte order.  This is what most multi-platform games do.  It's not too
> > tricky, I wouldn't have though.
> 
> About savegames and saving integers, outputing in ASCII is pretty
> portable.

The attributes are saved in ASCII (as the whole savegame is
ASCII). But this wasn't your point. I agree that ASCII is nice but
than you have to convert a undetermined deeply nested struct into
ASCII and back. XML fits this nice. 

Currently the agents use memcpy. IMHO the right solution is something
like send_packet and receive_packet functions.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Are you saying that you actually used the Classpath Java AWT classes in 
  addition to the GTK peers and got them to display something?
  Wow.  That's way better than I did and I wrote the code!"
    -- Aaron M. Renn in the classpath mailing list


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