-
-
Notifications
You must be signed in to change notification settings - Fork 398
Severe latency and other issues in ReceiveMessagesOnChannel #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Its one of those times where I stare at it for days, post for help then find the solution right after. Lack of examples on the steamworks P2P is crippling. Sorry. |
Can you post your updated code just for the next person? |
Ofcourse, wasn't sure if I should as it was a me issue. Basically, pull all messages out of the buffer, run through them all and then make absolute sure to completely clear the buffer.
|
Sorry if this is the wrong place but i'm pretty much out of options.
I have a project that was based on ENet and worked flawlessly, however I wanted to move to a system that didn't require players to open ports. I figured that since I would be releasing on steam I would use Steams P2P system. I'm having a terrible time using steamworks and I am starting to think I was woefully wrong about my choice.
My biggest issue is sending and receiving packets.
I can send a simple packet, receive it and process it and it seems to work instantly. However when I try to send a tick based stream of packets it all goes to hell. For starters, the information that comes through seems to be in batches even though on client side I have used NoHagle and NoDelay, the timestamps on the debug log for the outbound packets are consistent as I would expect. Moreover, there's a countable 5+ second delay on this stream and combined with the "batches" im getting makes it comedicaly unusable. Lastly, while this stream of packets are coming in, any packets sent of a different nature simply never make it through (I assume should move these to a different channel but that's not the issue at this point)
I'm fairly new to networking, and have 0 experience in Cpp so its a miracle I got anything working, Ill put some abridged code and hope that the problem is obvious and solvable. Failing that Ill have to look into other solutions.
Client packing + sending stream
This code is ran at 30TPS
These bytes are passed to the
SendMessage
function, the TargetList only has the server (The server has a list of all players so I can use 1 function for both direct and broadcast)Server receive
This code is ran at 60TPS
Sorry for it being just a wall of text but I didn't want to leave anything out that might be important.
The text was updated successfully, but these errors were encountered: