Game Development Community

[SOLVED] [iT2d 1.4] $timeAdvance jittering on camera mount

by Edoardo · in iTorque 2D · 07/16/2010 (10:31 am) · 11 replies

Hi

Our PSK based game on Iphone 3GS work at 55/60 FPS... :-))))

but we must lower velocities on iPhone 3GS to make uniform with the iPhone3G capacities :-((((

With iTGB 1.3.1 we have reduced the $timeAdvance from 33 to 24 and all work correctly...

but now after the porting on iT2D 1.4 this change causes "non fluid movements" on player (stuttering?) (all other game items work fine).

Our doubts are on the camera mount on player...

Do you know this issue?

Exist another method to reduce FPS or velocity on engine???

our problem is similar this: www.torquepowered.com/community/forums/viewthread/78596

Thanks

#1
07/16/2010 (7:14 pm)
I fixed camera jitter by editing the following file and recomplied.

core/iTickable.cc

From 32ms time step
const U32 ITickable::smTickShift = 5;

To 16ms (shows little jitter on windows platform, works on iphone)
const U32 ITickable::smTickShift = 4;
#2
07/16/2010 (10:11 pm)
@Dean have you set $timeAdvance=16 ?
#3
07/17/2010 (4:38 am)
@Edoardo, no I haven't. Not familiar with that, can you explain it.


I set timeshift to 16 and adjusted tickable to 3, and the jitter has gone away.

const U32 ITickable::smTickShift = 3;
#4
07/17/2010 (8:34 am)
Ohhh it Works!!!!! Thanks Dean!!!
#5
07/17/2010 (9:29 am)
Guys, $timeAdvance, am I missing something. I tried it for the 3GS and everything move much faster, but on the 3G is it much slower! I'm puzzled?!?
#6
07/17/2010 (9:38 am)
@Scott it's a mistake!!!

To run game on both devices with the same speed you must increase speed on 3G and decrease speed on 3GS....

...to do this...

in our game we detect device type...

if Iphone 3G detected set $timeAdvance=40 and ITickable::smTickShift =5
if iPhone 3GS set $timeAdvance=26 and ITickable::smTickShift =3

#7
07/17/2010 (10:11 am)
@Edoardo

Can you share your code you use to detect?
#9
07/17/2010 (9:05 pm)
Thanks for clarifying Edoardo.
What do you do for 1st/2nd/3rd gen touches. Also iPhone 4?

Have you managed to get app approval with the device selection code?
#10
07/17/2010 (9:27 pm)
Edoardo, how are you changing this, ITickable::smTickShift =5 - this seems to be a compile time value ?
#11
07/19/2010 (10:33 am)
@Scott
What do you do for 1st/2nd/3rd gen touches. Also iPhone 4?
- we manage only slow devices and fast devices..

Have you managed to get app approval with the device selection code?
- Do you think we will have problem with the approval?

how are you changing this, ITickable::smTickShift =5 - this seems to be a compile time value ?
- I've not idea...