Jump to content

Basil

Veteran Driver VII
  • Posts

    8
  • Joined

  • Last visited

Posts posted by Basil

  1. I can see projectory calculations without getting any new data will often lead to worser accidents than today tho...

    No new data from peer means that it is probably disconnected, and will be auto-kicked by server.

    Under normal (desired) conditions, no extra calculations are made on your side, your game client only uses provided data by other peers.

     

    I can see the extra calcs may be required in situation such as:

    There are 2 players around, both have ping 50-100ms and do not lag. Default calcs produces data points for 400ms(i.e. 100ms for sync positions, 100ms for the next waypoints if no data arrives just in time, and 200ms of waypoints ahead if still no data arrives). every 100ms-200ms data updated, so only first or first+second waypoints used).

    And suddenly your pings drops from 50ms to 600ms, you are still connected to the server, but connection is fuzzy now. Until first package with 1200ms+ data arrives from the peer, your game client could(should) generate extra points to follow the course. (Or do anything else, like change that truck state to ghost mode, and wait until it will be at distance >500m(or whatever) from all players in area for more than 2 seconds, before transiting back from ghost to normal, and start from sync waypoint again).

     

    Again nice detailed idea, even I think it is a bit utopic in this project.

    From my point of view, no big changes required to mod or server. Send extra data, and use different point for truck placement (with switch: old/new point machanics should be used).

     

  2. -1 unnecessary in my opinion. This would probably eat a lot of cpu, considering i can barely run the game.

    You computer calculates only your route. All other data used as is (as provided by other peers). Your route calculations could be done in separate thread, and should not affect whole game performance. Couple of math operations required.

     

     

    I like the idea. But what if the player that is infront needs to brake/stop the truck for 'x' reason and the truck behind him has got lag?

     

    Precalculations would make the truck on the back ram the guy infront.. And that's not good either.

    Such situaltion depends on lag time, overall ping, autokick-due-to-ping-feature, and ofcourse back-guy reaction skills.

    If hit the emergency breaks now on 90kmh, back-guy can not react as well, and ram you. 

     

    Point of suggestion is no to remove 'force majeure' ramming and accidents, but smooth overall driving experience.

  3. This only works if the lag is caused by the server or the other player's internet connection and not by the other player's client. If your client freezes for a few seconds to load some dozen trucks at once, time stands still for the client while the server time and other player clients' time advances. 

    This is true. But such situation can be mitigated with 2 scenarios.

    If you are lagging while loading dozen of trucks - most likely nearby players should also lag(comparable) as you both entering high population area.

     

    Such situations can be determinated based on players time and server time during sync operation, and can be mitigated by adjustments based on delta-speed vs avg. speed before and after lag. From player2 perspective (who does not lag, and follow player1), this will result in visibility, that player1 is lowering speed. From player1 perspective that will result in visibility, that player2 moving as previously(time is stalled and not yet synced on player1 game client), and got some acceleration(time is synced, epsilon is high due to missed or inaccurate data frames). 

     

    In current situation truck just freezes, and got front hit on 80mph. With trajectory, you will have some time to change direction or your game client can remove such player(with lags, and too many prediction points usage, without new data being recieved), and re-spawn it when new data recieved, and truck is not nearby you (this is just an example).

     

    And dont forget, that there is autokick for high ping (~2 secs of high or no ping). If player1 is lagging hard, it will be disconnected from the server, and player1 truck disappears from player2 game.

  4. Suggestion Name: Precalculation of truck trajectories (Prediction of truck trajectories).

    Suggestion Description: Change moving behavior for spawned trucks on player side, so they would move within last known values and threshold without game server data exchange during network spikes and lags.

    Any Example images: Take a look into examples.

    Why should it be added?: Such implementation(or based on this technique) will increase smoothness of ets2mp gaming process and take multiplayer to the next level. 

    This will result in reducing accidents and crashes on the roads, will reduce notisable desync effect for players. Map area should be more consistent for nearby players.

    All players should be able to see same picture during driving(opposite to the current situation: two same trucks are at semaphore, on nearby roadlines. On green line both push the accelerator. Both players see on their screens that they are in front of each others truck, but actually they are not.)

    Convoys would be the awesomenauts from now on ;)

     

    Game administrators can enable/disable such smoothing effect to see the real position and player actions based on ping, to detect dangerous&reckless driving.

     

    The details:

    There are two major problems with current multiplayer gaming experience:

    1) Desync issues caused by the ets2 singleplayer game design. All data is processed on client side, any lack of info produces different results for different players.

    2) Ping and network spike issues. If anything interfering into the network, and there is a ping spike, game data is not delivered on time and this increase the #1 issue.

    Lots of accidents and crashes were caused by this.

     

    For now(correct me, if I'm wrong here), all traffic spawned on game client is static. There is no movement for nearby trucks unless new portion of data is sended from truck owner to server, and data is re-transmited by server to nearby game clients.

     

    Conditions:

    1) Player ping to the server is measured: average or instant, same as 'nearby players tab'.

    2) Player truck telemetry is available: events; attributes: current position(world space position and orientation), speed, wheel position.

     

    Game client sends to server not only current position data, but also predicted trajectory for the duration of ~(ping * 4)ms time, basically up to ~400-600ms. The amount of points generated should depend on current and predicted speed, and timed-loop interval, which is used for moving spawned trucks in-game.

     

    post-16500-0-13518500-1421761443_thumb.p

    Pic 1. Trajectory prediction

     

    X - truck state. T - game time.

    T0 is current game time(zero point); T-1, T-2 - previous measurements; T+1, T+2 - generated points based on telemetry data;

    E - epsilon of calculations and difference between real and calculated data.

    E-1, E-2 - epsilon from backwards calculation, which is used for correction calculated data. E+1, E+2 - predicted epsilon for generated data. Can be used in threshold calculations for applying data for the other players game world.

     

    Trajectory calculated based on previous telemetry events recieved(more points = more precise data generation, atleast 2 measurements are needed for determining acceleration/deceleration is in progress, and wheel positions for determining large radius turns. average time for awesome results: 1 ping interval, ~30-50-100ms). Approximation of wheel position also results in smoothing target direction in case of extreme and nervous left-right-right-left-left-right turns for stabilization of a truck during/after the turns.

     

    Depending on player ping to the server, only few points (less than generated) would be used by other clients for placing players truck, so E1 and E2 are really not notisable. They also depends on the algorithm choosed for the predicted data generation.

     

    So, the Player1 sends current data + predictions to the server, and server retransmit data to the clients. Client spawns truck, and uses it's current position. During the in-game loop, if no new data arrives, truck is moved based on prediction points. When new data arrives it taked into account, used, and new prediction points are stored for future use. For smoothness, if difference between next predicted point (which should be used in case no data arrives) and current(also previous points may be used here) points is within the threshold, approximated(with interpolation or any other) position can be used for truck movement. In general words, actual received data is never used itself, but is used for correction/approximation and for precalculation (thats because when other players real data arrives to the player host, this data is already outdated in terms on game time, due to player1->server->player2 transfer duration).

     

    If all precalculated points are depleted from the queue, and no new info received (but player is not yet disconnected from the game for some reason) - some extra calculations can be done on client side(with higher epsilon of course), by reusing previously received data.

     

    Example 1:

    Typical incident on straight road. Speed 80mph. Player1 lagged (network spike, ping increases) and holds(freezes) on road. Player2 has to push breaks to avoid the accident, or crash into the [censored].

    post-16500-0-10691600-1421767306_thumb.p

    Pic 2. Accident when player1 lagged. Pain and screams on the road.

     

    With precalculations - player1 is moved further within the according data. Player2 does not notice the player1 lag.

     

    post-16500-0-33187900-1421767309_thumb.p

    Pic 3. Everthing is alright on the road. You can hear the birds and eurotruckradio.com

     

    Example 2:

    Truck stabilization after truck turn, or during a accidential wheel turn on high speed, while being distracted.

     

    post-16500-0-36843800-1421769058_thumb.p

    Pic 4. Other player expect you to drive in a straight line.

     

    If this suggestion would be found usefull and interesting, I can provide some data from experiments regarging predicted and real trajectories during my roadtrips with several prediction algoriths, as well as plugin source code for data generations, which can be used as starting point for the integration to ets2mp.

     

    Thanks for reading, if you have any questions, feel free to ask.

     

    Regards,

    Basil.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.