Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [udp]

Questions about using unreliable UDP protocol in games which requires data exchange via network.

3
votes
0answers
49 views

Will TCP really affects UDP if used in different context?

I have read some questions about using both TCP and UDP in multiplayer game, such as Does it make sense to use both TCP and UDP at once? and Is UDP still better than TCP for data-heavy realtime games?....
0
votes
0answers
47 views

How to send chat messages received on UDP server back to clients?

Here are the scripts: Server: (A console application) ...
1
vote
1answer
74 views

Network limitation in multiplayer game

I have a multiplayer cooperative game (PVE) in where there can be up to 200 enemies at a time (somewhere around that) and I was wondering how devs generally synchronize these? I already have packets ...
0
votes
0answers
22 views

Duplicate packets and termination of packets in multiplayer game

I'm making a multiplayer game (lazertag) with real hardware. After hours of research, I'm choosing the UDP instead of the TCP protocol to exchange data. Because of how unreliable UDP is and because ...
0
votes
0answers
162 views

Using UDP in an MMORPG and Port Forwarding?

How can you get around having to make all clients port forward for their outgoing port? In my game the server has it's incoming port as 5600, and the clients are bound to a random port right before ...
0
votes
0answers
62 views

How to reduce server traffic for 100+ multiplayers game?

I'm working on fast-paced multiplayer game which has 100+ players in single session. To sync entire game state to each player, server should send massive data if I did not any compression: ...
0
votes
2answers
114 views

Latency issue on multiplayer game networking

