Tag Info

Hot answers tagged

13

There is no reason to communicate over the network when the player selects units, because in most games just selecting a unit has no game-mechanical consequences. So this is an information which isn't relevant to the server or to the other players. But what would be important is when the player gives a command to one or more units. When issuing a ...


4

No. And there is rarely a need for exact physics replication. You mention multiplayer in your tags. Generally, in a multiplayer game, the physics and game logic is performed by one instance, which can be the server hosting the game, or one of the client that hosts the game. Each simulation step, that authority, the server, performs logic update and ...


1

Yes, you'd essentially create a bridge - no wrapper - but that's terminology. The basic idea is to use two network connections. You've got one listen port that will act to the actual game as if it was the actual game server. The bridge will also establish a connection to the real server and pretend to be the actual game client. The rest is pretty ...


1

It's not necessary in TCP as, as @congusbongus said, TCP can automatically detect disconnects. But doing it your self has the extra advantage of being able to know how much lag there is on the server, as well as being able to give advanced warning of the problem while TCP is still trying to reconnect. All in all, I'd say add pings, they're not difficult to ...


1

There is no need to ping if you are using TCP. TCP has built in mechanisms for detecting disconnects, congestion, or easily deriving latency. To elaborate: the Keep Alive feature sends small packets during idle times to detect disconnections. The TCP header contains sequence numbers and ACK numbers that exactly correspond to each other, so you can measure ...


1

Okay so I played around with the ID assignments a bit and came up with this: After every player is assigned and ID, the number gets put in a list called TakenIDs. A for loop checks which number isn't contained in TakenIDs. As soon as a viable number pops up, the for loop is broken and that number is returned then added to TakenIDs. When a player leaves, his ...


1

If you're using a server, even if only for matchmaking, just assign them one. You can use a counter as they sign up for accounts. Alternately you could use a random number and check for duplicates. Or use their screen name as a unique id. You can use a hash of their e-mail address or some other unique data. Microsoft came up with a system of generating ...



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