As some of you know, I'm developing a game engine in C, and I came across a problem that left me kind of lost. When I was developing my collision system, I saw something very strange in one of the collisions. During the collision, a white line appeared, well to the legs of the sprite. I have no idea why. I'm using OpenGL 3.3, without additional use of third-party libraries. Before the collision system, I never noticed that, so I think there's something to it. Anyone know what it could be?

NOTE: The sprite that presented the problem was the sprite of the player that moves, in time 1:07. I could not cut the video, because for some reason the video editor sums up with the bug when it rendered the video (maybe because it was small it took as a noise). If you can not see it, reduce the speed to 0.25 on youtube and set to 720p to leave the sharp image!

Thanks to all who can help me!


responding to user1118321:

enter image description here

there is the print, it's very subtle, it appears quickly in one of the frames underneath the player. The problem does not seem to be the sprite, because in the surrounding frames, the "white line" does not appear, only at that specific point, and it is a bug that does not always appear, have to try many times to be able to reproduce again

  • \$\begingroup\$ I've watched it in slow motion zoomed in closely and don't see any white line. Can you post a still of just that frame? \$\endgroup\$ – user1118321 Jun 9 at 0:56
  • \$\begingroup\$ I answered you in the body of the question at the end, if you can check the answer would be grateful. \$\endgroup\$ – Rydden Jun 9 at 1:26
  • 2
    \$\begingroup\$ It looks to me like it might be the top line of the sprite repeated. This could be because you have repeat texture wrapping on and the texture coords extend beyond the bottom of the sprite (i.e. go negative at the bottom), or something else like drawing the sprite again below the current location, but clipping it. It's hard to say without seeing any code. \$\endgroup\$ – user1118321 Jun 9 at 2:28
  • \$\begingroup\$ I was using GL_REPEAT as a texture trimming mode, so I switched to GL_CLAMP_TO_BORDER and the bug stopped loading ... This to me is very strange, this happenen in random moments. Maybe the bug is still present, but I can not play it. However, I still wanted to know why this happens. Thank you for your help! \$\endgroup\$ – Rydden Jun 10 at 22:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.