New answers tagged networking
1
I think a few games have done something similar (Warhammer online is the first that comes to mind). I believe how it has been done in the past is that players are put on a world server like any other MMO (or play locally, or with P2P) but when they enter a certain zone they are all transferred to the same server temporarily (or a specialised server) and put ...
3
If you're willing to ease on the requirement that a client should be informed of other clients that are exactly 200 blocks away or closer, then here's an idea: split your map to squares of, say, 200 blocks each side. Then you can keep track of where the client is, and inform the client of all other clients in the adjacent squares. More detailed discussion ...
2
Yes, online games with a large number of artificially intelligent agents is more than plausible.
When using a client-server model, the server runs a master copy of the game simulation, and the clients run their own copy if you are using client-side prediction.
Starsiege: Tribes was able was able to handle 128 human or AI players... in 1998.
TheĀ ...
0
You shouldn't be doing networking through XNA or Monogame.
Use C# / .net's built in System.Net code.
Specifically, sockets... just google "C# .net sockets client-server example" or similar things, and start learning how sockets work. Make an online chat room or something to practice... when you got it down, you can directly move your code over to your XNA ...
3
It is generally a good idea to only send the information to the client which is supposed to be shown to the player. Following this principle reduces network traffic and prevents cheating.
But keep in mind that when the player moves their character, you certainly want to start the move on the client-side before receiving the confirmation from the server to ...
6
You are on the right track.
Consider Minecraft. Minecraft only loads the areas (also called chunks) immediately surrounding players. This is how the server is able to run without running out of memory, and why clients don't get bogged down from network traffic.
If it is a very low amount of information being sent between Client/Server, would it make ...
0
It appears one of my assumptions was wrong. According to this:
GKMatchSendDataUnreliable mode, the image to be transmitted in the so-called UDP. GKMatchSendDataReliable mode image send by TCP. Should it be a GKMatchSendDataUnreliable usually.
Changing the send mode to real UDP (ie GKMatchSendDataUnreliable) appears to maintain low ping rates at 60 ...
6
First, you have to make sure how big the entire data is. Your ISP will most likely care about actual bytes sent, not the amount or frequency of datagrams. If you're sending maximum (65507 payload octects) sized datagrams 60 times per second, you're sending around 30 Mb/s upstream. Not everybody has that kind of connection.
Remember that the IP header is 20 ...
9
Not even home PC based action games or big MMOs run their packets at 60Hz. Plus having really small packet sizes is not necessarily a great thing, each one of those tiny packets has a big overhead in just sending it out.
Try shooting for 10Hz updates with some client-side interpolation. I assume that you're already interpolating because there will always ...
1
If you need to use UDP over TCP for performance reasons then per-packet authentication seems counter productive. I would recommend using 2 stacks - UDP for high performance communication such as location updates - and TCP for secure communications or communications that must not fail sporadically due to dropped packets.
1
I think your algorithm is pretty close to one I wrote in this answer to a similar question, but I'm concerned that this line in your algorithm isn't doing what you'd like:
b: receives message. If a.localTime + dTime(b-a) is very close to new b.localTime, send accept message.
You should be figuring out roughly how long the packets are taking to get from ...
Top 50 recent answers are included
