Jump to content
  • Advertisement

FurgleFingle

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

100 Neutral

About FurgleFingle

  • Rank
    Newbie
  1. FurgleFingle

    sending packet 6300 times every second !

    It looks like everyone has forgotten the most important thing, remember to set the UDP sockets as non-blocking. Otherwise each frame you'll be waiting for a packet to arrive, which is no good.Then just send one packet per frame.Do not expect to receive one packet every frame. This is important otherwise your client is going to gradually lag further and futher behind the server. Instead receive as many packets as you can. Loop until the receive indicates there are no more packets, it either returns a zero length or a would block error. Off hand I don't remember which. This way if one packet gets lost or one packet is delivered at nearly the same time as the next then you will exhaust all packets received during the frame.
  2. FurgleFingle

    Few questions I had after reading the FAQ

    As with endianness and alignment, don't assume the size of bool and size_t are the same across platforms either. They're not. Always make sure you are dealing with values that are size specific, for example int16, int32, float32 etc. You can also use float16, which is a special 16 bit version of a floating point number. It gives you less range than the 32 bit version but it uses 2 fewer bytes and can be useful for small range deltas.
  3. Have a shared time for your network game and use that to tag updates. Use a few tens of ms to buffer and sort received updates before processing them. This reduces the jitter you see on each client.
  4. A gateway gives you a single point of failure. For that reason alone I wouldn't use one. If you are going to use a gateway don't code it yourself. Get an off the shelf dedicated bit of kit from a reliable vendor. Then basically you're talking about a firewall and load balancer instead. A really decent bit of kit should be able to be programmed with your typical game packet format and able to discard malformed packet before they reach the zone servers. That is slightly different to the gateway you seemed to have in mind though.
  5. You can do a few things if one of the hosts is a normal player. You can have all players in the session subject what they think is the result of the match. Then have the ranking server decide on what is the majority point of view. Only allow a player to submit a game for ranking once every X minutes. Look for patterns in the data from specific players. If they are always playing and winning against the same players make it so their scores eventually count for less and less. Spot patterns like duplicate IPs, or similar ranges for players in the same match. Have regular reports of the game during playing. If the intermediate reports look fishy then ignore the results.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!