Skip to main content
65 votes

What's the performance benefit of saving all logged in characters in MMOs in regular intervals?

This is not for performance. This is a failsafe. If the world saves every few minutes, then if something happens to the server and it shuts down everyone will only lose a few minutes' progress. By ...
Aric's user avatar
  • 595
49 votes
Accepted

How to handle a large number of pickups in a MMO game

By simply only loading those parts of the world into memory which are close to the player. Anything else is suspended to hard drive. When there is a tiny object laying around two kilometers away, then ...
Philipp's user avatar
  • 121k
43 votes

How does delta compression reduce the amount of data sent over the network?

There are times when you cannot avoid sending the full game state - such as on load of a saved multiplayer game, or when a resync is needed. But sending full state is usually avoidable, and that's ...
Engineer's user avatar
  • 30.2k
33 votes
Accepted

Acknowledgement reliability using UDP

This is a form of the Two Generals Problem, and you're right - no number of retries is enough to perfectly guarantee receipt. In practice in games, there's usually a time horizon beyond which the ...
DMGregory's user avatar
  • 136k
24 votes

How does delta compression reduce the amount of data sent over the network?

You have the wrong delta. You're looking at the delta of the individual elements. You need to think of the delta of the entire scene. Suppose you have 100 elements in your scene, but only 1 of them ...
corsiKa's user avatar
  • 994
22 votes

How to handle a large number of pickups in a MMO game

You have two very different things to manage: The server must manage the entire world, in an authorative manner. For that, communication with N clients (where N is "massive") is necessary. The client ...
Damon's user avatar
  • 1,384
13 votes
Accepted

What is the difference between a "ping" and "RTT" (round-trip time)?

A ping is a method to measure round trip time. The process of "pinging" is to send a "ping". A "ping" is a network message which serves no other purpose than to get an immediate response from the ...
Philipp's user avatar
  • 121k
12 votes

Should damage calculation in a competitive multiplayer game be done client-sided or server-sided?

Rule number one for multiplayer netcode design: Anything that matters for gameplay should be calculated server-sided. Never trust the client. The client is in the hands of the enemy. You can not ...
Philipp's user avatar
  • 121k
11 votes

Should damage calculation in a competitive multiplayer game be done client-sided or server-sided?

Option 3: The client sends a click event to the server, the server decides where this click event has landed, decides if there is a hit or a miss, then applies the damage and sends the updated world ...
Vaillancourt's user avatar
  • 16.3k
9 votes
Accepted

How to compensate for moving objects with client side prediction?

During the 6 months since I asked this question, I ended up developing a complete open source game server to deal with this exact issue (and many others!): https://lance-gg.github.io/ The R&D ...
OpherV's user avatar
  • 655
9 votes

How does delta compression reduce the amount of data sent over the network?

Very often another compression mechanism will in combination with delta encoding like for example arithmetic compression. Those compression schemes work much better when the possible values are ...
ratchet freak's user avatar
9 votes

Acknowledgement reliability using UDP

The approach TCP uses is that the sender will keep resending the packet until it receives an acknowledgement. The receiver will ignore duplicate packets, but still send acknowledgements for them. The ...
user20574's user avatar
  • 630
8 votes
Accepted

Why do multiplayer games/chat services ever need to be able to open all NAT ports?

Just to make sure we're all on the same page in terms of terminology: What is NAT? NAT is an acronym for "Network Address Translation". It's a system designed to allow a router to allow a ...
Trevor Powell's user avatar
8 votes
Accepted

Where should multiplayer games start? Client or server?

You develop both at the same time, inside the same executable or a DLL loaded by the game executable. The game always run on a server, even when running single-player. When running single player ...
Stephane Hockenhull's user avatar
8 votes

How does delta compression reduce the amount of data sent over the network?

You are right that a naïve delta calculation on its own, with the result stored in the same size data structure as the operands and transmitted without any further processing would not save any ...
Peter Green's user avatar
8 votes

How does delta compression reduce the amount of data sent over the network?

You are broadly correct, but missing one important point. Entities in a game are described by many attributes, of which position is only one. What kind of attributes? Without having to think too ...
Maximus Minimus's user avatar
7 votes
Accepted

Networked projectiles in an authoritative server

This is what we ended up doing: Client side Detect player clicks button to shot missile Immediatley simulate rocket visuals on client In parallel, send command to server Once predict hit something, ...
Ron's user avatar
  • 676
7 votes
Accepted

Client side prediction physics

Client-side prediction depends very heavily on a deterministic physics model that exactly replicates the way the game object behaves on both the client and the server. Even small floating point errors,...
RelicBloodvayne's user avatar
7 votes

Determing winning on the server side or client side?

Hello visitors of Jindsay's Card Game Forum. Here is your friend xXx_GameH4x0rPhilipp_xXx with another cheat for you. Do you want to win every game? Here is a simple hack which works with every web ...
Philipp's user avatar
  • 121k
7 votes

Acknowledgement reliability using UDP

If you want to reinvent TCP, it makes sense to look at TCP first, which deals with the exact problem you describe (part of the solution is to use user defined values for retry attempts and timeouts). ...
Peter's user avatar
  • 9,955
7 votes
Accepted

Architecture of networked game engine

TLDR - start simple and build up. Getting to AAA quality networking in an action game is complicated but may not even be necessary for your game. So basically: When client connects to the server, ...
Sean Middleditch's user avatar
6 votes
Accepted

Resolving prediction error from client side prediction and server reconciliation

I solved the problem on my own. My previous implementation of the networking engine made reconciliation impossible. The code I am using is private, though I plan on open sourcing the Box2D server/...
pjrader1's user avatar
  • 332
6 votes
Accepted

Network protocol for chat -- UDP or TCP

When it comes to chat systems, reliability is far more important than latency and bandwidth. That would usually make it a typical TCP/IP use-case. However, using both TCP and UDP in parallel through ...
Philipp's user avatar
  • 121k
6 votes

How does delta compression reduce the amount of data sent over the network?

While most answers talk about how delta encoding is about only sending the changes to state as a whole, there is another thing called "delta encoding" that can be used as a filter for reducing the ...
fluffy's user avatar
  • 407
6 votes
Accepted

Why is server frame rate slower than client's?

It's not necessary. The reason why you need 60 FPS on the client is because you want the animations and movements to look fluent. But when it comes to just the game mechanics, 20 FPS is more than ...
Philipp's user avatar
  • 121k
5 votes
Accepted

How to organize messages queue in a fast-paced multiplayer game

You should implement your UDP reliable as TCP. On http://gafferongames.com/ you can read about packing packets, resending them, correcting errors. There is some pseudo-code (or this is written in C, ...
Jacob's user avatar
  • 2,552
5 votes

Does it make sense to use both TCP and UDP at once?

Here's a quote by Sam Jansen from a comment on gafferongames.com: Speaking as a network researcher and not a game developer, the conclusion to never use TCP and UDP together seems a bit strong. TCP ...
Pubby's user avatar
  • 699
5 votes
Accepted

How do MMO servers handle a large concentrated number of players?

Are you already familiar with technologies that exist like redis? Server architecture is definitely a complicated subject and it's good that you're planning it out now, but you might be worrying ...
Patrick Roberts's user avatar
5 votes

Determing winning on the server side or client side?

Doing basically anything on client-side apat from the inputs is a bad idea. And believe me, if the programmers could collect inputs on the server side, so the client couldn't fake them, then they ...
Bálint's user avatar
  • 15k

Only top scored, non community-wiki answers of a minimum length are eligible