Jump to content
  • Advertisement

rrr333

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rrr333

  • Rank
    Newbie

Personal Information

  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I test with a USB LTE modem and get ~1-2% both in a big city and 15km near, friends report me same numbers. But of course this is just an observation and not a way to judge all modern wireless connections. 2d ships with arcade controls (can change direction instantly). I don't intend to use prediction because control feels ok even with high latency and the only annoying problem is occasional stuttering. And on a normal connection everything is fine. But it seems that what I want is not too far from an actual prediction but with a different purpose (not to hide latency). Ok, thanks, I now see that it should solve the "initial packet delayed" and "latency was higher but then decreased" problems. Btw, does a reverse problem of "latency increased for the rest of game session" exist and can it "safely" be ignored? By "safely" I mean won't a more complex scheme behave differently and "worse" than the most basic (just interpolate) scheme in that scenario?
  2. So I need some dynamically adjusted variable which I then add to timestamps received from server and then "compare" this sum to client time. Is my understanding correct? And if yes how should this offset be calculated?
  3. Thank you for response. Can you elaborate one more thing? Imagine a situation when the very first packet gets lost/resent and in the end arriving with some big delay. So client starts measuring it's time as if there's some inadequate ping. Will everything converge and act properly for the client after some time? Or should some additional measures be taken to somehow account for this or similar scenarios?
  4. I'm forced to use TCP this is a browser game via websockets.
  5. Hello, I've setup a basic entity interpolation for a multiplayer game and everything works ok. Currently I'm trying to improve it for bad connections with packet loss. The game uses TCP so in case of packet loss on client it looks like the delivery is stopped for ~300ms and then everything is received at once. I observe the same behavior on a wireless internet connection and on a good connection with packet loss simulator ("clumsy"). I suppose for many realtime multiplayer games this delay is too much and nothing can be done, but movement in my game is somewhat predictable and extrapolating last movement even for longer periods of time (with possible smooth corrections after) will look better than just freezing movement. So my goal is to interpolate when everything is ok and extrapolate in case of packet loss but still let client be behind in time. My current scheme involves "startPos", "curPos", "endPos" and "startTime" variables. Every time position is received, I set startPos = curPos, endPos = received pos, startTime = now, and every frame interpolate from startPos to endPos with t ranging from 0.0 when now == startTime to 1.0 when now >= startTime + 100 (an arbitrary constant larger than expected send rate). To introduce extrapolation my initial solution was to stop clamping t to 1.0, but it failed because after extrapolating for some time, old data is received and movement looks like entity jerks backwards. To fix this I started sending server time in form of "server now - first send time" so client now has two times: server time and client time in form of "client now - first receive time". But this is where my thought process stops and I don't know what to do next. All schemes I come to will work in case of packet loss (which can be treated as temp latency increase) but will be ruined by a permanent latency increase (network route change? idk if this is a good example) and client will either extrapolate too forward and suffer from corrections or interpolate too behind and have extra latency. So how should I utilize these times to achieve desired 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!