I am currently writing a 2D top-down shooting multiplayer game using Java. I have a game loop at the client-side that does the following in order in each game tick (The client is running in a tick ...
0
votes
0answers
24 views

Two client-server game simulation approaches

I've recently started prototyping netcode. Based on some of the research I did on the internet, I've come to understand there are maybe two approaches and I was curious of anyone could point out any ...
0
votes
1answer
638 views

udp over cellular networks? [closed]

I'm starting to build a multiplayer iOS game using UDP. I want the game to be playable over cellular networks, but I can't really find that much information on it. Many people say that it's dependent ...
2
votes
1answer
216 views

What is a reasonable bandwidth usage for a RT multiplayer game? [closed]

My game uses UDP communication only. Meaning: after the lobby connect (performed by Google Play Services), not a single TCP transmission is made. Only unreliable messages are used. The game is ...
15
votes
4answers
5k 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 ...
0
votes
0answers
227 views

UDP Receive: SocketException - Only one usage of each socket address

Using a UDP Receive script i found, i can get working for some bits i need but for the main gesturing mechanics, i'm getting a "SocketException: One one usage of each socket address is usually allowed"...
0
votes
0answers
428 views

UDP optimal packet size

Many sources say below 508 bytes shouldn't be fragmented, and fragmentation causes a lot of packet loss, so 508 is good. But I'm ok with some packet loss, just what's the optimal balance between size ...
6
votes
3answers
549 views

Synchronizing over UDP

I have two apps communicating over UDP. One of the apps is a remote control and the other is a robot. When the robot has some new data, for example a new sensor ...
0
votes
1answer
63 views

Handling Player “sessions” on a UDP based server

I've been building a UDP server and have hit a bit of a stumbling point. Since UDP is not a persisted connection, there really isn't a way for me to track if the Player has left the current session/...
0
votes
2answers
727 views

Sending Vector3 from Unity to custom C# server

I'm working on a multiplayer game in which the server is a custom C# server. What I want to do is to store the position of each player in my database. In my case I'm sending Vector3 as an object ...
1
vote
2answers
914 views

Network protocol for chat — UDP or TCP

I'm trying to develop a fast-paced multiplayer game. Now I'm using UDP as a transport-layer protocol to communicate between clients and server. But what if I want to implement a chat? Should I send ...
3
votes
1answer
885 views

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

I'm trying to develop a fast-paced multiplayer game. I decided to build my own protocol over UDP and now I'm stuck with the following question. The idea of the protocol is very basic and it's similar ...
3
votes
1answer
692 views

UDP server in unity not working

I know there are a lot of UDP examples out there, but I really need to know specifically what I am doing wrong. I have Wireshark monitoring my data traffic and according to that program Unity is not ...
1
vote
0answers
92 views

UDP client code throwing a very nonspecific exception

so I'm writing a UDP server and client on a couple of the machines in my virtual reality environment to allow (in this case) data from the location in the environment to trigger some air nozzles. The ...
10
votes
4answers
3k 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 ...
68
votes
10answers
23k 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 ...
0
votes
1answer
84 views

Send OpenGL video flux via UDP [closed]

It is possible to send the video flux of an OpenGL desktop app via UDP on Linux ? I looked up FBO and off-screen rendering but I still can't figure out how to extract the video flux and send it. I'm ...
1
vote
0answers
83 views

Extrapolation - synchronize destination point on a second device while moving

First of all, I read all of the Valve and Gaffer articles but I still have no clue, how to achieve my goal. I am creating a UDP multiplayer game with a lot of physics (knockbacks, attacks). Packets ...
1
vote
0answers
139 views

Host Migration (P2P) with RTMFP and AS3

I was wondering if this is a possibility with RTMFP since it acts like UDP/P2P.. Host Migration Player A starts and host a game.. Player B and C connects.. Player A quits.. Player B is now assigned ...
2
votes
2answers
927 views

Do I need more than one UDP socket on the server?

I'm trying to make a UDP game server using the SDL_net library. This library offers SocketSets which are, according to the documentation, an analogy to the select ...
1
vote
1answer
229 views

How do I keep 1v1 player positions consistent over UDP on Kryonet?

I have a server which is simple: When two connections comes in, it opens a game room, pass their connections to it and runs a thread with a gameloop. (Everything is running on Kryonet) So... I made ...
0
votes
2answers
413 views

Simple mobile multiplayer game. TCP/UDP? [duplicate]

I'm tying to dive into multiplayer game programming. The game is quite simple, it's a 2D scroller mobile game, the player need to touch the screen in order to move 1 step and it could contain up to 4 ...
4
votes
3answers
2k views

UDP packet reliability and re-sending

Like most people on this exchange concerned with UDP client server connections, I've gone through the Gaffer on Games article about implementing reliability. I understand how the ordering and acks and ...
4
votes
0answers
2k views

Unity3D LLAPI and Pyhton UDP communication

I need a Unity3D game on Android to receive UDP packages from a Python script running on a different device. Using System.Net is not (yet) an option, as it is only supported on Android with a valid ...
1
vote
2answers
2k views

Networking with UDP, should I keep sockets open on the server

I am working on making a 2D platforming game that will have multiplayer functionality. Over the last few days, I have done a lot of reading regarding how to deal with the networking, and believe that ...
4
votes
1answer
4k views

Packet size vs packet frequency

I am making a multiplayer game in Java that uses a client-server model, where all important decisions are made by the server and communicated to all clients over UDP. Currently the clients and the ...
0
votes
1answer
5k views

How to send object transform position coordinates over UDP from Unity 3D

I'm trying to send the x, y and z coordinates of an in-game object over UDP. I found a script in a Unity forum which should send info over UDP and as I understand it it should send the information ...
0
votes
2answers
551 views

TCP For RTS Game?

My RTS game abides by the lockstep system so keeping everyone up to date is import and guaranteeing the safe arrival of packets would make my life a lot easier. With that said, I still need decent ...
0
votes
1answer
487 views

How to estimate number or packets required to sent per second in a multiplayer lockstep RTS game?

Considered a typical lockstep implementation, what's a solid rate to send packets at for UDP protocol that games can start with in the beginning? If anyone has experience in this field, I'd like to ...
1
vote
1answer
580 views

Should I switch to UDP for a mobile p2p game when considering 3G network?

I have been making a mobile game that is similar to "Street Fighter" where two players play with each other via Internet. The game sends out a small packet (controller status) to the other party ...
0
votes
1answer
2k views

Too much delay while sending object over UDP to server

I'm getting 4 sec delay when sending objects over UDP. Working on small game and trying to implement multiplayer. For now just trying to synchronize movements of 2 balls on the screen. StartingPoint....
1
vote
2answers
1k views

UDP Netcode Architecture for Fighting Game

I am programming a fighting game that uses a UDP client/server architecture for multiplayer. The server can handle multiple clients, two of which (or one being the server) are playing and the rest are ...
3
votes
2answers
4k views

Kryonet usage for game networking

Im making a game where real-time data is exchanged between server and clients, and I was using java UDP sockets straight up, but I reached a point where I actually need to know if a few specific ...
3
votes
2answers
2k views

Is there a maximum delay an UDP packet can have?

I am currently implementing a real-time network protocol for a multiplayer game using UDP. I am not having any technical difficulties, but as I always have to care about late UDP packets I am ...
1
vote
2answers
973 views

How to I access “Deny” message from a Lidgren client?

I'm using the Lidgren v3 network for a UDP client/server networking model. On the server end, I'm initializing a NetServer object with the NetIncomingMessage.ConnectionApproval message type enabled. ...
6
votes
1answer
250 views

UDP server and large number of users?

My initial research showed the most people prefer to use UDP protocol and build a control code on top of it for multiplayer games. It seems like a good design at first, but I am wondering if it is ...
0
votes
3answers
1k views

Handling packet impersonating in client-server model online game

I am designing a server-client model game library/engine. How do I, and should I even bother to handle frequent update packet possible impersonating? In my current design anyone could copy a packet ...
2
votes
3answers
1k views

How to trust a UDP Client

I'm working on a Unity project with the Lidgren UDP library for connection. I'm new to networking, so I'm not sure on general "best practices" for this area. I'm trying to figure out a good way to be ...
1
vote
5answers
2k views

How to correctly aggregate networked data into UDP packets while avoiding fragmentation

I am starting to get my feet wet with game networking, having iterated many times now on some simple 2D games. For learning purposes, I've read the fantastic Gaffer on Games networking article a ...
10
votes
2answers
6k views

UDP non-blocking or a separate thread for receiving?

I am creating a multiplayer game (for under 64 players). I already decided to have a separate thread for the network loop, but I was wondering if it would be better to create an extra thread for ...
8
votes
4answers
327 views

Sending state diffs (deltas) and unreliable connections

We're building a realtime multiplayer game, in which each player is responsible for reporting its state on every iteration of the game loop. The state updates are broadcasted using unreliable UDP. ...
0
votes
2answers
516 views

Udp VS Tcp connection for a platformer multiplayer

Tcp is connection based so it's really good for chat or login or anything that needs reliability. Udp should be used for lots of small packets like position packets... The problem is that in a game ...
0
votes
3answers
849 views

Why is my client laggy despite 60 update packets a second? [closed]

I am developing a small multiplayer game with XNA. It's a usual client-server architecture -- I have a server and many clients communicating with it through UDP (via .NET's ...
7
votes
2answers
7k views

UDP vs TCP in multiplayer mobile game

I'm working on a networked multiplayer game, initially for iOS. Even with TCP_NODELAY there are large fluctuations in latency. I can't be sure of the reason, but I would not be surprised if it was ...