Tilebackround problem.

For questions about using Classic.

Post » Mon Oct 13, 2008 1:51 pm

I have this problem with tileable backrounds. The ground and backround is made tiles and it looks like this:


But when I move character and the screen moves tiles are torn apart leaving this 1 pixel cap between them:


What could cause this problem?
Thanks.
B
1
G
4
Posts: 2
Reputation: 1,029

Post » Mon Oct 13, 2008 2:17 pm

Floating point coordinates. If you want to keep the gaps from showing up, add an event:

Always
scroll to x: round(scrollx)
scroll to y: round(scrolly)

Either that or make them all overlap slightly (a pixel or two) if you want to keep the smooth scrolling.

Edit: It might not work if you're using the 'center screen' attribute. In that case you'll have to use:

Sprite: set x to round(sprite.x)
Sprite: set y to round(sprite.y)

Edit 2: whoops, thought you said sprites - right, overlapping the tiled backgrounds won't work, but the rounding still will.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Mon Oct 13, 2008 2:23 pm

This is a very frequently reported problem... Tiled backgrounds should be modified so that the gaps don't show.

Btw. Is there a way to rotate tiled backgrounds? And rotate the texture itself? Those would be nice to have.
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Mon Oct 13, 2008 4:06 pm

Hmm, this has been reported a lot lately, I'll definitely try and sort something out for the next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon Oct 13, 2008 5:26 pm

This should be fixed in the next build. In future, if you want to be 100% certain that your tiled backgrounds won't seam, use a power-of-two sized texture in the tiled background (eg. 32x32, 64x64...)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon Oct 13, 2008 6:28 pm

[quote="Ashley":1xokufcz]This should be fixed in the next build. In future, if you want to be 100% certain that your tiled backgrounds won't seam, use a power-of-two sized texture in the tiled background (eg. 32x32, 64x64...)[/quote:1xokufcz]

Thanks..
I'll probably resize my platform tiles and add that trick suggested by Arima for the background.
It's so great when Construct developers hang out here and actually listen users succestions and actively develope Construst further.
B
1
G
4
Posts: 2
Reputation: 1,029

Post » Mon Oct 13, 2008 11:48 pm

Thanks for looking into this Ashley. I'm highly anticipating this fix.

[quote="Ashley":3ubtq6ku]Hmm, this has been reported a lot lately[/quote:3ubtq6ku]

I think it's just because more and more people have stopped messing around with Construct, and are starting to actually make games. Which is awesome :D
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests