Hi all!
Can you give me a hint how to make nice brick wall (like one on the attached picture).
So if I make it like this:
for i = 1, ((screenHeight + brick.height) / brick.height)) do
for j = 1, ((screenWidth + brick.width) / brick.width)) do
brick = display.newImage(“brick.png”)
brick.x = (screenLeft - brick.width) + (brick.width) * j -------- ScreenLeft is a constant
brick.y = brick.height * i
bricks:insert(bricks, brick)
end
end
I get an even wall with bricks in every next row evened with previous row, and so on…
I do not want that, I want them to look like on the attached picture
So first row should be evened with third row, and second row should be evened with fourth row…
I want the bricks to fill entire screen.
Tnx!
Goran