Is there an alternative to _process(delta) without physics?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lukas
:warning: Old Version Published before Godot 3 was released.

I often use _process(delta) or _fixed_process(delta) in nodes when no physics is needed but the “time” loop from frame to frame with the time between the frame (delta) is needed.
Is there an alternative to _process(delta) but without physics? I mean function that is processed every frame and provide us with delta?
I ask because, especially in mobile games, _process and _fixed_process sometimes cause jitter in movement.

If I understand right, nothing uses physics unless you add a node with physics.

‘_process’ is the regular method used in every game engine where you can touch things before every draw, delta (from delta time) is the time lapse you can use as integrator to avoid jitter.

‘_fixed_process’ executes every physics frame, a slower and almost fixed delta time, where is advised to manipulate physic objects, again, delta as your friend when moving things.

So, neither process has physics, your jitter could be related to something else (like rounding of some variable).

eons | 2016-10-09 18:46

Thanks! It makes sense that no physics calculation is done when no actual physics node (RigidBody etc.) is used.
The jitter I am talking about: let a sprite move with set_pos(get_pos() + delta * Vector2(100, 0)). When on mobile device the movement is not so smooth (jitter every few frames) as I would expect. There was a discussion in Github about it and it seems to be related to physics but I did not realise that physics calculation is most likely not done when physics bodies are not in the scene even if _process is called.

lukas | 2016-10-09 19:02

Oh, it could be this issue

Affects some Android devices and old GPUs due to problems with OpenGL.
It -may- be solved with the new renderer.

Check if happens with any size and filter of texture, scaling of sprite or with no transparency (you can create it with a shader), maybe there is a way to avoid or conceal the effect.

eons | 2016-10-10 02:08

:bust_in_silhouette: Reply From: Tybobobo

Neither _process(delta) or _fixed_process(delta) uses physics unless you add it inside them.
The only real difference is that process runs at every frame, and fixed_process runs at 60 ticks per second.