Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Fast Paced Multiplayer Interpolation/Extrapolation or both?  (Read 5898 times)
0 Members and 1 Guest are viewing this topic.
Offline Paddi27

Junior Devvie


Medals: 1
Projects: 1



« Posted 2015-08-08 20:01:32 »

Hey guys i have a few questions for the more experienced users among you.
When doing a fast paced game like an action rpg or something like a 2D action shooter how you handle the latency issue?
The problem with extrapolation is, that it can predict wrong positions expacially when the player changes direction very quickly. So in result the correction can look a little weird and the higher the latency is the more incorrect the results are.
In interpolating things i see the problem, that the clients are noch perfectly in sync and something like traps , moving walls, which crash the player and so on ,are a problem because one client might see the player running into a trap while the other player with lower latency saw him dodging it. I know this is often discussed but how do expert game programmers handle it ?.
Are they only interpolating and do some extrapolation with hunge lag and take the different player views as they are or is there something else you can do about it to at least give the player the illusion that things are in sync?
Offline theagentd
« Reply #1 - Posted 2015-08-08 21:22:19 »

Extrapolation generally breaks down as latency increases, which is not a good behaviour for a system that is supposed to minimize the impact of latency. Interpolation is generally used. I believe many games do use extrapolation for certain fast-moving objects, for example vehicles that generally don't change direction or speed that quickly. For human player characters you're better off with interpolation. To compensate for latency, a shooter game generally "rewinds" time back to the moment when the player shot and does collision detection against the enemies at that moment. That makes aiming work as expected for players that are lagging (they don't have to shoot in front of enemies to hit), but also gives problems with lagging players seemingly shooting you around corners (they shot you before you ran around it from their perspective). There really isn't a perfect solution to the problem.

Myomyomyo.
Offline Paddi27

Junior Devvie


Medals: 1
Projects: 1



« Reply #2 - Posted 2015-08-08 21:51:58 »

First thanks for your time  Smiley. And jeah i know the problem and i use the method of position rewinding in my game too. It works good the only problem is that sometimes player got hit by monsters while others see the monster a few pixel away from the player . So yeay its the same shooting around the corner problem i think . When theres a ping of 100ms its ok an it doesnt actually stand out but a ping of 200+ and fast monster movement , from other players perspective, the monster often can be seen 100 or more pixel away. So you recommend to leave it as it is ? Besides for an action game what ping should be playable something like  < 150 ms?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jonjava
« Reply #3 - Posted 2015-08-09 08:41:04 »

You might find this article useful: http://gabrielgambetta.com/fpm_live.html

Offline Roquen

JGO Kernel


Medals: 518



« Reply #4 - Posted 2015-08-09 08:46:37 »

http://gafferongames.com/
Offline Paddi27

Junior Devvie


Medals: 1
Projects: 1



« Reply #5 - Posted 2015-08-09 10:37:24 »

Thank you for the articles guys they are very useful . I read some articles before which covered the same topics and at least i have to say that like "theagentd" said there is no real solution showing players on perfectly synced positions. I think using clientside interpolation and accept small delays at the client view is the best solution. Extrapolation for predictable entinities seems also a proper way of doing it.
Offline Roquen

JGO Kernel


Medals: 518



« Reply #6 - Posted 2015-08-09 12:41:28 »

Glenn Fiedler tweeted this at the beginning of this month:  "I plan to extent my article series on the subject to cover various network models, and describe latency hiding approaches 4 each".

Somewhere (but I don't recall where) he have a high level pros and cons on the major ways to design networking.
Offline Abuse

JGO Ninja


Medals: 72


falling into the abyss of reality


« Reply #7 - Posted 2015-08-09 12:42:58 »

http://gdcvault.com/play/1022195/Physics-for-Game-Programmers-Networking

Really good talk.

Given how easy Java makes it to implement deterministic lockstep (w.r.t. strictfp), I'm surprised it's not a more popular choice for Java games - especially with the quite significant downsides of the alternatives. (bandwidth / maintainability)
Pages: [1]
  ignore  |  Print  
 
 

 
Riven (463 views)
2019-09-04 15:33:17

hadezbladez (5323 views)
2018-11-16 13:46:03

hadezbladez (2250 views)
2018-11-16 13:41:33

hadezbladez (5599 views)
2018-11-16 13:35:35

hadezbladez (1164 views)
2018-11-16 13:32:03

EgonOlsen (4600 views)
2018-06-10 19:43:48

EgonOlsen (5474 views)
2018-06-10 19:43:44

EgonOlsen (3139 views)
2018-06-10 19:43:20

DesertCoockie (4033 views)
2018-05-13 18:23:11

nelsongames (4782 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!