Recommended Posts

Hello guys, i'm new on this page, and need some help with coding the server of a multiplayer online game (one like ), so i started doing the server with socket using the tcp protocol, but i don't feel that is the right way, if someone know's about directions or a book on handling multiplayer connections, streams, good practives on creating players objects, no matter if i code a small server but i want to do it right.

I hope i can get my answer and  help others in their problems.

sorry for my bad english .

have a good day.

Share this post

Link to post
Share on other sites

Many thanks that's a perfect solution.

I also research alot because i want to code my own server program 

now i know that i have to use both tcp and udp depending on what module/function is handling in that moment.

thanks again, i also checked and looks great, maybe if i get a great game idea i use it. 

Share this post

Link to post
Share on other sites

not well documented, but somehow it's all obvious.

my personal findings (general, not about uwebsockets):
- some peoples connections have awful jitter (could be congestion control or anything) that one would probably simulate by randomly adding a sleep(500) anywhere
- mobile isps: (some years ago) t-mobile d1 filtered ALL udp (i guess except dns/port 53, maybe not with a certain type of hole punching), vodaphone d2 did not, i will not try udp again, waste of time iMho, because i only have mobile internet
- i tend to do premature [space optimization in the protocol] which halts prototyping
- the "how do i do networking right" will stop development and nobody answers

Share this post

Link to post
Share on other sites
11 minutes ago, Agreda007 said:

many thanks, this seems to be a more advanced way to work with websockets. 

it potentially uses fewer resources. i happened to use it because i felt accustomed to c++ anyway.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.