Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualFrank Force

Posted 05 April 2013 - 01:49 AM

You don't have to always be under frame-time budget to not get stutter.  If you are triple buffering you can have a long frame that is over your frame time budget as long as your next couple frames are fast enough to keep up and eventually put it far enough ahead to buffer out the next skip.  In my experience the OS will not normally eat up that much time especially when running in full screen mode.   The sacrifice is latency, that's what the triple buffering smooths out.  It is running 1 frame ahead (hopefully) so that when you lose a frame it won't stutter, it just gets less latent and when it drops that frame it will need to work faster to catch up.

 

Ok, I thought of a different way to explain the issue...

 

Lets say I'm writing a story at the same time you are reading it.  You read at exactly 60 pages per hour, in fact you read so precisely that every minute on the dot you finish the old page and start reading a new one.  I can write much faster then 60 pages per hour, maybe even twice as fast but sometimes I need to slow down to think and write much slower.   Problem is we only have 3 pieces of paper to share between us and I can't write on the same page you are reading.  To make matters worse we are in different rooms and can't see each other.  We have a helper who brings my new papers to you and your old papers back to me, but there is a bit of variance when we actually get that paper from the other person.   I can magically erase papers instantly when I get them.  Also we don't have synchronized clocks or any other way to communicate.

 

The question is can I keep feeding you papers without you every stalling out with nothing new to read?  The answer is pretty obviously yes I can as long as I don't fall too far behind because we have an extra paper to use as buffer.  As long as I keep that extra paper/buffer full I can take almost twice as long to write one page and we won't even miss a beat because you will just read the buffer while waiting.  After that happens I need to work hard to get that buffer full again, it might take a few pages before I am back on track but the important thing is you didn't have to stop reading.

 

We can also work the time delta thing into this.  Lets say we want every paper to have a time stamp on it.  We want those time stamps to be exactly 1 minute apart from each other because maybe in the story I'm writing each page accounts for exactly 1 minute of time in the fictional world I'm writing about.  Well I don't write pages at exactly 1 minute per page but I can just start with time index 0 and increment it by 1 minute for each page even if it takes me more/less then 1 minute to write it.  Basically I know that I need to write each page to represent 1 minute of fictional time regardless of how long it takes to write.  As far as you know the time stamps are correct and exactly 1 minute apart regardless of our relative times. Since you are reading at exactly the same rate as the time stamps then to you it will appear that each time stamp matches up with your own time.  The story you are reading represents 1 minute per page in the fictional world and it takes you exactly 1 minute to read each page. I'm writing you a story for you in real time and passing it back and forth without any stutter and only 3 pages to share.  It seems so simple when you think about it like that.  This is really no different then simulating physics on a computer and rendering with that specific interval rather then what time was measured between updates. 

 

With double buffering the situation gets a little worse.  We would only have 2 pieces of paper which means I always need to write faster then you can read plus enough to cover any variance we have when passing papers back and forth.  With a single buffer I'm basically writing to the same page you are reading, erasing the lines as I go.

 

Anyway I hope that helps someone understand a bit better what is going on. Or if I'm not making any sense, please let me know!


#22Frank Force

Posted 05 April 2013 - 01:48 AM

You don't have to always be under frame-time budget to not get stutter.  If you are triple buffering you can have a long frame that is over your frame time budget as long as your next couple frames are fast enough to keep up and eventually put it far enough ahead to buffer out the next skip.  In my experience the OS will not normally eat up that much time especially when running in full screen mode.   The sacrifice is latency, that's what the triple buffering smooths out.  It is running 1 frame ahead (hopefully) so that when you lose a frame it won't stutter, it just gets less latent and when it drops that frame it will need to work faster to catch up.

 

Ok, I thought of a different way to explain the issue...

 

Lets say I'm writing a story at the same time you are reading it.  You read at exactly 60 pages per hour, in fact you read so precisely that every minute on the dot you finish the old page and start reading a new one.  I can write much faster then 60 pages per hour, maybe even twice as fast but sometimes I need to slow down to think and write much slower.   Problem is we only have 3 pieces of paper to share between us and I can't write on the same page you are reading.  To make matters worse we are in different rooms and can't see each other.  We have a helper who brings my new papers to you and your old papers back to me, but there is a bit of variance when we actually get that paper from the other person.   I can magically erase papers instantly when I get them.  Also we don't have synchronized clocks or any other way to communicate.

 

