<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Networked Physics</title>
	<atom:link href="http://gafferongames.com/game-physics/networked-physics/feed/" rel="self" type="application/rss+xml" />
	<link>http://gafferongames.com</link>
	<description>Glenn Fiedler&#039;s Game Development Articles and Tutorials</description>
	<lastBuildDate>Tue, 07 Sep 2010 17:03:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rivercola</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-602</link>
		<dc:creator>Rivercola</dc:creator>
		<pubDate>Wed, 17 Feb 2010 18:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-602</guid>
		<description>A very useable game physics introduction. If you are further seriously interested in that topic, you should have a look in this one: Essential Mathematics for Games and Interactive Applications: A Programmer&#039;s Guide. It covers a bunch of important topics about game physics in a clear manner. The part about linear- and rotational dynamics here could be from it. :)</description>
		<content:encoded><![CDATA[<p>A very useable game physics introduction. If you are further seriously interested in that topic, you should have a look in this one: Essential Mathematics for Games and Interactive Applications: A Programmer&#8217;s Guide. It covers a bunch of important topics about game physics in a clear manner. The part about linear- and rotational dynamics here could be from it. <img src='http://gafferongames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-601</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 16 Feb 2010 08:14:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-601</guid>
		<description>Yeah, that worked just fine, thanks.

Probably, but this is a really good starting point in physics simulation.

Many thanks,
Alex</description>
		<content:encoded><![CDATA[<p>Yeah, that worked just fine, thanks.</p>
<p>Probably, but this is a really good starting point in physics simulation.</p>
<p>Many thanks,<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-600</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Mon, 15 Feb 2010 21:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-600</guid>
		<description>actually, it&#039;s probably that the gravity is being applied as a force but not scaled by mass -- try adding that and it should fix it up. note that the collision will also seem more and more springy/spongy as you increase mass of the cube as well, you can compensate by adjusting the K and B for spring collision forces.

but yeah, pretty good example of the reason why physics engines don&#039;t use penalty methods for collision response these days (eg. spring forces) --- it&#039;s hard to tune and dependent on the mass of objects, amount of gravity etc.

bottom line: use ODE or Bullet instead :)</description>
		<content:encoded><![CDATA[<p>actually, it&#8217;s probably that the gravity is being applied as a force but not scaled by mass &#8212; try adding that and it should fix it up. note that the collision will also seem more and more springy/spongy as you increase mass of the cube as well, you can compensate by adjusting the K and B for spring collision forces.</p>
<p>but yeah, pretty good example of the reason why physics engines don&#8217;t use penalty methods for collision response these days (eg. spring forces) &#8212; it&#8217;s hard to tune and dependent on the mass of objects, amount of gravity etc.</p>
<p>bottom line: use ODE or Bullet instead <img src='http://gafferongames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-599</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Mon, 15 Feb 2010 21:22:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-599</guid>
		<description>could be. it&#039;s pretty old code - i&#039;d not recommend using this code for anything other than learning how client side prediction works :)</description>
		<content:encoded><![CDATA[<p>could be. it&#8217;s pretty old code &#8211; i&#8217;d not recommend using this code for anything other than learning how client side prediction works <img src='http://gafferongames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-598</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Mon, 15 Feb 2010 18:48:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-598</guid>
		<description>Hi Glenn,

I&#039;ve been playing around with your sample code, and I noticed that after changing cube&#039;s mass (e.g. to 5.0), it started to look like gravitational acceleration has been reduced. Bug somewhere, perhaps?

Thanks for this great article series.

Alex.</description>
		<content:encoded><![CDATA[<p>Hi Glenn,</p>
<p>I&#8217;ve been playing around with your sample code, and I noticed that after changing cube&#8217;s mass (e.g. to 5.0), it started to look like gravitational acceleration has been reduced. Bug somewhere, perhaps?</p>
<p>Thanks for this great article series.</p>
<p>Alex.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: encoder</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-597</link>
		<dc:creator>encoder</dc:creator>
		<pubDate>Thu, 21 Jan 2010 20:01:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-597</guid>
		<description>you are not correct.

but i know the fact about floating points across multiple platforms, systems,... you name it. i had the problem with syncing server with the client&#039;s web application. simple solution step up the precision on every individual calculation and round it down again; or you can tie multiple calculations together, as long as it dose not affect the initial precision. i have used it with floats and doubles; floats and 5 digit round numbers. the result was always the same.

and there is always the way to use bit level calculations. after all a 1 is a 1 and a 0 is a 0. it might not be as fast though. but, any way, this is useless in networking with approximation and smoothing involved. but it is good for syncing sensitive data, like bank balance.</description>
		<content:encoded><![CDATA[<p>you are not correct.</p>
<p>but i know the fact about floating points across multiple platforms, systems,&#8230; you name it. i had the problem with syncing server with the client&#8217;s web application. simple solution step up the precision on every individual calculation and round it down again; or you can tie multiple calculations together, as long as it dose not affect the initial precision. i have used it with floats and doubles; floats and 5 digit round numbers. the result was always the same.</p>
<p>and there is always the way to use bit level calculations. after all a 1 is a 1 and a 0 is a 0. it might not be as fast though. but, any way, this is useless in networking with approximation and smoothing involved. but it is good for syncing sensitive data, like bank balance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Speno</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-596</link>
		<dc:creator>Speno</dc:creator>
		<pubDate>Mon, 07 Sep 2009 04:45:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-596</guid>
		<description>*That it creates a CLIENT SIDE only collision field of the movement in the last &quot;latency&quot; seconds. The only solution being that each entity exists in the same time stream in the whole scene which is not practical.</description>
		<content:encoded><![CDATA[<p>*That it creates a CLIENT SIDE only collision field of the movement in the last &#8220;latency&#8221; seconds. The only solution being that each entity exists in the same time stream in the whole scene which is not practical.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Speno</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-595</link>
		<dc:creator>Speno</dc:creator>
		<pubDate>Mon, 07 Sep 2009 04:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-595</guid>
		<description>Thanks for the quick reply!

The authority scheme is no good as I am targeting competetive gaming.

This also makes latency a problem.

I have got collisions working fine where the server has the final say, but the client predicts them, using collision detection in the replay. My problem is that in the scenario (may not actually be a big issue in real situations):

I simulate about 1 second of latency
On the client simulation, the owned player runs through a section of empty space, a new entity is crosses paths anywhere the player passed through less than a second ago.

As the client is receiving state from 1 second ago from the server. It saves the current time, loads the state from the update into the player.

Making the player have a time of 1 second in the past, and having a position before the new entity that spawned.

The correction then replays the input of the player for the last second, causing it to collide only on the client with the other entity.

This causes the client to snap back for about half a second, then towards where the original position should have been. So in the end the server predicts correctly, and the client ends up in the correct state, but it suffers some nasty visual flicker.

I Guess 1 second latency is not realistic anyway, but as you can see, its not a problem of clients being in different timestreams, but multiple entities on 1 client being in different timestreams.

It might be nice to know that limitation of the client input replay method. That it creates a CLIENT SIDE only collision field of the movement in the last  seconds. The only solution being that each entity exists in the same time stream in the whole scene which is not practical.

Cheers,

Speno</description>
		<content:encoded><![CDATA[<p>Thanks for the quick reply!</p>
<p>The authority scheme is no good as I am targeting competetive gaming.</p>
<p>This also makes latency a problem.</p>
<p>I have got collisions working fine where the server has the final say, but the client predicts them, using collision detection in the replay. My problem is that in the scenario (may not actually be a big issue in real situations):</p>
<p>I simulate about 1 second of latency<br />
On the client simulation, the owned player runs through a section of empty space, a new entity is crosses paths anywhere the player passed through less than a second ago.</p>
<p>As the client is receiving state from 1 second ago from the server. It saves the current time, loads the state from the update into the player.</p>
<p>Making the player have a time of 1 second in the past, and having a position before the new entity that spawned.</p>
<p>The correction then replays the input of the player for the last second, causing it to collide only on the client with the other entity.</p>
<p>This causes the client to snap back for about half a second, then towards where the original position should have been. So in the end the server predicts correctly, and the client ends up in the correct state, but it suffers some nasty visual flicker.</p>
<p>I Guess 1 second latency is not realistic anyway, but as you can see, its not a problem of clients being in different timestreams, but multiple entities on 1 client being in different timestreams.</p>
<p>It might be nice to know that limitation of the client input replay method. That it creates a CLIENT SIDE only collision field of the movement in the last  seconds. The only solution being that each entity exists in the same time stream in the whole scene which is not practical.</p>
<p>Cheers,</p>
<p>Speno</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-594</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Fri, 04 Sep 2009 09:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-594</guid>
		<description>yes this is a problem with client-side prediction - since each player predicts differently, and is effectively in a different &quot;time stream&quot; to each other. also, rewinding and replaying the whole simulation gets very expensive, it&#039;s not really a practical option. even if you did do it, the results are *still* undefined when two players in different time streams interact with each other. not worth it!

one option is to just accept the lag. the server runs the simulation only, and the clients are dumb, perhaps interpolating between position/orientation samples using a hermite spline. in this case because the simulation runs on the server only, the interactions between players are all well defined. but of course, the players movement is all lagged.

if you cannot accept latency, another option is to use an authority scheme. you can find a quick overview of this technique here - http://developer.nvidia.com/object/physx_tips.html#Network. in an authority scheme, the collisions between players are still somewhat undefined, due to different time streams, but because you are not ever rewinding and replaying, it is cheaper to simulate and the result is much better.

just be aware that the authority scheme prone to cheating so it&#039;s best used for COOP games only.

cheers</description>
		<content:encoded><![CDATA[<p>yes this is a problem with client-side prediction &#8211; since each player predicts differently, and is effectively in a different &#8220;time stream&#8221; to each other. also, rewinding and replaying the whole simulation gets very expensive, it&#8217;s not really a practical option. even if you did do it, the results are *still* undefined when two players in different time streams interact with each other. not worth it!</p>
<p>one option is to just accept the lag. the server runs the simulation only, and the clients are dumb, perhaps interpolating between position/orientation samples using a hermite spline. in this case because the simulation runs on the server only, the interactions between players are all well defined. but of course, the players movement is all lagged.</p>
<p>if you cannot accept latency, another option is to use an authority scheme. you can find a quick overview of this technique here &#8211; <a href="http://developer.nvidia.com/object/physx_tips.html#Network" rel="nofollow">http://developer.nvidia.com/object/physx_tips.html#Network</a>. in an authority scheme, the collisions between players are still somewhat undefined, due to different time streams, but because you are not ever rewinding and replaying, it is cheaper to simulate and the result is much better.</p>
<p>just be aware that the authority scheme prone to cheating so it&#8217;s best used for COOP games only.</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Speno</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-593</link>
		<dc:creator>Speno</dc:creator>
		<pubDate>Fri, 04 Sep 2009 08:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-593</guid>
		<description>Hi Glen,

This article has been very useful in my understanding of networked physics, and has helped me build a game engine that supports multiple entities that follow your principals of state synchronisation.

However I am currently trying to fix a problem I am having with collision between 2 entities owned by different clients.

My collision detection works fine, but I started running into problems when I simulate high latency.

High latency is causing a client&#039;s player collide in their &quot;Replay&quot; period in the client prediction when it should not have.

As you only have 1 entitiy on your sample, and static collision planes you dont deal with this.

I understand the problem arrises from one entity being rewinded back in time to receive a correction, while other entities stay at the latest time.

If I rewinded everything in my scene when I do a client owned player state correction I could solve this problem, but this is going to get costly on the CPU time with any decent number of entities in my scene. Not to mention memory keeping a state history of all entities in my scene instead of the owned player.

I have tried removing collision detection during replay, but as a player with any real latency will be replayed every frame for the last / frames of movement, collisions need to also happen in replay.

Is there a simpler way to solve this than rewinding my entire scene by the latency amount for each client owned player update(ie every frame)?

(just to clarify if its not clear, by &quot;Replay&quot; I mean when the server sends out a sync update to a client regarding the player it owns, it rewinds to update time, then replays the input to current time)</description>
		<content:encoded><![CDATA[<p>Hi Glen,</p>
<p>This article has been very useful in my understanding of networked physics, and has helped me build a game engine that supports multiple entities that follow your principals of state synchronisation.</p>
<p>However I am currently trying to fix a problem I am having with collision between 2 entities owned by different clients.</p>
<p>My collision detection works fine, but I started running into problems when I simulate high latency.</p>
<p>High latency is causing a client&#8217;s player collide in their &#8220;Replay&#8221; period in the client prediction when it should not have.</p>
<p>As you only have 1 entitiy on your sample, and static collision planes you dont deal with this.</p>
<p>I understand the problem arrises from one entity being rewinded back in time to receive a correction, while other entities stay at the latest time.</p>
<p>If I rewinded everything in my scene when I do a client owned player state correction I could solve this problem, but this is going to get costly on the CPU time with any decent number of entities in my scene. Not to mention memory keeping a state history of all entities in my scene instead of the owned player.</p>
<p>I have tried removing collision detection during replay, but as a player with any real latency will be replayed every frame for the last / frames of movement, collisions need to also happen in replay.</p>
<p>Is there a simpler way to solve this than rewinding my entire scene by the latency amount for each client owned player update(ie every frame)?</p>
<p>(just to clarify if its not clear, by &#8220;Replay&#8221; I mean when the server sends out a sync update to a client regarding the player it owns, it rewinds to update time, then replays the input to current time)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
