Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
6 votes
Accepted

Parallelism in GPU's rasterization process

Different GPUs use different tricks and techniques so this answer will intentionally be very generic and some detail may not apply to some GPUs, past, present (2017), and future. This mostly applies ...
Stephane Hockenhull's user avatar
5 votes

Calculate resources real-time. Sockets or not?

Introduction There are pros and cons to each method of synchronization you gave that depend on a couple of factors. First, is your game singleplayer or multiplayer, second, how real-time is your game?...
RJ-Adam's user avatar
  • 163
5 votes
Accepted

How to solve "server lag" problems that break the game

The easiest solution to the "who did it first?" problem is an authoritative server. Both players connect to the server which handles all the game mechanics. Whatever arrives first at the server is ...
Philipp's user avatar
  • 120k
4 votes
Accepted

How does an FPS like Overwatch have client time run ahead of the server?

But how does this get setup to begin with? The client connects to the server, the server starts a game... does the client jump ahead of it's own accord? (Server says "game is starting, I'm at ...
Filip Milovanović's user avatar
3 votes

How can I synchronize state in my Asteroids game with many networked players?

Is it possible to save the game's current state to disk? If yes (hint, the answer is always yes) then you have a means by which you can synchronize players. Even if it is horribly inefficient. But ...
Draco18s no longer trusts SE's user avatar
3 votes
Accepted

Synchronizing over UDP

When the user presses the button to enter panic mode, generate a sequential ID to tie to that event of wanting to enter panic mode. You then periodically send a message to the robot "Activate Panic ...
Alan Wolfe's user avatar
  • 2,353
3 votes
Accepted

How to confirm an actor location in a realtime multiplayer game at the exact same time on two devices?

The first fact that any multiplayer game needs to accept is: "No matter how good your connection is, there will always be some unknown delay between the server and clients." Because of this, ...
spectacularbob's user avatar
3 votes
Accepted

clock synchronization

The industry standard network time protocol (NTP) also takes into account the latency of the server processing. This means there are 4 timestamps, one each for send/receive of client/server. when ...
ratchet freak's user avatar
3 votes
Accepted

Implementing game synchronization between clients and server

The server, as you probably know, is the one source of the truth in a game architecture like you're creating. The server is calculating "the truth" of position based on input to the clients, then ...
Tim Holt's user avatar
  • 10.3k
3 votes
Accepted

How to replicate damage between users in a MUD

MUDs are usually client-server applications. That means there are two separate programs, a server and a client. The server program runs on a server in a datacenter (although for testing you can just ...
Philipp's user avatar
  • 120k
2 votes

How to start the game at the same time across two phones?

The best resource on how to do all kinds of synchronization of advanced physical simulations over unreliable networks in games is the excellent blog posts/articles of Mr. Glenn Fiedler. You can find ...
Mr. Developerdude's user avatar
2 votes

Multiplayer Game - Node.js syncing other players' position

Approach 1) is traditionally used in RTS types of games where timing is very important. However, this approach has the downside of increasing by a lot the chances of clients cheating. Since the client ...
Vaillancourt's user avatar
  • 16.3k
2 votes

How can I handle sharing storage units in multiplayer?

To eliminate the possibility of conflicting transactions, the best (and also the easiest!) thing would be to queue the requests you get, and execute them in chronological order. Update their view once ...
altskop's user avatar
  • 2,043
2 votes

Keep world changes in sync in client/server architecture

One way you can solve this is to store a "last modified" timestamp for each block on the server, and a "last seen" timestamp for each block in a client's local cache. When someone makes a change in a ...
DMGregory's user avatar
  • 135k
2 votes

How can I standardize ping?

First of all, I commend you for thinking outside the box. Keep doing that. Here are a couple problems off the top of my head with one potential implementation. (Only a partial answer.) It ...
Evorlor's user avatar
  • 5,793
2 votes
Accepted

Syncing chest content in a host-client multiplayer setup

Assuming you are using a network protocol that has guaranteed delivery (so either TCP or UDP with a guaranteed delivery layer on top), you don't need to do full inventory syncs. All you need to do is ...
Philipp's user avatar
  • 120k
2 votes
Accepted

How achievable is determinism when client and server run on different hardware?

The problem with determinism in multiplayer games is not just that people use different hardware, but also that due to network latency the order in which events happen is not always the same for each ...
Philipp's user avatar
  • 120k
1 vote
Accepted

The state that is synced when a window is broken in a FPS game

I will go over the how state synchronization works, and later will go over your particular cases. But before that, let me tell you that you do not need to implement all that I say here. If you have a ...
Theraot's user avatar
  • 26.9k
1 vote
Accepted

Should I sync animations from the server to the client or let the client play its own animations?

If you're going with the authoritative server model (to limit player cheating), you want to simulate everything immediately on the client. Otherwise, there will be latency, so the player could press ...
Blue Wizard's user avatar
1 vote

How can I handle sharing storage units in multiplayer?

What most games do is send a message to the server when the player starts interacting with the chest. The first player to do so gains exclusive access, until they send a message that they're done ...
justinian's user avatar
  • 946
1 vote

Should the server calculate the time of a player's input, or trust sent data?

As Steve Smith pointed out in the comment above: "the player will always send the correct info about Command Execution Time" - Are you sure? Could be a mechanic for cheating if the player could ...
DMGregory's user avatar
  • 135k
1 vote

Multiplayer Game - Node.js syncing other players' position

1 - Client send input. 2 - Server calculate and broadcast: destination, direction, velocity and timing function (if you need acceleration or jump curve). 3 - Unit start moving (on server and on ...
Vladimir Ishenko's user avatar
1 vote

Synchronise events in Multiplayer Game

First you need to assign the authoritative simulation. Who decides a score? If you have a server and two clients, the server would be authoritative of course, and would be running the simulation. So ...
Bram's user avatar
  • 3,719
1 vote

Do you really have to sync Physics over the network?

What you're describing is usually called "lockstep", it's very common in RTS multiplayer games, like Starcraft. Lockstep Network Implementation in Unity Usually most multiplayer games will try do to ...
ag4w's user avatar
  • 101
1 vote
Accepted

Unity - Manually sync location of players from server to client

I ended up designing my code with help from /u/Cell-i-Zenit on Reddit. Final code: ...
Aaron Franke's user avatar
1 vote

MMO Player Position Update

You wouldn't store the positions of any currently ingame-players in a MySQL database. Databases are for data at rest, not for data in use. You would use a database to persist the state of player-...
Philipp's user avatar
  • 120k
1 vote

What to replicate in a PvP online action game?

Thanks for your answers. I've found a perfect answer for my question. I looked up the UE4 source code and found this: ...
Peter Ren's user avatar
  • 103
1 vote

Synchronizing over UDP

A common solution I use to send safe messages over UDP is the following : When the state is changed on one side, send the message periodically (the more important, the shorter the period) until the ...
An intern has no name's user avatar
1 vote

Get different result on different devices (same resolution) after setVelocity

You are talking about obtaining a deterministic physics simulation. Are you running a fixed timestep? https://chipmunk-physics.net/tutorials/ChipmunkColorMatch/Tutorials/ColorMatch-ChipmunkPro-...
PompeyPaul's user avatar
1 vote

How to prevent clients from stuttering while keeping the game in sync in multiplayer Pong?

Yoh have 2 method, a very simple one and a more complex The first is to make the ball have a velocity, send that to the client, and use it to interpolate between server updates. This is the easier, ...
Bálint's user avatar
  • 14.9k

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