OpenGl movement problem(textures)

Started by
10 comments, last by AdamGL 18 years, 7 months ago
I made my program smooth scroll and my sprite moves perfectly but when my world scrolls, I get weird lines like these: Image hosted by Photobucket.com Please help! This only happens when it scrolls
bi-FreeSoftware
Advertisement
It appears you are skipping a pixel when tiling, you couldn't possible post some code could you? Just make sure you are rendering out tiles at the same width as you are moving along the x-axis.
Adventures of a Pro & Hobby Games Programmer - http://neilo-gd.blogspot.com/Twitter - http://twitter.com/neilogd
But I move them at the same rate, and when not scrolling, they're perfectly aligned.
bi-FreeSoftware
Long shot:

maybe you move after you've drawn the tiles?

try to move first, then draw...


"Game Maker For Life, probably never professional thou." =)
I had the same problem tiling in my game. Try using:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );


when you load your textures.

Alternatively, try making your tiles over lap just a little bit, and that might alleviate the problem.

Nice screen by the way :D.
My Current Project Angels 22 (4E5)
Thanks! I like feedback on the looks of my game :D

I know this sounds weird but I get a compiler error that says GL_CLAMP_TO_EDGE is not defines, even though it is part of the OpenGL standard library. Any thoughts?
bi-FreeSoftware
u need to include glext.h (www.opengl.org) check the faq
it all worked, except now i get darker less visible lines like the old ones but only when I scroll down. Any Ideas?
bi-FreeSoftware
are you using a frame buffer for rendering? If not it could be that the time it takes to refresh the screen (i.e. paint the client rectangle of your app) is out of synch with the time it takes you to render a frame. It may be this delay is causing you to see a flickering of sort (not sure if that's actually the problem or something else)
morpheus, see the picture above, its like that only the lines are greyer and less visible and horizontal.
bi-FreeSoftware

This topic is closed to new replies.

Advertisement