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

Re: 2 Player mode



Especially for handheld devices to ensure both use the same version is not that difficult, even that both play the same level might be not a big deal :-)

About the "update model", the history is already only what happens in the last round. Sending this over BT is very fast. Not comparable with the time you wait for the other site to finish its move. And IR isn't much of an option, as the game doesn't work on low-end devices, and Palm for example even tends to skip IRDA in favor for BT in the future devices.


Regards Henk


Patrick O'Hara wrote:
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 <mailto: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



-- ------------------------------------------------------------------------- Henk Jonas Palm OS Â certified developer

  metaview@xxxxxx                                   www.metaviewsoft.de
-------------------------------------------------------------------------