The question is can I keep feeding you papers without you every stalling out with nothing new to read?  The answer is pretty obviously yes I can as long as I don't fall too far behind because we have an extra paper to use as buffer.  As long as I keep that extra paper/buffer full I can take almost twice as long to write one page and we won't even miss a beat because you will just read the buffer while waiting.  After that happens I need to work hard to get that buffer full again, it might take a few pages before I am back on track but the important thing is you didn't have to stop reading.

 

We can also work the time delta thing into this.  Lets say we want every paper to have a time stamp on it.  We want those time stamps to be exactly 1 minute apart from each other because maybe in the story I'm writing each page accounts for exactly 1 minute of time in the fictional world I'm writing about.  Well I don't write pages at exactly 1 minute per page but I can just start with time index 0 and increment it by 1 minute for each page even if it takes me more/less then 1 minute to write it.  Basically I know each page represents 1 minute of time exactly so it's not very hard for me to keep track of.  As far as you know the time stamps are correct and exactly 1 minute apart regardless of our relative times. Since you are reading at exactly the same rate as the time stamps then to you it will appear that each time stamp matches up with your own time.  The story you are reading represents 1 minute per page in the fictional world and it takes you exactly 1 minute to read each page. I'm writing you a story for you in real time and passing it back and forth without any stutter and only 3 pages to share.  It seems so simple when you think about it like that.  This is really no different then simulating physics on a computer and rendering with that specific interval rather then what time was measured between updates. 

 

With double buffering the situation gets a little worse.  We would only have 2 pieces of paper which means I always need to write faster then you can read plus enough to cover any variance we have when passing papers back and forth.  With a single buffer I'm basically writing to the same page you are reading, erasing the lines as I go.

 

Anyway I hope that helps someone understand a bit better what is going on. Or if I'm not making any sense, please let me know!


#21Frank Force

Posted 05 April 2013 - 01:46 AM

You don't have to always be under frame-time budget to not get stutter.  If you are triple buffering you can have a long frame that is over your frame time budget as long as your next couple frames are fast enough to keep up and eventually put it far enough ahead to buffer out the next skip.  In my experience the OS will not normally eat up that much time especially when running in full screen mode.   The sacrifice is latency, that's what the triple buffering smooths out.  It is running 1 frame ahead (hopefully) so that when you lose a frame it won't stutter, it just gets less latent and when it drops that frame it will need to work faster to catch up.

 

Ok, I thought of a different way to explain the issue...

 

Lets say I'm writing a story at the same time you are reading it.  You read at exactly 60 pages per hour, in fact you read so precisely that every minute on the dot you finish the old page and start reading a new one.  I can write much faster then 60 pages per hour, maybe even twice as fast but sometimes I need to slow down to think and write much slower.   Problem is we only have 3 pieces of paper to share between us and I can't write on the same page you are reading.  To make matters worse we are in different rooms and can't see each other.  We have a helper who brings my new papers to you and your old papers back to me, but there is a bit of variance when we actually get that paper from the other person.   I can magically erase papers instantly when I get them.  Also we don't have synchronized clocks or any other way to communicate.

 

The question is can I keep feeding you papers without you every stalling out with nothing new to read?  The answer is pretty obviously yes I can as long as I don't fall too far behind because we have an extra paper to use as buffer.  As long as I keep that extra paper/buffer full I can take almost twice as long to write one page and we won't even miss a beat because you will just read the buffer while waiting.  After that happens I need to work hard to get that buffer full again, it might take a few pages before I am back on track but the important thing is you didn't have to stop reading.

 

We can also work the time delta thing into this.  Lets say we want every paper to have a time stamp on it.  We want those time stamps to be exactly 1 minute apart from each other because maybe in the story I'm writing each page accounts for exactly 1 minute of time in the fictional world I'm writing about.  Well I don't write pages at exactly 1 minute per page but I can just start with time index 0 and increment it by 1 minute for each page even if it takes me more/less then 1 minute to write it.  So as far as you know the time stamps are correct and exactly 1 minute apart regardless of our relative times. Since you are reading at exactly the same rate as the time stamps then to you it will appear that each time stamp matches up with your own time.  The story you are reading represents 1 minute per page in the fictional world and it takes you exactly 1 minute to read each page. I'm writing you a story for you in real time and passing it back and forth without any stutter and only 3 pages to share.  It seems so simple when you think about it like that.  This is really no different then simulating physics on a computer and rendering with that specific interval rather then what time was measured between updates. 

 

With double buffering the situation gets a little worse.  We would only have 2 pieces of paper which means I always need to write faster then you can read plus enough to cover any variance we have when passing papers back and forth.  With a single buffer I'm basically writing to the same page you are reading, erasing the lines as I go.

 

