sio2CameraMove not smooth

View previous topic View next topic Go down

sio2CameraMove not smooth

Post  sw on Thu Nov 06, 2008 1:01 am

in sio2CameraMove function :
float tmp = _dir * ( _SIO2camera->speed * sio2->_SIO2window->d_time );

why the speed need the sio2->_SIO2window->d_time ? this will cause the movement not smooth.
avatar
sw

Posts : 73
Join date : 2008-10-12

View user profile

Back to top Go down

Re: sio2CameraMove not smooth

Post  sw on Thu Nov 06, 2008 1:17 am

for example : if the current fps is 50 , it will move the camera ahead 10 at 1 sec.
but , if the fps drop down to 10 , the camera also move ahead 10 at 1 sec. this will give the player a not smooth feeling.
avatar
sw

Posts : 73
Join date : 2008-10-12

View user profile

Back to top Go down

Re: sio2CameraMove not smooth

Post  sio2interactive on Thu Nov 06, 2008 3:37 am

On the opposite it WILL smooth it... the speed is multiplied by the delta time...

1.0 = 1 sec

Like that is always going to be constant Wink
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: sio2CameraMove not smooth

Post  sw on Thu Nov 06, 2008 8:46 am

sio2interactive wrote:On the opposite it WILL smooth it... the speed is multiplied by the delta time...

1.0 = 1 sec

Like that is always going to be constant Wink

the number is constant , but the movement feeling is not smooth. pirat
avatar
sw

Posts : 73
Join date : 2008-10-12

View user profile

Back to top Go down

Re: sio2CameraMove not smooth

Post  zzajin on Thu Nov 06, 2008 9:55 am

Creating frame rate independent movement isn't too hard.
I think this is what you are looking for or thinking of sw.

http://www.gamedev.net/reference/articles/article1604.asp

zzajin

Posts : 81
Join date : 2008-10-14

View user profile

Back to top Go down

Re: sio2CameraMove not smooth

Post  sio2interactive on Thu Nov 06, 2008 4:34 pm

I see... so what needs to be modified to achieve that? cuz honestly Im not quite sure what is missing here...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: sio2CameraMove not smooth

Post  zzajin on Thu Nov 06, 2008 9:17 pm

Sorry, I remember as I went through the tutorials I saw something which wasn't frame rate independent and I thought sw was asking about it. I see now sio2CameraMove is fine. It was sio2CameraRotateZ and it looks like sio2CameraRotateX are not frame rate independent. Or I suppose, if those functions are only supposed to be setters then the use of them isn't frame rate independent.

zzajin

Posts : 81
Join date : 2008-10-14

View user profile

Back to top Go down

Re: sio2CameraMove not smooth

Post  sio2interactive on Thu Nov 06, 2008 9:42 pm

Yeah the camera rotation is the tutorial is affected by the movement so...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: sio2CameraMove not smooth

Post  sw on Thu Nov 06, 2008 10:44 pm

the "frame rate independent movement " is NOT a good idea for Camera , because the moving distance is a variational number for very frame, from camera the player will feel the world's movement speed jumps up and down.

I am working on a race game of car, the game FPS from 30 to 50, the "frame rate independent movement " is not suit camera , it just suit for other object, such as bullet , other car....

especially moving with high speed.
avatar
sw

Posts : 73
Join date : 2008-10-12

View user profile

Back to top Go down

Re: sio2CameraMove not smooth

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum