Mythruna
March 28, 2024, 10:40:25 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the new forums. See "Announcements" for a note for new users.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Network Performance (was: Network Test)  (Read 7490 times)
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« on: October 26, 2011, 02:47:50 AM »

Yes, but what about bad connexion? What's the solution? Because bad connexion is alive all around the world xD

There is only so much I can do... 2+ second ping time is really hard to design around for anything that requires even semi-realtime processing.  And while I support full client prediction now (and all the potential cheating that goes with it), I can't keep doing that level of prediction and still support physics properly.  At some point, physics starts to push back on the player in little and big ways.  Think of riding on the deck of a ship bobbing in the water and cruising along.  The ability to accurately predict beyond some simple stuff breaks down really quickly.  The larger pings I try to support, the more likely that those users will see themselves jump around or witness really strange things (like floating in mid-air,etc.).

However, I'm also not writing an MMO.  Hopefully servers start popping up as the game gets further along.  Though I may end up having to add a public server list sooner than later.  Something displayable on the multiplayer screen with current ping times, plug-in versions, etc..

A server UI that lets the server admin publish their server to the list would go a long way towards encouraging additional servers to pop-up, I think.  And as they become more customizable there will be a stronger temptation, I think.
Logged
caesar
Forum's Janitor
Global Moderator
Full Member
*****
Posts: 170


View Profile
« Reply #1 on: October 26, 2011, 03:36:50 AM »

Whats exactly the bottleneck?

- server's performance
- client's performacne
- internet connection?

Where is the physics calucalted? On the server or on the client?
Probably you could minimize the network transfer by spreading up the tasks.
And I also suppose that, if the server has to do all the calculating, you will have to have a powerful server so many ppl can play on it.

Just throwing my 2 cents in as I have no idea of your code.
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #2 on: October 26, 2011, 03:54:17 AM »

Internet connection is the bottleneck.  At 2+ second latency it means that everything you do takes 1 second to get to the server and 1 second to get back to you.  A first person shooter would be completely unplayable, for example.  And with the way physics is designed, Mythruna becomes unplayable too.

I don't expect physics to be a huge bottleneck on the server.  I have six cores, it is welcome to gobble one up if it likes.

You can't really spread the load around without cheaters... so the server will always have to be doing all of the physics.  The only question is how much you let the client predict.  0 prediction is a really easy design but latency is your problem.  Anything more than 0 prediction increases in complexity... and in a game where you can directly manipulate potentially really large objects it becomes unsolvable pretty quickly.

For example, if I pick up an object that is tied to the object you are standing on you run into all kinds of "who does what prediction?" issues.  The only down side of letting the server keep all physics is the latency problem.

Current plan:
1) player camera view is 100% under player control.  Server does not care what you are looking at only what direction you are headed and those need not be the exact same thing.  Pretty much every FPS will give player 100% control over their look.
2) only minor prediction of player location and only if lag is likely.  Never more than about 500 ms prediction, though or you end up rubberbanding the player around as the local world catches up.
3) no prediction for any other physics... and if the player is in contact with a moving physical object then player position prediction is reduced and the player will feel lag.  For player position, there will be a little looseness both to decrease the feel of lag and to decrease making the player sick if the object that are on is jittering,etc.

...which is probably way more detail than I needed to dump here. Smiley
Logged
Trecool
Donators
Full Member
***
Posts: 123


I love drums, I love Guitar, I love Mythruna


View Profile WWW
« Reply #3 on: October 26, 2011, 05:16:16 AM »

Wow, Thank for your vision Smiley

It's very difficult for me to explain my vision because I don't have a good technics English
I try Smiley

I think, we have few possibilities..

- Increase the number of server by region of the world to minimize the latencies.
- Find a another solution for minimize server working.. And latencies.. No packet loss etc..
- Optimize the client build to Minimize interaction, use constant variable etc.. The client working more..
- Use the best pc and better connection to relieve the server works

