<?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, 31 Jan 2012 03:56:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-28008</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Fri, 09 Dec 2011 19:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-28008</guid>
		<description>It should be OK, the &quot;move back in time&quot; is easy to implement. Just remember historical positions for objects for a second or so, and have a function to move the state of the world back in time before you do projectile raycasts. This is pretty easy and cheap to do.</description>
		<content:encoded><![CDATA[<p>It should be OK, the &#8220;move back in time&#8221; is easy to implement. Just remember historical positions for objects for a second or so, and have a function to move the state of the world back in time before you do projectile raycasts. This is pretty easy and cheap to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-28007</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Fri, 09 Dec 2011 19:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-28007</guid>
		<description>Do you really need to make it cheat proof at this point? If so my advice is to google for &quot;Valve Client Side Prediction&quot; and &quot;Valve Latency Compensation&quot; and follow that network model, or download the Quake or Doom3 source code and follow how they do it there. 

And yes, time synchronization is complicated because it depends entirely on your network model, depending on your network technique you need very little of it, or a lot. I&#039;ve shipped games with completely unsynchronized clocks, loosely synced clocks, and have done R&amp;D projects with deterministic lockstep that requires complete synchronization.

cheers</description>
		<content:encoded><![CDATA[<p>Do you really need to make it cheat proof at this point? If so my advice is to google for &#8220;Valve Client Side Prediction&#8221; and &#8220;Valve Latency Compensation&#8221; and follow that network model, or download the Quake or Doom3 source code and follow how they do it there. </p>
<p>And yes, time synchronization is complicated because it depends entirely on your network model, depending on your network technique you need very little of it, or a lot. I&#8217;ve shipped games with completely unsynchronized clocks, loosely synced clocks, and have done R&#038;D projects with deterministic lockstep that requires complete synchronization.</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-27843</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27843</guid>
		<description>You could totally consider using 64bit or 128bit fixed point instead of floats, but then you&#039;d have to write all your own routines for sqrt, sin/cos/tan, etc. It would be totally portable and deterministic, but would be a lot of work. For example, Warcraft 3 did something like this, they could not get floating point deterministic so they emulated floating point in integer, about 5% of the frame time of their game was spent doing this.</description>
		<content:encoded><![CDATA[<p>You could totally consider using 64bit or 128bit fixed point instead of floats, but then you&#8217;d have to write all your own routines for sqrt, sin/cos/tan, etc. It would be totally portable and deterministic, but would be a lot of work. For example, Warcraft 3 did something like this, they could not get floating point deterministic so they emulated floating point in integer, about 5% of the frame time of their game was spent doing this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-27842</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27842</guid>
		<description>The simulation is very tuned for specific masses. If you change mass, you should change gravity and all the collision constraint forces, or vice versa. Not really the best way to do it, but quick &amp; fast for me to code.</description>
		<content:encoded><![CDATA[<p>The simulation is very tuned for specific masses. If you change mass, you should change gravity and all the collision constraint forces, or vice versa. Not really the best way to do it, but quick &#038; fast for me to code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-27841</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27841</guid>
		<description>Indeed. I speak at GDC each year with these guys in the Maths and Physics Tutorial days! :)</description>
		<content:encoded><![CDATA[<p>Indeed. I speak at GDC each year with these guys in the Maths and Physics Tutorial days! <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-27840</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27840</guid>
		<description>It depends on what you are predicting, for example if you have a FPS game then prediction is usually just ballistic, eg. a simplified physics that knows how to apply gravity while falling and how to slide along surfaces (running some collision) when on the ground.

However, as players can change direction almost instantly in FPS games (high jerk) prediction is of limited benefit. Most games assume you can get about 0.25secs of prediction in before it becomes potentially totally inaccurate, so if no packets are received after 0.25 secs the character stops extrapolating and stays still until the next packet arrives. This is rare, but avoids the players running fullspeed into walls when a player times out (it takes 10-15 secs to detect dirty disconnect via timeout... :)

In racing games input has a less direct effect, being that your momentum is so high the input typically guides the momentum slightly left vs. right, but cannot make the vehicle turn on a dime. Consider networking say, F-Zero or Wipeout for example. Here you should easily be able to come up with physics equations that predict 0.25sec or more of motion from the initial conditions sent each packet, and this prediction should be reasonably accurate. The error that needs to be repaired if the input changes and the remote view does not receive this is much smaller.

In some cases, especially physics simulation like with my &quot;Fiedler&#039;s Cubes&quot; demo, the movement is slow and prediction is not necessarily important, except to fill the gaps between packets arriving -- in this case, i just hold last inputs received and extrapolate with the physics simulation. You cannot do this for a racing game, because of the high speeds involved, the lag multiplied by the speed is quite a big difference in position, so you have to extrapolate forward to have two racing cars &quot;next&quot; to each other compensating for lag. But in my cube demo, speeds are slow, so I just have the other player cubes effectively running in the past.

I hope this is useful.

cheers</description>
		<content:encoded><![CDATA[<p>It depends on what you are predicting, for example if you have a FPS game then prediction is usually just ballistic, eg. a simplified physics that knows how to apply gravity while falling and how to slide along surfaces (running some collision) when on the ground.</p>
<p>However, as players can change direction almost instantly in FPS games (high jerk) prediction is of limited benefit. Most games assume you can get about 0.25secs of prediction in before it becomes potentially totally inaccurate, so if no packets are received after 0.25 secs the character stops extrapolating and stays still until the next packet arrives. This is rare, but avoids the players running fullspeed into walls when a player times out (it takes 10-15 secs to detect dirty disconnect via timeout&#8230; <img src='http://gafferongames.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In racing games input has a less direct effect, being that your momentum is so high the input typically guides the momentum slightly left vs. right, but cannot make the vehicle turn on a dime. Consider networking say, F-Zero or Wipeout for example. Here you should easily be able to come up with physics equations that predict 0.25sec or more of motion from the initial conditions sent each packet, and this prediction should be reasonably accurate. The error that needs to be repaired if the input changes and the remote view does not receive this is much smaller.</p>
<p>In some cases, especially physics simulation like with my &#8220;Fiedler&#8217;s Cubes&#8221; demo, the movement is slow and prediction is not necessarily important, except to fill the gaps between packets arriving &#8212; in this case, i just hold last inputs received and extrapolate with the physics simulation. You cannot do this for a racing game, because of the high speeds involved, the lag multiplied by the speed is quite a big difference in position, so you have to extrapolate forward to have two racing cars &#8220;next&#8221; to each other compensating for lag. But in my cube demo, speeds are slow, so I just have the other player cubes effectively running in the past.</p>
<p>I hope this is useful.</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-27839</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27839</guid>
		<description>The bottom line is that the authority scheme is very suited to physics heavy COOP games, for a good example look at &quot;Ratchet and Clank: All 4 One&quot;. It&#039;s a COOP game using an authority scheme and it does very well. It would be difficult to see how to do all that they do with a rewind &amp; replay scheme, that would be quite expensive.

Another physics heavy sync approach can be seen in &quot;Little Big Planet&quot;. There is is networked deterministically by sending inputs, the cost being that you may only support a low player count (2-4) and the game network quality is proportional to the player with the worst network connection.

Also, see my GDC2011 talk about networked physics. The part in there about how GGPO does it, is basically the same strategy that LBP uses.

And yes. Yes he is :)</description>
		<content:encoded><![CDATA[<p>The bottom line is that the authority scheme is very suited to physics heavy COOP games, for a good example look at &#8220;Ratchet and Clank: All 4 One&#8221;. It&#8217;s a COOP game using an authority scheme and it does very well. It would be difficult to see how to do all that they do with a rewind &#038; replay scheme, that would be quite expensive.</p>
<p>Another physics heavy sync approach can be seen in &#8220;Little Big Planet&#8221;. There is is networked deterministically by sending inputs, the cost being that you may only support a low player count (2-4) and the game network quality is proportional to the player with the worst network connection.</p>
<p>Also, see my GDC2011 talk about networked physics. The part in there about how GGPO does it, is basically the same strategy that LBP uses.</p>
<p>And yes. Yes he is <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-27838</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:20:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27838</guid>
		<description>Yes. The server does not do any rewinding, however it is typical for projectile hit detection for the server to keep track of historical positions for each player such that it can check if projectiles hit, some time in the past. Google for &quot;Valve Latency Compensation&quot; to read more about this. cheers</description>
		<content:encoded><![CDATA[<p>Yes. The server does not do any rewinding, however it is typical for projectile hit detection for the server to keep track of historical positions for each player such that it can check if projectiles hit, some time in the past. Google for &#8220;Valve Latency Compensation&#8221; to read more about this. cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-27837</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:19:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27837</guid>
		<description>If you are shipping on the PC it is abundantly clear you want to do #1. Google for &quot;Valve Client Side Prediction&quot; and &quot;Valve Latency Compensation&quot; to understand how it is done server side including projectile hit detection.

If you do #2, you really can only pull this off if you are COOP, or if you are on a console platform and have some way to detect these cheats. For example, Halo does this. Study the &quot;Networking Halo Reach&quot; talk by David Aldridge from GDC2011. 

Even then it&#039;s a large risk and the cheat detection code is onerous. I only recommend #2 if you lots of physically simulated objects that must interact with each other that would be too expensive/complicated to rewind and replay.

cheers</description>
		<content:encoded><![CDATA[<p>If you are shipping on the PC it is abundantly clear you want to do #1. Google for &#8220;Valve Client Side Prediction&#8221; and &#8220;Valve Latency Compensation&#8221; to understand how it is done server side including projectile hit detection.</p>
<p>If you do #2, you really can only pull this off if you are COOP, or if you are on a console platform and have some way to detect these cheats. For example, Halo does this. Study the &#8220;Networking Halo Reach&#8221; talk by David Aldridge from GDC2011. </p>
<p>Even then it&#8217;s a large risk and the cheat detection code is onerous. I only recommend #2 if you lots of physically simulated objects that must interact with each other that would be too expensive/complicated to rewind and replay.</p>
<p>cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Fiedler</title>
		<link>http://gafferongames.com/game-physics/networked-physics/#comment-27836</link>
		<dc:creator>Glenn Fiedler</dc:creator>
		<pubDate>Thu, 08 Dec 2011 18:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.gaffer.org/wordpress/networked-physics/#comment-27836</guid>
		<description>I don&#039;t recommend predicting other players in an FPS. Instead, interpolate their motion and accept that it is &quot;behind&quot; relative to the client. Keep track of exactly how much, then you can compensate for this on the server when you check player projectiles hit another player -- keep a historical buffer of positions for each player on the server, then look &quot;back in time&quot; the amount equal to latency + amount of interpolation (if you do valve like interpolation on client), then you&#039;ll have the projectiles hitting without the player having to lead by the amount of lag

For more information google for &quot;Latency Compensation Valve&quot;

cheers</description>
		<content:encoded><![CDATA[<p>I don&#8217;t recommend predicting other players in an FPS. Instead, interpolate their motion and accept that it is &#8220;behind&#8221; relative to the client. Keep track of exactly how much, then you can compensate for this on the server when you check player projectiles hit another player &#8212; keep a historical buffer of positions for each player on the server, then look &#8220;back in time&#8221; the amount equal to latency + amount of interpolation (if you do valve like interpolation on client), then you&#8217;ll have the projectiles hitting without the player having to lead by the amount of lag</p>
<p>For more information google for &#8220;Latency Compensation Valve&#8221;</p>
<p>cheers</p>
]]></content:encoded>
	</item>
</channel>
</rss>

