Brutal Legend sends 30 updates a second for 4 players or less reliably with no problems.  For 5 or more, we go down to 15 packets a second (although each packet contains 2 game-messages) to reduce the UDP/VDP/eNet overhead.  If you're sending this many updates, the main consumer of bandwidth is the headers, so be very careful that you're sending your enet ACKs in the same packet as your next send.  You can tell if this is the case using any wire sniffer and seeing if you're firing 30 or 60 UDP frames per second.  If it's 60, you need to process incoming messages before sending new ones and flushing.<br>
<br><div class="gmail_quote">On Tue, Nov 23, 2010 at 2:22 PM, Chris Meub <span dir="ltr"><<a href="mailto:chrismeub@gmail.com">chrismeub@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Does anyone have experience using enet with a multiplayer game sending<br>
reliable packets ~20 times a second or more?<br>
I imagine most people sending that many packets are using unreliable.<br>
<div><div></div><div class="h5"><br>
On Sun, Nov 21, 2010 at 6:01 PM, Lee Salzman <<a href="mailto:lsalzman@gmail.com">lsalzman@gmail.com</a>> wrote:<br>
> No, the point is to get all available packets in this frame and not stall,<br>
> i.e. it is polling. You wouldn't use a non-zero timeout in a game's client<br>
> loop like that.<br>
><br>
> Lee<br>
><br>
> On 11/21/2010 02:31 PM, Mark Palkow wrote:<br>
><br>
> Couldn't the problem be<br>
><br>
> while( enet_host_service (client, & event, 0) > 0 )<br>
><br>
> because it takes all the CPU (100%)?<br>
> shouldn't it be something like:<br>
><br>
> while( enet_host_service (client, & event, 10) > 0 )<br>
><br>
> so that the CPU gets a chance to handle other task like the network stack?<br>
> regards Mark<br>
><br>
><br>
><br>
> -----Ursprüngliche Nachricht-----<br>
> Von: <a href="mailto:enet-discuss-bounces@cubik.org">enet-discuss-bounces@cubik.org</a> [mailto:<a href="mailto:enet-discuss-bounces@cubik.org">enet-discuss-bounces@cubik.org</a>]<br>
> Im Auftrag von Chris Meub<br>
> Gesendet: Sonntag, 21. November 2010 08:39<br>
> An: Discussion of the ENet library<br>
> Betreff: Re: [ENet-discuss] 4 seconds stalls.. congestion problem?<br>
><br>
> I am doing this every 1/60th second:<br>
><br>
>    while( enet_host_service (client, & event, 0) > 0 )<br>
>    {<br>
>          switch (event.type)<br>
>          {<br>
>               case ENET_EVENT_TYPE_RECEIVE:<br>
>                       // ( handle packet )<br>
>                       enet_packet_destroy (event.packet);<br>
>                       break;<br>
>                 case ENET_EVENT_TYPE_DISCONNECT: // (handle disconnect here)<br>
>        }<br>
>    }<br>
><br>
> As I understand it that will process all available events.<br>
><br>
> On Sat, Nov 20, 2010 at 9:47 PM, Lee Salzman <<a href="mailto:lsalzman@gmail.com">lsalzman@gmail.com</a>> wrote:<br>
><br>
><br>
> In the client, make sure you repeatedly call enet_host_service() until it<br>
> returns no events, otherwise it may possibly not service the network at<br>
><br>
><br>
> all<br>
><br>
><br>
> if it gets backlogged.<br>
><br>
> Lee<br>
><br>
> On 11/20/2010 07:41 PM, Chris Meub wrote:<br>
><br>
> It does *not* exhibit the stalling behavior when I run on LAN or on<br>
> the same machine.<br>
><br>
> On Sat, Nov 20, 2010 at 6:44 PM, Jay Sprenkle <<a href="mailto:jsprenkle@gmail.com">jsprenkle@gmail.com</a>> wrote:<br>
><br>
><br>
> Have you tried running both on the same physical machine, or on two<br>
><br>
><br>
> machines<br>
><br>
><br>
> within your control?<br>
> Perhaps it's caused by comcast equipment.<br>
><br>
> On Sat, Nov 20, 2010 at 6:52 PM, Chris Meub <<a href="mailto:chrismeub@gmail.com">chrismeub@gmail.com</a>> wrote:<br>
><br>
><br>
> The server is hosted on a dedicated hosting provider M5, but I have<br>
> also tried putting the server on a friend's home Ubuntu server with<br>
> the exact same intermittent stalling behavior.<br>
><br>
> The client is under a router and cable modem with comcast<br>
><br>
> pinging the server averages 49ms at the moment, 32ms from another<br>
> network ive tested<br>
><br>
><br>
><br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<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>
><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>
</div></div></blockquote></div><br>