Anyway I hope that helps someone understand a bit better what is going on. Or if I'm not making any sense, please let me know!


#20Frank Force

Posted 05 April 2013 - 01:45 AM

You don't have to always be under frame-time budget to not get stutter.  If you are triple buffering you can have a long frame that is over your frame time budget as long as your next couple frames are fast enough to keep up and eventually put it far enough ahead to buffer out the next skip.  In my experience the OS will not normally eat up that much time especially when running in full screen mode.   The sacrifice is latency, that's what the triple buffering smooths out.  It is running 1 frame ahead (hopefully) so that when you lose a frame it won't stutter, it just gets less latent and when it drops that frame it will need to work faster to catch up.

 

Ok, I thought of a different way to explain the issue...

 

Lets say I'm writing a story at the same time you are reading it.  You read at exactly 60 pages per hour, in fact you read so precisely that every minute on the dot you finish the old page and start reading a new one.  I can write much faster then 60 pages per hour, maybe even twice as fast but sometimes I need to slow down to think and write much slower.   Problem is we only have 3 pieces of paper to share between us and I can't write on the same page you are reading.  To make matters worse we are in different rooms and can't see each other.  We have some helpers who bring my new papers to you and your old papers back to me, but there is a bit of variance when we actually get that paper from the other person.   I can magically erase papers instantly when I get them.  Also we don't have synchronized clocks or any other way to communicate.

 

The question is can I keep feeding you papers without you every stalling out with nothing new to read?  The answer is pretty obviously yes I can as long as I don't fall too far behind because we have an extra paper to use as buffer.  As long as I keep that extra paper/buffer full I can take almost twice as long to write one page and we won't even miss a beat because you will just read the buffer while waiting.  After that happens I need to work hard to get that buffer full again, it might take a few pages before I am back on track but the important thing is you didn't have to stop reading.

 

We can also work the time delta thing into this.  Lets say we want every paper to have a time stamp on it.  We want those time stamps to be exactly 1 minute apart from each other because maybe in the story I'm writing each page accounts for exactly 1 minute of time in the fictional world I'm writing about.  Well I don't write pages at exactly 1 minute per page but I can just start with time index 0 and increment it by 1 minute for each page even if it takes me more/less then 1 minute to write it.  So as far as you know the time stamps are correct and exactly 1 minute apart regardless of our relative times. Since you are reading at exactly the same rate as the time stamps then to you it will appear that each time stamp matches up with your own time.  The story you are reading represents 1 minute per page in the fictional world and it takes you exactly 1 minute to read each page. I'm writing you a story for you in real time and passing it back and forth without any stutter and only 3 pages to share.  It seems so simple when you think about it like that.  This is really no different then simulating physics on a computer and rendering with that specific interval rather then what time was measured between updates. 

 

With double buffering the situation gets a little worse.  We would only have 2 pieces of paper which means I always need to write faster then you can read plus enough to cover any variance we have when passing papers back and forth.  With a single buffer I'm basically writing to the same page you are reading, erasing the lines as I go.

 

Anyway I hope that helps someone understand a bit better what is going on. Or if I'm not making any sense, please let me know!


#19Frank Force

Posted 05 April 2013 - 01:43 AM

You don't have to always be under frame-time budget to not get stutter.  If you are triple buffering you can have a long frame that is over your frame time budget as long as your next couple frames are fast enough to keep up and eventually put it far enough ahead to buffer out the next skip.  In my experience the OS will not normally eat up that much time especially when running in full screen mode.   The sacrifice is latency, that's what the triple buffering smooths out.  It is running 1 frame ahead (hopefully) so that when you lose a frame it won't stutter, it just gets less latent and when it drops that frame it will need to work faster to catch up.

 

Ok, I thought of a different way to explain the issue...

 

Lets say I'm writing a story at the same time you are reading it.  You read at exactly 60 pages per hour, in fact you read so precisely that every minute on the dot you finish the old page and start reading a new one.  I can write much faster then 60 pages per hour, maybe even twice as fast but sometimes I need to slow down to think and write much slower.   Problem is we only have 3 pieces of paper to share between us and I can't write on the same page you are reading.  To make matters worse we can't see each other either, we can somehow pass papers back and forth but there is a bit of variance when we actually get that paper from the other person.   I can magically erase papers instantly when I get them.  Also we don't have synchronized clocks or any other way to communicate.

 

