Tag Info

New answers tagged

0

First you need to know how to represent your relevant data in a protocol compliant manner. This depends on the data relevant to the game. I will use an RTS game as an example. For networking purposes, all entities in the game are enumerated (e.g. pickups, units, buildings, natural resources, destructibles). The players need to have the data relevant to ...


4

Instead of sending a packet whenever the key is held down, send a packet whenever the key state changes from pressed to released and vice versa. To account for network delays you can implement some kind of extrapolation on the server side and client side utilizing the time the packet was sent and received. For this of course you have to send the time the ...


0

From what I understand your question can be boiled down to one simple problem: the input from each player is applied to the shared game state in different order. In the image above I am illustrating this problem with the coloured dots (which represent the players' input). Assuming 3 players, their shared game state should be the one labeled "real order". ...


13

You can use random seed. Select same 32-bit value in server and client (or server can send it to client at start). Use it as seed for random generator. You can send actual seed from server to client with game state update. If you don't want to send it you must be sure that client and server generates same number of random numbers by this random generator. ...


2

If both the server and client agree on the seed, most randomizing algorithm will output the same values.


2

You can calculate snapshot delta (changes to its previous synced state) by keeping two snapshots instances: current one and last synced one. When client input arrives you modify current snapshot. Then when it's time to send delta to clients, you calculate last synced snapshot with current one field-by-field (recursively) and calculate and serialise delta. ...


1

Yes, they are required to sign in with a Google Plus account. It's possible to use the leaderboard without requiring users to sign in. You won't be able to connect players without them having accounts. The service is free because it allows Google to collect data on its users (play trends, in app payments, social sharing, etc.), thus it requires the users to ...


6

It is working already. Many games were running through telnet connection. Even now you can play NetHack and many other ASCII compatible games with 80x25 console. It means for pretty fast gameplay you should pass 2000 characters with 2-5 rate per second. That would be 10 kilobytes per second which is fine. If you will increase window which you are looking ...


7

This is exactly what NVIDIA is doing with GRID. The idea is that the game runs completely on a server. The client sends their keyboard- and mouse input to the server and receives a video stream (compressed with a video codec, not uncompressed pixel arrays) from what the server is rendering. How are they going to solve the latency problem? I don't know, but ...


5

Yes it's feasible and no it's not cost effective or performant. Think about how Netflix works, it is able to service millions of customers with 1080p and even 4k streaming. Why it will not be worthwhile to attempt what you suggest with current technology: Latency, the client will need to send the user's input to the server and wait for the visual feedback ...


0

Even in a fixed time-step environment(yes, you should use some sort of "turn based system" instead of timer, as you can easily slow down/up your turn duration), you will see math diverge. This is a really trick problem called "determinism". Modern different hardware is non deterministic, especially when it comes to float math, due to specific acceleration ...


2

Skew happens. This is a clock synchronization problem. Two nodes on a network can't know for sure what each other's clocks are. You can send the current time, but the receiver can't know for sure how old that value is. A good guess, though, is that it's stale by half the ping time. See http://en.wikipedia.org/wiki/Round-trip_delay_time. One approach then, ...


0

An Elo-type system is designed to reflect a game where the #1 person is not expected to win every single match. A #1 ranked chess player might only beat the #10 ranked player 8 out of 10 times. The #1 ranked player is still better than the #10 ranked player but if you happen to observe only one of the 2 in 10 that the #10 ranked player won you wouldn't know ...


0

The solution I prefer is to put all game-specific logic in the client. The server only acts as an I/O reflector to make sure all clients are up to date. One benefit of this approach is that the same server can serve different games, since it knows nothing about the content of any specific game. There are a few things that have to be done centrally, such ...



Top 50 recent answers are included