[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: 2 Player mode



The structure of the history elements should be versioned so that two players may not need to have identical versions to play (Obviously they will need to have close to the same version).  Given that this is intended to be intra-game communication, I think binary encoding is fine.  The last point I would make is that communication efficiency is going to be important for handheld (Palm) devices that are communicating with Ird or some similar technology.  Therefore once the connection is established an update model should be used.



--
Tanks for your Support
Pat O'Hara
  _      _      _
 /*\==  /*\==  /*\==
<ooo>  <ooo>  <ooo>  

On 10/10/06, Jens Granseuer <jensgr@xxxxxxx> wrote:
On 10.10.2006 20:26, Henk Jonas wrote:
> Jens Granseuer wrote:
> > The one thing we need dynamicity (?) for is history->Save( buffer ),
> > and string could be wrapped to do that, but it doesn't support
> > SDLNet_Recv( socket, string.c_str(), size )...
> >
>
> Well you first read the header, extract the size info for the following
> data, do a malloc(size) and pass this pointer to SDLNet_Recv.
>
> Why not?

Because it doesn't map nicely to a proper i/o abstraction (reading would
not work symmetrically to writing which is ugly, ugly, ugly; or you'd need
to do some internal bookkeeping to sync the string and the char buffer which
isn't nice, either). Anyway, I've got a simple (though as yet untested)
dynamic buffer class now, so we'll see how that goes.

Jens