The question is can I keep feeding you papers without you every stalling out with nothing new to read?  The answer is pretty obviously yes I can as long as I don't fall too far behind because we have an extra paper to use as buffer.  As long as I keep that extra paper/buffer full I can take almost twice as long to write one page and we won't even miss a beat because you will just read the buffer while waiting.  After that happens I need to work hard to get that buffer full again, it might take a few pages before I am back on track but the important thing is you didn't have to stop reading.

 

We can also work the time delta thing into this.  Lets say we want every paper to have a time stamp on it.  We want those time stamps to be exactly 1 minute apart from each other because maybe in the story I'm writing each page accounts for exactly 1 minute of time in the fictional world I'm writing about.  Well I don't write pages at exactly 1 minute per page but I can just start with time index 0 and increment it by 1 minute for each page even if it takes me more/less then 1 minute to write it.  So as far as you know the time stamps are correct and exactly 1 minute apart regardless of our relative times. Since you are reading at exactly the same rate as the time stamps then to you it will appear that each time stamp matches up with your own time.  The story you are reading represents 1 minute per page in the fictional world and it takes you exactly 1 minute to read each page. I'm writing you a story for you in real time and passing it back and forth without any stutter and only 3 pages to share.  It seems so simple when you think about it like that.  This is really no different then simulating physics on a computer and rendering with that specific interval rather then what time was measured between updates. 

 

With double buffering the situation gets a little worse.  We would only have 2 pieces of paper which means I always need to write faster then you can read plus enough to cover any variance we have when passing papers back and forth.  With a single buffer I'm basically writing to the same page you are reading, erasing the lines as I go.

 

Anyway I hope that helps someone understand a bit better what is going on. Or if I'm not making any sense, please let me know!


#18Frank Force

Posted 05 April 2013 - 01:42 AM

You don't have to always be under frame-time budget to not get stutter.  If you are triple buffering you can have a long frame that is over your frame time budget as long as your next couple frames are fast enough to keep up and eventually put it far enough ahead to buffer out the next skip.  In my experience the OS will not normally eat up that much time especially when running in full screen mode.   The sacrifice is latency, that's what the triple buffering smooths out.  It is running 1 frame ahead (hopefully) so that when you lose a frame it won't stutter, it just gets less latent and when it drops that frame it will need to work faster to catch up.

 

Ok, I thought of a different way to explain the issue...

 

Lets say I'm writing a story at the same time you are reading it.  You read at exactly 60 pages per hour, in fact you read so precisely that every minute on the dot you finish the old page and start reading a new one.  I can write much faster then 60 pages per hour, maybe even twice as fast but sometimes I need to slow down to think and write much slower.   Problem is we only have 3 pieces of paper to share between us and I can't write on the same page you are reading.  To make matters worse we can't see each other and just pass papers back and forth but there is a bit of variance when we actually get that paper from the other person.   I can magically erase papers instantly when I get them.  Also we don't have synchronized clocks or any other way to communicate.

 

The question is can I keep feeding you papers without you every stalling out with nothing new to read?  The answer is pretty obviously yes I can as long as I don't fall too far behind because we have an extra paper to use as buffer.  As long as I keep that extra paper/buffer full I can take almost twice as long to write one page and we won't even miss a beat because you will just read the buffer while waiting.  After that happens I need to work hard to get that buffer full again, it might take a few pages before I am back on track but the important thing is you didn't have to stop reading.

 

We can also work the time delta thing into this.  Lets say we want every paper to have a time stamp on it.  We want those time stamps to be exactly 1 minute apart from each other because maybe in the story I'm writing each page accounts for exactly 1 minute of time in the fictional world I'm writing about.  Well I don't write pages at exactly 1 minute per page but I can just start with time index 0 and increment it by 1 minute for each page even if it takes me more/less then 1 minute to write it.  So as far as you know the time stamps are correct and exactly 1 minute apart regardless of our relative times. Since you are reading at exactly the same rate as the time stamps then to you it will appear that each time stamp matches up with your own time.  The story you are reading represents 1 minute per page in the fictional world and it takes you exactly 1 minute to read each page. I'm writing you a story for you in real time and passing it back and forth without any stutter and only 3 pages to share.  It seems so simple when you think about it like that.  This is really no different then simulating physics on a computer and rendering with that specific interval rather then what time was measured between updates. 

 

With double buffering the situation gets a little worse.  We would only have 2 pieces of paper which means I always need to write faster then you can read plus enough to cover any variance we have when passing papers back and forth.  With a single buffer I'm basically writing to the same page you are reading, erasing the lines as I go.

 

Anyway I hope that helps someone understand a bit better what is going on. Or if I'm not making any sense, please let me know!


PARTNERS