Jump to content

Server game programing


Agreda007
 Share

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 slither.io ), 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.

Link to comment
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 colyseus.io and looks great, maybe if i get a great game idea i use it. 

Link to comment
Share on other sites

  • 2 weeks later...

https://github.com/uNetworking/uWebSockets

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...