Questions tagged [networking]
Two or more computers connected together via cable bound or wireless communication links for the purpose of information exchange.
896
questions
110
votes
7
answers
65k
views
How can I simulate a bad internet connection for testing purposes?
I am developing an online multiplayer game. It works well when I test it on the local area network, but before I release it I would like to test how the user-experience works out for someone who has ...
80
votes
11
answers
36k
views
Is UDP still better than TCP for data-heavy realtime games?
I know that UDP is usually recommended for real-time multiplayer games with high data usage.
Most articles are serval years old, and since ~80% of all data transmitted on the internet is TCP, a lot ...
75
votes
6
answers
35k
views
How to write a network game? [closed]
Based on Why is it so hard to develop a MMO?:
Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load ...
58
votes
9
answers
37k
views
Is the TCP protocol good enough for real-time multiplayer games?
Back in the day, TCP connections over dialup/ISDN/slow broadband resulted in choppy, laggy games because a single dropped packet resulted in a resync. That meant a lot of game developers had to ...
58
votes
9
answers
20k
views
How are deterministic games possible in the face of floating-point non-determinism?
To make a game like an RTS networked, I've seen a number of answers here suggest to make the game completely deterministic; then you only have to transfer the users' actions to each other, and lag ...
39
votes
9
answers
57k
views
How can I make a peer-to-peer multiplayer game? [closed]
How can I make a p2p multiplayer game?
I would like to have a server-less multiplayer game. But then, how all the clients know each other?
Why the p2p-protocol is so famous in file transfer but not ...
35
votes
4
answers
20k
views
How does client-side prediction work?
I've read Valve + Gafferon and hundreds of pages from Google, but for whatever reason I can't get my head around client prediction.
To my understanding, the basic problem is:
Client A sends input at ...
35
votes
4
answers
3k
views
Movement prediction for non-shooters
I'm working on an isometric 2D game with moderate-scale multiplayer, approximately 20-30 players connected at once to a persistent server. I've had some difficulty getting a good movement prediction ...
34
votes
5
answers
14k
views
Lag compensation with networked 2D games
I want to make a 2D game that is basically a physics driven sandbox / activity game. There is something I really do not understand though. From research, it seems like updates from the server should ...
33
votes
2
answers
6k
views
How to network this entity system?
I have designed an entity system for an FPS. It basically works like this:
We have a "world"-object, called GameWorld. This holds an array of GameObject, as well as an array of ComponentManager.
...
28
votes
9
answers
13k
views
How does delta compression reduce the amount of data sent over the network?
Many games use the technique of delta compression in order to lower the data load sent. I fail to understand how this technique actually lowers the data load?
For example, let's say I want to send a ...
27
votes
3
answers
8k
views
How to handle a large number of pickups in a MMO game
How do games like Minecraft, or really any MMO game that has pickups, handle them?
Say terrain spawns 3 pickup drops of "dirt" everytime you dig said terrain.
Say every item has a rotation ...
26
votes
2
answers
5k
views
What's the performance benefit of saving all logged in characters in MMOs in regular intervals?
The majority of MMORPGS have a Worldsave system that will save all the characters once every X hours. I guess the reason is performance. So why is this better, performance wise, than saving a ...
26
votes
2
answers
16k
views
What to send to server in real time FPS game?
What is the right way to tell the position of our local player to the server? Some documents say that it is better to send the inputs whenever they are produced. And some documents say the client ...
23
votes
9
answers
2k
views
Techniques to prevent non-official clients in network gaming?
In multi-player network games, what techniques exist to try to ensure that users are connecting with the official client application, and not some hacked client app?
I realise there is probably no ...
23
votes
4
answers
25k
views
How to keep server-client clocks in-sync for precision networked games like Quake 3?
I'm working on a 2D top-down-shooter and doing my best to copy concepts used in networked games like Quake 3.
I have an authoritative server.
The server sends snapshots to clients.
Snapshots contain ...
21
votes
3
answers
8k
views
Why do some networked games use interpolation and some use pathfinding for remote movement?
This is a bit of an open question but I'd like to see someone contribute a good reasoning for both.
For a quick example of both:
Interpolation Model
Think the Valve model where the client is ...
20
votes
10
answers
2k
views
How do/should MMOs handle disconnection during PvP?
In an MMO (not even necessarily an MMORPG) what are some techniques for dealing with players disconnecting in the middle of PvP?
In particular - how do you avoid adversely affecting people who get ...
20
votes
5
answers
4k
views
Tricks in game mechanics to avoid dealing with network lag compensation?
Implementing network lag compensation is hard, how to avoid it?
Maybe it's possible to use tricks and build game mechanics in such a way that lag would be percieved as a non critical or even as a ...
20
votes
3
answers
11k
views
How to make a multiplayer game work reliably behind NAT?
Even games that are 100% client/server sometimes have issues when the client is behind NAT. Peee-peer games are even a bigger issues. Some games need to use multiple transports (such as UDP and TCP) ...
20
votes
4
answers
8k
views
Best strategy (tried and tested) for using Box2D in a real-time multiplayer game? [duplicate]
I am currently tackling real-time multiplayer physics updates for a game engine I am writing. My question is how best to use Box2D for networked physics. If I run the simulation on the server, should ...
18
votes
5
answers
8k
views
Are huge, static objects like environment transmitted from server to client in modern multiplayer games?
I have an authoritative system, where when the player joins the match, it gets all the already spawned objects - spawned on itself (the client).
It looks like this:
...
18
votes
5
answers
13k
views
What is better? Lots of small TCP packets, or one long one? [closed]
I am sending quite a bit of data to and from a server, for a game I'm making.
I currently send location data like this:
...
18
votes
9
answers
2k
views
Real-time Debugging Techniques
There's nothing quite like the routine of tweaking a variable, compiling code that takes a few minutes, executing the code, realizing that your tweak was in the wrong direction and repeating the ...
17
votes
3
answers
5k
views
How do I efficiently code both the client and server at the same time?
I'm coding my game using a client-server model. When playing on singleplayer, the game starts a local server, and interacts with it just like a remote server (multiplayer). I have done this to avoid ...
17
votes
4
answers
3k
views
How can I assign entity IDs in a robust way in a network game?
I'm working on an entity system for a networked game and I'm assigning each entity a unique 32-bit integer id that I can use to serialize references to entities and the entities themselves.
Currently ...
17
votes
4
answers
2k
views
What is involved for a simple UDP game?
I once tried to write a simple game with UDP in a week as a throwaway test. It went horribly.
I threw it away early. The main problem i had was restoring the game state of all players/enemies/objects ...
16
votes
5
answers
5k
views
Networking for Real Time Strategy games
I'm developing a real time strategy game for a computer science course I'm taking. One of the harder aspects of it seems to be client-server networking and synchronization. I've read up on this topic (...
15
votes
4
answers
9k
views
Acknowledgement reliability using UDP
I have a question about UDP. For context, I'm working on a real-time action game.
I've read quite a bit about the differences between UDP and TCP and I feel I understand them quite well, but there's ...
15
votes
4
answers
5k
views
Prevent players from wallhacking in an online FPS?
Why do we still complain about wallhackers in multiplayer first-person shooters?
Isn't it possible to perform occlusion culling for all players server-side? For example, send player xyz information ...
15
votes
9
answers
8k
views
Adding multiplayer to an HTML5 game [closed]
I am interested in making a game that I currently have a co-op experience, however I'm curious as to the best method of implementing this in HTML5.
I have made games before using straight C sockets, ...
15
votes
3
answers
6k
views
Should I keep login server apart from game server?
I'm thinking of making a MMO server, and I've been looking at how other games structure their network. One of the things I've noticed is that there's always a Login server and then the game server(s).
...
15
votes
2
answers
3k
views
Should the game host be the authority, or another dumb client?
When designing a networked multiplayer-game where one player hosts and others connect, there are two strategies I'm aware of:
Have the host-player's game be the authority, with all other players as ...
15
votes
4
answers
9k
views
Does it make sense to use both TCP and UDP at once?
After reading Is UDP still better than TCP for data-heavy realtime games?, I'm wondering if it makes sense to use both TCP and UDP at the same time, but for different things:
TCP for sending ...
15
votes
3
answers
6k
views
Is there a pattern for writing a turn-based server communicating with n clients over sockets?
I'm working on a generic game server that manages games for an arbitrary number of TCP socket-networked clients playing a game. I have a 'design' hacked together with duct-tape that is working, but ...
15
votes
2
answers
2k
views
How to compensate for moving objects with client side prediction?
I'm implementing a game server that supports Star Control-like melee. So you have ships flying and shooting, with super simple velocity/acceleration/dampening physics to drive movement.
I've read ...
14
votes
2
answers
17k
views
What is the difference between a "ping" and "RTT" (round-trip time)?
RTT, or round-trip time, is the time that it takes to send a message and receive the result from server. As I searched this, this seems to be the same as ping in network jargon.
Are there some ...
14
votes
2
answers
8k
views
multiplayer networking with physics
I'm curious how multiplayer networking with physics is implemented in racing games.
We have a physical world with multiple fast-moving vehicles controlled by different people.
Let's say that vehicles ...
14
votes
4
answers
931
views
How to protect your real time online shooter from potential bots
I'm looking to create a multiplayer top down shooter. While I've read about different topics, I can see them I've got some real challenges ahead, but I'm all up for it.
One thing I can't understand ...
14
votes
2
answers
950
views
How can I stop the player from drifting due to local input prediction when they stop?
I'm working on a 2D server-client multiplayer game engine (which you can try here). It uses WebRTC DataChannels. (The connections are peer-to-peer, but the host ...
13
votes
4
answers
8k
views
Prevent Multiplayer Cheating
I am almost complete developing a small indie-style multiplayer game. While I intend to allow people to cheat in single-player, this is obviously not acceptable in multi-player. Does anyone know of ...
13
votes
4
answers
5k
views
Run a physics simulation on both client and server?
I'm implementing a multiplayer asteroids clone to learn about client/server network architecture in games. I have spent time reading GafferOnGames and Valve's publications on their client/server tech....
13
votes
3
answers
41k
views
How does the 3G network assign IP to smartphones? [closed]
I am playing a game on the 3G network using Android or Iphone.
Suppose I am moving from one cell to another; Will the IP Address change?
If yes, then how can I continue the same game while changing ...
13
votes
3
answers
22k
views
Javascript and PHP for real-time multiplayer? [closed]
I'm wondering if combining Javascript clientside with PHP/mysql serverside is a good idea for HTML5 real-time multiplayer (small scale) browser games?
My technical knowledge is very limited, and even ...
13
votes
3
answers
3k
views
What is involved in creating a real-time multiplayer platformer game?
I'm creating a platformer game that has a "co-operative" feature which I'd like to work over networks / the internet.
Now I've read up on network game programming including articles like What every ...
13
votes
1
answer
3k
views
Implementing network smoothing
We are making a multipler first person shooter.
The client sends it's position to the server at a fixed rate (currently at 10Hz). The server sends a single message contatining all player's positions ...
13
votes
2
answers
3k
views
How would a game-state snapshot system be implemented for networked real-time games?
I want to create a simple client-server real-time multiplayer game as a project for my networking class.
I've read a lot about real-time multiplayer network models and I understand the relationships ...
13
votes
3
answers
441
views
P2P network hiding positions?
I have been working on a P2P architecture for secure gaming and I have divided the problem into five sub-problems:
Unlawful modification of sent game state
Accurately drop cheaters
Agreeing on a game ...
12
votes
4
answers
2k
views
How do you allow networking code to be written in the later stages of the development?
I'm currently in the early progress of writing a game which I eventually will want to improve in most aspects.
How can I skip out on writing network code yet leaving it fairly easily implemented, that ...
12
votes
3
answers
35k
views
Limitations of p2p multiplayer games vs client-server [closed]
I am reading up on multiplayer game architecture.
So far most of the articles i've found deal with the client-server model.
I'd like to know what are the limitations for using a p2p architecture? ...