So I'm assuming you want synchronization because if
it's off, then more or less of the users scribbles
could be erased when the screen clears, so different
people would wind up seeing different things.

Each message from the client to the server could have
a unique ID(something incrementing so you know which
message comes before which), and when the server fires
the clear screen event, it could also tell the client
which two IDs the clear event occurred between.

This would require the client to keep a buffer of
positions so that it could reconstruct what the user
had drawn after the screen clear, but that shouldn't
be too memory-intensive.

--- Mick G <[EMAIL PROTECTED]> wrote:

> It doesn't have to be constant perfect timing.
> 
> Basically it more of a casual multi-user
> scribble-pad. I only need
> synchronization to automatically clear the canvas
> every 5 minutes. That's
> the only thing that needs to be in sync and it can
> have a second inaccuracy
> but not much more.
> 
> It's working OK now when I get the server time and
> just make it do the
> canvas clear on exactly every 3rd minute, there's
> just about a 2-3 second
> difference and I'm hoping to get that a little more
> accurate somehow.
> 
> 
> On 8/8/07, Joshua Sera <[EMAIL PROTECTED]>
> wrote:
> >
> > Are you trying to do a real-time game? Because
> I've
> > been playing around with real-time games with
> Flash
> > and Java myself in the last month or so, and so
> far,
> > my conclusion is that it's not workable.
> >
> > The big reason being that Flash can't handle UDP
> > packets. TCP/IP is just way too slow to deal with
> > real-time updates, even if you do have a ton of
> > bandwidth, because of how many packets get
> dropped,
> > and TCP/IP's guarantee that packets arrive in
> order.
> > UDP is connectionless, and has no control of when,
> or
> > if the packet arrives, meaning less overhead, and
> less
> > latency.
> >
> > There are 3rd party projectors that have UDP
> > functionality, but then you have to worry about
> > firewalls.
> >
> > To get past the firewalls, you can use UDP hole
> > punching, but that requires a level of control
> over
> > the packet that none of the projector apps offer,
> so
> > basically, if you want to do anything real-time,
> do it
> > in C++, or Java.
> >
> > --- Mick G <[EMAIL PROTECTED]> wrote:
> >
> > > I'm after a little theory here from people who
> have
> > > created multi-player
> > > games before.
> > >
> > > I have a java socket-server in place and all the
> > > functionality of the game
> > > working fine. I just need a way to synchronize
> the
> > > game (as best as I can).
> > >
> > > What I'm trying to do is restart a new game
> every 3
> > > minutes.  I have a way
> > > to get the server-time from the java socket
> server
> > > as a way of getting a
> > > constant time, but there is an inconsistency in
> when
> > > this time is received
> > > (sometimes it takes half a second or even a
> second
> > > from when it leaves the
> > > server to when it hits the client. This causes a
> > > difference at times of up
> > > to 2 seconds for different users.
> > >
> > > Any suggestions on how to handle this?
> > > _______________________________________________
> > > [email protected]
> > > To change your subscription options or search
> the
> > > archive:
> > >
> >
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com
> > > http://training.figleaf.com
> > >
> >
> >
> >
> >
> >      
>
____________________________________________________________________________________
> > Shape Yahoo! in your own image.  Join our Network
> Research Panel today!
> >
>
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
> >
> >
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the
> archive:
> >
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> _______________________________________________
> [email protected]
> To change your subscription options or search the
> archive:
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
> 



       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to