How can I get rid of the black lines?

0 favourites
  • 12 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • Hi there everyone, I'm having a weird problem with C2, can anyone tell me how to solve it? Look at this:

    <img src="https://dl.dropbox.com/u/41571201/compare.jpg" border="0" />

    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.

  • Did you minify when you exported?

  • 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.

  • 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.

  • 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? -__-

  • Give it a test if you can, I'd be interested to know.

  • 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

  • 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.

  • "Point" sampling was the key here... it looks all right now, thanks a bunch for the tip, Ashley! :D

  • 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.

  • I'm having this issue too when i export CocoonJS, it shows the lines in the grid. Try to reproduce:

    1-Create a Tile Background

    2-Fill it with black colour and set resize 64 x 64

    3-Cover tile background on layout area

    4-Make it fade behavior, then fade in 2 seconds and fade out 2 seconds.

    5-Export to cocoonJS

    6-Try it on your device, it appears the edges can't be ajusted on opacity.

    Besides, if you have no time to reproduce on these steps, here is a .capx

    http://dl.dropbox.com/u/76227787/blacklinestile.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Maybe the problems are similar, but mine happens on a PC browser, I'm not working with mobiles yet, still it seems very weird to me because it's not the first time I do this and with the first game I made this never happened... :S

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)