Texture bugs

Hi guys.

I develop a 2D game using LWJGL3 and Box2D (via gdx-box2d). There is nothing special or complex in the game nor in it’s engine currently, but I’m facing with a problem.

The problem is, that as I start walking with my character, everything is fine, but when I reach the wall and then move, something is weird with the textures. Also, if I start the game with antialiasing, it’s more obvious that something is wrong.

Where and how should I start the bug finding? I’ve been programming for 17 years not, so I’m not a newbie, but relatively new in game development (1.5 years).

Some more details:

  • I use one texture as a texture atlas, and attach it to the shaders via sampler
  • I send the per tile texture offsets as an instanced variable

Check this video to see what I’m talking about: https://youtu.be/MZiS_Hr69wY

The code is available here if needed: https://github.com/mudlee/intermetto2D