• Create Account

### #ActualAlysiumX

Posted 02 July 2012 - 07:56 PM

private void GameLoop(){
while(running){
if (within frames per second){
Update();
}
Draw();
}
}

This isn't an accurate representation of frames per second. The code should be changed to the following:
private void GameLoop(){
while(running){
if (within frames per second){
Draw();
}
Update();
}
}


ive been confused on this for quite some time, so you limit the draw rate by frame per second not the update?

I don't understand this concept.

Wouldn't this happen?

http://imageshack.us...rawexample.png/

Which would make the draw part of the program drop frames?

### #4AlysiumX

Posted 02 July 2012 - 07:03 PM

private void GameLoop(){
while(running){
if (within frames per second){
Update();
}
Draw();
}
}

This isn't an accurate representation of frames per second. The code should be changed to the following:
private void GameLoop(){
while(running){
if (within frames per second){
Draw();
}
Update();
}
}


ive been confused on this for quite some time, so you limit the draw rate by frame per second not the update?

I don't understand this concept.

Wouldn't this happen?

http://imageshack.us...rawexample.png/

Which would make the draw part of the program drop frames?

Note : Picture actually assumes program update 60 frames per second,
Draw updates at 30 frames per second,
As an example

### #3AlysiumX

Posted 02 July 2012 - 07:02 PM

private void GameLoop(){
while(running){
if (within frames per second){
Update();
}
Draw();
}
}

This isn't an accurate representation of frames per second. The code should be changed to the following:
private void GameLoop(){
while(running){
if (within frames per second){
Draw();
}
Update();
}
}


ive been confused on this for quite some time, so you limit the draw rate by frame per second not the update?

I don't understand this concept.

Wouldn't this happen?

http://imageshack.us...rawexample.png/

Which would make the draw part of the program drop frames?

Note : Picture actually assumes 60 frames per second, as an example

### #2AlysiumX

Posted 02 July 2012 - 07:02 PM

private void GameLoop(){
while(running){
if (within frames per second){
Update();
}
Draw();
}
}

This isn't an accurate representation of frames per second. The code should be changed to the following:
private void GameLoop(){
while(running){
if (within frames per second){
Draw();
}
Update();
}
}


ive been confused on this for quite some time, so you limit the draw rate by frame per second not the update?

I don't understand this concept.

Wouldn't this happen?

http://imageshack.us...rawexample.png/

Which would make the draw part of the program drop frames?

Note : Picture actually assumes 60 frames per second, as an example

### #1AlysiumX

Posted 02 July 2012 - 07:00 PM

private void GameLoop(){
while(running){
if (within frames per second){
Update();
}
Draw();
}
}

This isn't an accurate representation of frames per second. The code should be changed to the following:
private void GameLoop(){
while(running){
if (within frames per second){
Draw();
}
Update();
}
}


ive been confused on this for quite some time, so you limit the draw rate by frame per second not the update?

I don't understand this concept.

Wouldn't this happen?

http://imageshack.us/photo/my-images/802/limitdrawexample.png/

Which would make the draw part of the program drop frames?

PARTNERS