Hey Richard! Thanks for your response.
I am using integers but doesnt work. I also use one image for my tilemap test, and it worked fine if I didnt add it to atlas, but when I did the lines started to appear. They arent always there, only when I move the view to certain positions. But I got it fixed. A friend suggested to do this: offset = 0.5 / tileset_bin.texture_width texture_data.extend([tile_image.tex_coords[0]+offset, tile_image.tex_coords[1]+offset, tile_image.tex_coords[2]+offset, tile_image.tex_coords[3]-offset, tile_image.tex_coords[4]+offset, tile_image.tex_coords[5]+offset, tile_image.tex_coords[6]-offset, tile_image.tex_coords[7]-offset, tile_image.tex_coords[8]+offset, tile_image.tex_coords[9]+offset, tile_image.tex_coords[10]-offset, tile_image.tex_coords[11]+offset]) Adding offset to coords worked fine and lines disappeared. I dont know if this is The Solution, but it works fine and I'm cool with it. eeneku maanantai, 13. toukokuuta 2013 2.50.35 UTC+3 Richard Jones kirjoitti: > > Be sure to make the coordinates you're positioning the tiles all integers. > If they're floats then you'll get some off-tile image bleed in due to the > way OpenGL texturing works. Or if the tile images are all in separate > textures you might use GL_CLAMP. > > > Richard > > > On 12 May 2013 18:28, <[email protected] <javascript:>> wrote: > >> Hello all! >> >> I'm having a bit of an issue with drawing tilemap. See, I'm trying the >> same methods as josch to draw it, and it works pretty ok. The only thing is >> the tiles are not in sync (or something) and when I move the map around >> (with glTranslatef) I get black lines (or brown or blue, seems to depend on >> the tile next to it on tileset) between them. That is kinda weird. One >> fellow suggested indeces (batch.add_indexed()), but I dont know how to use >> them on this case. Not much talk about it on the internet. >> >> Here is an example shot of the issue: >> http://www.eeneku.net/upload/screen_for_fryer.png >> Here is the source file for that test: >> https://github.com/eeneku/thor/blob/master/tilemap_test.py >> >> eeneku >> -- >> You received this message because you are subscribed to the Google Groups >> "pyglet-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/pyglet-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
