Tag Info

New answers tagged

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 ...


0

No. What would be the point of that? The physics simulation in a game engine is not a real simulation in the sense that everything is done with the correct real-world formulas and reproducible. Doing so would require massively more computing power. Most of the time, you can't even exactly reproduce the same physics simulation in a game twice in a row. ...


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 ...


0

If you're using a byte for Local IDs then create an ID array with 256 slots for each room. When a player enters the room assign their Global ID to the first empty slot in the array and their Local ID can be their position in the array. When they leave just set the array to a reserved Global ID that indicates it's unused. If Global IDs are 128bits a piece the ...


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 ...


0

You could generate a random ID, compare it to the existing used IDs ingame, and if the generated ID matches one of the existing IDs, you restart the process. You keep doing this until you have a unique id. Here is an example in C#: //Lets assume you're using an array named 'idArray' filled the existing IDs Random rand = new Random(); int generatedID = -1; ...


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 ...


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 ...


-2

Most of RTS game like starcraft / warcraft etc only transmit player input between clients. After the game engine does the simulation with the input received. It's lighter for the network to only send the player's inputs. look at this post : How to implement lockstep model for RTS game?


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

Game states can be synchronised by sending "deltas"—messages that describe how to get from one game state to the next, rather than sending the whole state. You seem to have figured out that this is possible. To get you started on the right path of thinking, here's a more concrete (but naïve) way that could be implemented: In server code, store a boolean ...


1

Crashing? Does not make sense. You can send a lot of data nowadays. There is no reason using a lot of bandwidth would crash a properly implemented client. If it is literally crashing, you may need to debug some more. What to send: You don't need to send everything. Remember the client program is only used (normally): To accept input from the user, parse ...


0

you should try to minimize the amount of data you're sending - only send what is needed. Like ratchet freak said, for movement you could only send the direction if it updates. health also only on update. could you post a "log" of all things you're sending each time? We could then better help you to reduce it size.


1

NPC on a path only need to be sends periodically. However instead of only the position you also send the speed and direction the NPC is going. That you only need to send the data a few times a second and the client can extrapolate the current position of the NPC. Health should only be sent when it updates and once every few seconds as a sanity update.


1

I'm not used to UDK, by the way I'll try to answer your question at just a theoretical level. I'm trying to implement network games in a project of mine, and found out how to let client ping check servers without actually joining games. Also, this is an intuition from Halo:CE network code. Let's suppose the central server browser has a list of servers, ...



Top 50 recent answers are included