<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.5726" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thank you for your answer. So if I understand you
correctly regarding the second point, you recommend sending events such as
shooting, jumping etc as reliable packets and then the player state
unreliably a few times a second just in case? My original idea was to have it
shooting off the player state constantly as unreliable packets since it is so
small, and it ensures that you always have the most recent information as no
reliability checks have to be performed.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Let us assume that I want a higher number of
packets per second such as 60 or 70, is it fine to set it to that and then let
ENet take care of limiting the packets if there's too much loss occuring?
Because obviously if a user fires a bullet we want the other user to hear that
almost instantaneously, not 60 milliseconds later if avoidable.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kind regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Philip Bennefall</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=little.coding.fox@gmail.com
href="mailto:little.coding.fox@gmail.com">Nuno Silva</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=enet-discuss@cubik.org
href="mailto:enet-discuss@cubik.org">Discussion of the ENet library</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, October 26, 2009 11:27
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [ENet-discuss] Reliable
packets and data sending approaches</DIV>
<DIV><BR></DIV>Regarding the first part, AFAIK, ENet sends, a sequence number,
so a packet with the same sequence number would be dropped once one of them
has been acknowledged by the peer. So there's no danger in sending the same
packet twice. Just remember, ENet does that for you.<BR><BR>Regarding the
second part, you should use both event-based notifying and unreliable player
movement packets. You should receive and send packets only a few times per
second unless they're events though, like in the Source Engine's networking,
where they send packets 20 times per second regarding user input. 20 times per
second should be a good starting point for you to experiment on.<BR><BR>Good
luck,<BR>Nuno Silva.<BR><BR>
<DIV class=gmail_quote>On Mon, Oct 26, 2009 at 8:31 PM, Philip Bennefall <SPAN
dir=ltr><<A
href="mailto:philip@pbsoundscape.net">philip@pbsoundscape.net</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV bgcolor="#ffffff">
<DIV>
<DIV><FONT face=Arial size=2>Hi Lee and others,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a quick question regarding reliable
packets. Say that user 1 sends a message to user 2 on channel 0, and it gets
through on the first attempt. Does user 2 see the packet immediately or does
ENet wait until the package has been acknowledged? And what happens if user
1 doesn't receive the acknowledgement and then sends the packet again
eventually, and this packet also arrives, might user 2 be given
the same packet twice?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Also I am wondering about the best way of
sending data. I am making a fast paced action game with two players, where
speed is of the utmost importance. Is it best to send individual events when
they occur, or continuously send the entire player state unreliably? If the
latter, how often should I send it? I was thinking at least 40
times a second, as the state isn't larger than some 60 or 70 bytes. Do you
have any recommendations?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kind regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT color=#888888>
<DIV><FONT face=Arial size=2>Philip Bennefall</FONT></DIV></FONT>
<DIV><FONT face=Arial size=2>P.S. I am using the latest
snapshot.</FONT></DIV></DIV></DIV><BR>_______________________________________________<BR>ENet-discuss
mailing list<BR><A
href="mailto:ENet-discuss@cubik.org">ENet-discuss@cubik.org</A><BR><A
href="http://lists.cubik.org/mailman/listinfo/enet-discuss"
target=_blank>http://lists.cubik.org/mailman/listinfo/enet-discuss</A><BR><BR></BLOCKQUOTE></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>ENet-discuss mailing
list<BR>ENet-discuss@cubik.org<BR>http://lists.cubik.org/mailman/listinfo/enet-discuss<BR>
<P>
<HR>
<P></P><BR>No virus found in this incoming message.<BR>Checked by AVG -
www.avg.com <BR>Version: 8.5.423 / Virus Database: 270.14.32/2459 - Release
Date: 10/25/09 19:57:00<BR></BLOCKQUOTE></BODY></HTML>