Bad solution I think...
     
Logged

caesar
Forum's Janitor
Global Moderator
Full Member
*****
Posts: 170


View Profile
« Reply #4 on: October 26, 2011, 06:59:05 AM »

Your idea with the different servers around the world aint stupid at all.
Usually you have a better ping and latency if you connect to a server in your area (US, CA, Europe, Asia etc.)
BUT you have to rent the servers. Or collect bonusmiles while flying around Cheesy
Thats something left for future.

But Paul could think about an option to split up the hardware-servers to run one software-mythruna-server. Loadbalancing is the magic word.
Thats some serious sh** to implent into an engine... so have fun Paul Grin Wink
Logged
pspeed
Administrator
Hero Member
*****
Posts: 5612



View Profile
« Reply #5 on: October 26, 2011, 10:36:09 AM »

I never set out to run an MMO.  I think it's virtually impossible for an indie-developer.  The infrastructure alone to start day one runs in the millions.

I will host a community for players to communicate but it will ultimately be up to the players to make cool servers and worlds.  I'm really trying to follow the Neverwinter Nights model here.  That was such a fun game to play and there seemed like there was always one more cool server to check out somewhere.

My target is for one server to be able to handle a minimum of 64 connections running on hardware like I have mine setup on.  If it can handle more then that's awesome... but really I think 64-100 is a good sized server.

Otherwise, you hit the harsh realities of the internet.  But I'll address each point in turn:
Quote: "Increase the number of server by region of the world to minimize the latencies."

That's really the only solution.  It's prohibitively expensive for an indie developer to set this up.  Big huge companies spend millions on MMO infrastructure and then never recoup it.  And in the end, everyone ends up just playing the same world as everyone else and that's not very exciting to me.  I want to empower users to run their own server (and potentially charge for access if they want) with their own cool mods, etc..  I want to see what they create.

Quote: "Find a another solution for minimize server working.. And latencies.. No packet loss etc.."

Packet loss and latency are the only bottlenecks here.  They are the single choke point.  There are a thousand ways to optimize the server processing but it won't matter if a high number of network packets never make it from point A to point B.  So far, my server runs only at 1% CPU and 0.5% network even with 8 players connected.

And if a player is connecting to my server from a modem on the other side of the world, it's really hard to provide a good experience.

Quote: "Optimize the client build to Minimize interaction, use constant variable etc.. The client working more.."

The client can't really work more.  While I don't plan to be a "twitch" game like a lot of first person shooters, there are simple things that need to be reasonably timely.  If I remove a block from under your feet then its bad if you don't see that update for 5 seconds.  If I roll a boulder down the hill and you never see it coming then you die and don't even know why.

Quote: "Use the best pc and better connection to relieve the server works"

Better connection is the way... and for some users connecting to some parts of the world... it's completely out of their hands.  But in the end, that's what we're talking about.

Get a better connection or find a better server to connect to.

For anyone interested in additional reading at a technical level... these articles are pretty good:
http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
http://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization

They were the original basis for my network designs back in March when I wrote the multiplayer support... and even the new stuff is just better fleshing out designs from back then and optimizing them.
Logged
Trecool
Donators
Full Member
***
Posts: 123


I love drums, I love Guitar, I love Mythruna


View Profile WWW
« Reply #6 on: October 26, 2011, 12:38:43 PM »

Thank you for Links and explication.

The good way is a better connection and Server rent if I understand..
Good luck for optimize Mythruna Server Software Smiley

Logged

caesar
Forum's Janitor
Global Moderator
Full Member
*****
Posts: 170


View Profile
« Reply #7 on: October 26, 2011, 11:59:57 PM »

Thanks a lot for pointing that out!
Now I know what you have in mind for the servers.
You are not heading to get a MMO but more private servers ppl can join. Thats conept has pros and cons but the biggest pro, you can limit the access and keep out the griefing morons, is extremely important in a building game.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!