How can I get rid of the black lines?

Get help using Construct 2

Post » Wed Oct 10, 2012 11:25 pm

Hi there everyone, I'm having a weird problem with C2, can anyone tell me how to solve it? Look at this:



The one on the left is a screenshot from the exported game, and the one on the right is from C2 "test" mode (you know, pressing F4)
:S why does the tree looks like that when I export it? I made a game before and I used the same method to do stuff, I made tiles and they fit perfectly, there were no black borders or anything, so why do they look like that now?

Hope someone can give me a solution, thanks in advance.
B
43
S
14
G
8
Posts: 47
Reputation: 7,556

Post » Thu Oct 11, 2012 2:26 am

Did you minify when you exported?
B
18
S
9
G
5
Posts: 77
Reputation: 4,946

Post » Thu Oct 11, 2012 2:59 am

Minify? If you mean "did I use compression for the images", yeah, I used the one C2 offers as a default, but I checked the images and they are just fine, there are no dirty borders or anything.
B
43
S
14
G
8
Posts: 47
Reputation: 7,556

Post » Thu Oct 11, 2012 5:52 am

I think it's because your not doing pixel rounding for either/both the background and camera/scrolling.

If you don't want to do pixel rounding, have each sprite use an extra 1 pixel on the right/bottom side so that the graphics overlap.

Also if you're using any scale/zooming etc., always make sure you have 1 pixel transparent border around every single sprite (pressing the 'crop' button in the image editor will usually do this for you). Otherwise you get bad looking edges, which could maybe be the problem in this case.alspal2012-10-11 05:55:00
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Thu Oct 11, 2012 7:30 am

The thing that bugs me is that it looks just fine when I test it "offline", but when I export it then the black lines appear...

Also I am using "Pixel rounding" :S...

Do you think the problem could be related to the whole "power of two sized images" thing? right now my sprites are 48x48... should I rezise them? -__-
B
43
S
14
G
8
Posts: 47
Reputation: 7,556

Post » Thu Oct 11, 2012 8:55 am

Give it a test if you can, I'd be interested to know.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Thu Oct 11, 2012 4:32 pm

You know what?... now that I think about it, I don't think that's the problem, because some of mi sprites are indeed sized by the power of two and there are still empty lines between them... :S
B
43
S
14
G
8
Posts: 47
Reputation: 7,556

Post » Thu Oct 11, 2012 5:09 pm

It is probably related to the automatic spritesheeting on export. However, if you are using both 'Pixel rounding' and 'Point' sampling, seams should never appear. If they do it might be a bug, so posting a demo .capx would be helpful there.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Thu Oct 11, 2012 5:18 pm

"Point" sampling was the key here... it looks all right now, thanks a bunch for the tip, Ashley! :D
B
43
S
14
G
8
Posts: 47
Reputation: 7,556

Post » Thu Oct 11, 2012 8:53 pm

Nice to hear.
Don't forget to report as a bug with a capx reproducing the issue (in a simple way) so Ashley can look into it.Kyatric2012-10-11 20:54:03
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests