I loaded my tileset with pyglet, and tried to draw them side by side as a
surface. However, I can see small dark lines separating the sprites. Here
is my code:
class Startbox(Layer):
def __init__(self):
super(Startbox, self).__init__()
self.batch = pyglet.graphics.Batch()
img = pyglet.image.load('images/map_sprites.png')
tileset = pyglet.image.ImageGrid(img, 3, 15)
all_sprites = list()
x, y = 0, 0
for i in range(100):
for j in range(100):
sprite = pyglet.sprite.Sprite(tileset[0], batch=self.batch)
sprite.x = x
sprite.y = y
all_sprites.append(sprite)
x += 96
y += 96
x = 0
def draw(self):
self.batch.draw()
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" 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/cocos-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.