On Sat, Jan 22, 2011 at 1:32 AM, Thilo Schulz <[email protected]> wrote:
> On Friday, 21. January 2011 17:34:33 Ismael Garrido wrote:
>> I tried making a separate thread
>> which called NET_FlushPacketQueue every 1 us and it still was jittery.
>
> Don't. You want to avoid threads whenever possible.
Let me begin by saying I'm just beginning to get acquainted with the
ioquake source.
I don't see how to send the packets out in accurate enough timing
without threads. As far as I tested, currently FlushPacketQueue is
called in irregular intervals.
>> Does anybody have a better idea on how to implement it? Maybe the
>> packetqueue should have more than millisecond precision?
>
> You would need to implement a FIFO for each player which would delay the
> packets by the required amount of time.
That's basically what sv_packetdelay does now, but one queue per
player instead of the global one there's now.
> Furthermore, you'd need to change the
> function that uses the select() syscall in the case of the dedicated server.
> If you don't you'll get a granularity of sv_fps which is 20 per default which
> means you can only regulate the pings in multiples of 50ms.
Source says:
// NET_Sleep will give the OS time slices until either get a
packet
// or time enough for a server frame has gone by
So what does happen if you lower it, but not enough for a "server
frame to gone by"?
Does the server send packets in fixed intervals or are they replies of
packets received?
How do you ensure correct timing and stable ping?
Where would you put the sending of the packets? (ie, in which loop/function?)
Ismael
_______________________________________________
ioquake3 mailing list
[email protected]
http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
By sending this message I agree to love ioquake3 and libsdl.