How to get rid of flickering?

I have a game which looks good in most situations. Some objects move around the scene. Also the camera moves around the scene. Nothing seems to flicker at first.



But if I have one of the objects moving parallel to the camera (cam looks at object and both move towards the same direction with same speed) that object will start to flicker (the faster the object and camera move the stronger is the flickering).



How can I solve that problem?

Did you try enabling v-sync yet?

Make sure you update the camera location and the object location(s) for each frame. Possibly the order does matter - which gameloop do you use (Simple-, Standard- or BaseGame with custom invocations)?

llama said:

Did you try enabling v-sync yet?


I thought of that but did not find out how to enable v-sync yet.

irrisor said:
Make sure you update the camera location and the object location(s) for each frame. Possibly the order does matter - which gameloop do you use (Simple-, Standard- or BaseGame with custom invocations)?


I use the fixed logic rate gameloop, but the flickering occurs with BaseGame also.
I update the camera location in every update (together with the objects location). In fact my camera is following one of the objects (but always staying south of it looking towards north). When this object moves in west or east directions, it starts to flicker.

I will try updating the camera location in the render invocation.
FatJoem said:
I will try updating the camera location in the render invocation.


This solved the problem. Thanks for the help