0
votes

I posted this question already but no one is interested in responding and i have spent over 3 days trying to solve this problem. It is really annoying. I find this question everywhere but no answer. I have tried to move a sprite in libGDX over 1000 methods bu nothing seems to work. I have tries vSynch while adding in render loop to +speed*delta to position. I have tried only +speed. I have tried translate and everything else bu nothing seems to stop that flickering while the image is moving. What is the proper way to "move"(animate) things in libGDX. If anyone has encountered this problem, please answer this post. I am really trying to solve this problem as i can't progress without animations... This is the base for any game and i don't really understand how other games i have seen don't have flickering while moving sprites.

1
are you using glClearColor and glClear before the rendering starts? You must clear the screen, otherwise the old textures will be shown and a 'flickering' effect appears. - Adrian Preuss
I am using glClear and glClearColor. It's just that when the sprite is moving at the edges it is very sharp and sometimes blurry. The texture itself becomes a little blurry and if you look close it is very visible. Is this a common problem? - Andrew
i think not. You have hundred ways to render. Post a example with the issue, otherwise we can only speculate. - Adrian Preuss
Ok i will post a link with the code source and video of the problem. Video: dropbox.com/s/768z1eox8edpyb4/… Code: dropbox.com/s/hms4l29j7gipq3s/MiniGame.rar - Andrew
where is the "flickering", dont see that on the video example. - Adrian Preuss

1 Answers

0
votes

I tested your code and i can't reproduce the stutter effect. It's really smooth for me. There exists a vsync bug but it should only appear in window mode.