tiles not aligning correctly

Get help using Construct 2

Post » Sun Apr 28, 2013 10:30 pm

Hi there! I'm trying to make a top-down shooter game but I'm having trouble with my wall sprites. They're 32x32 on a 32x32 grid, and I've got snap to grid turned on, and yet when I run the game I can see small little gaps between the tiles and nothing i've tried has made them go away. Any idea what's causing this and how I can fix it? I've attached a cap file. The wall tiles are along the top of the screen.

test.capx
B
8
S
1
Posts: 34
Reputation: 938

Post » Mon Apr 29, 2013 1:05 am

Confirmed, you should report it as a Bug!
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,192
Reputation: 18,276

Post » Mon Apr 29, 2013 1:35 am

I tested in chrome and FF and i can't see the white gaps across the top

I can see them slightly in the editor though, but 'view grid' was enabled and the grid has light and dark pixels.

a few other things though..

If you put one of the wall blocks on their own a bit lower, and zoom very close.. you can see that it is not totally flush with the black lines of the tiled background along the top and left edges

you should make the tiled backgrounds hotspot top left.. it works okay at sizes that are multiples of the grid*2, like the size of the window, but if it was any other size you would have alignment problems.

also setting the sampling mode to point means you can do things like have solid colour 2x2 sprite and stretch it to any size whilst retaining the hard pixel edges
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Apr 29, 2013 4:54 am

Thanks everyone! It turns out even though I was using the paintbucket to fill the sprite, it was feathering the edges a bit so it wasn't solid black. I've fixed and it's looking proper now.

Also thanks for the suggestions keepee! I originally had the background hotspot at the top-left and changed it to see if it would make a difference with the issue I was having, but it didn't so I'm going to switch it back.
B
8
S
1
Posts: 34
Reputation: 938

Post » Mon Apr 29, 2013 5:15 am

ah i noticed that.. but I thought it was an intentional 'bumping out' of the textures..

if you are using just plain black sprites, you can stretch a single one out to cover the whole wall along the top. Saves on time and objects
just make sure you have sampling set to 'point' to keep it crisp .. if its still blurry try cloning the object, move all the events to the new one and delete the old one.
B
28
S
8
G
1
Posts: 469
Reputation: 4,683


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests