GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Black lines between tiled actors

EastboundEastbound Posts: 1,074Member, BASIC
edited 10:53AM in Tech Support
When you select tiled graphics on an actor, do you see a black line where it should be seamless? Or maybe its the way I save my graphics?

I only see this on the iDevices, not on the computer, and it only happens when the camera or the actors are moving.

Anyone else?

Comments

  • JamesZeppelinJamesZeppelin Posts: 1,927Member
    hmmm

    I have had tiled images move with no lines.
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    For interest Eastbound, do you originate your tiles in Illustrator before importing them into Photoshop to get your pngs?

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • NexusGameStudioNexusGameStudio Posts: 265Member
    The black lines are an issue with GameSalad. My current game is tile based for its sprite graphics, when the camera moves past them, some are fine sometimes, other times there's a line along the seam. I've tried some solutions to fix it, the only way really is overlapping the graphics, but it gets you misaligned if you have repeating tiles.
  • beefy_clyrobeefy_clyro Posts: 5,390Member
    i found i would sometimes get the black line thing, just overlap it a little bit more and you shouldnt see the lines
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    AS GS doesn't support tiling as such, I guess you could make up your tiles in Photoshop, etc., and import it as a complete graphic...

    Edit: another thought; if you're tiles are saved as gif, even though they're "translated" into png in GS, that might have something to do with it....possibly...maybe....

    :-)

    ---------------------------------------------------------------
    Spiral Gyro Apps

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • QuinnZoneStudiosQuinnZoneStudios Posts: 452Member
    I've seen this happen when the processor gets overloaded. It's like it struggles to keep up with the rendering, hence the seams begin to show. So it's inconsistent. Overlapping your tiles by 1 pixel sometimes helps. If not, you may have to slow down the background scrolling of lose or optimize graphics further.
    Hope you get it working.
    Good luck!
    Mike
  • EastboundEastbound Posts: 1,074Member, BASIC
    The actor is a wall actor, and it has an 80x80 repeating brick graphic. So say it could be stretched to 80x320, and I would have a 4x1 wall.

    And my images were created in Photoshop, and used the save for web option. Also, the FPS never dips below 45, so I don't think the RAM is getting overworked.
    MikeQuinn said:
    I've seen this happen when the processor gets overloaded. It's like it struggles to keep up with the rendering, hence the seams begin to show. So it's inconsistent. Overlapping your tiles by 1 pixel sometimes helps. If not, you may have to slow down the background scrolling of lose or optimize graphics further.
    Hope you get it working.
    Good luck!
    Mike

    This is a single actor that uses the tile horizontally and vertically options, not 'tiles' that I have laid out.
  • QuinnZoneStudiosQuinnZoneStudios Posts: 452Member
    So you are using "replicate" to repeat on the H and V? If so, did you try reducing the replicate size number by one pixel in the Spacing field?
    I think that has helped me in the past.
  • EastboundEastbound Posts: 1,074Member, BASIC
    No, on graphics of an actor you can choose stretch, fixed, or tiled, horizontally and vertically. The problem happens when I select the tile option.

    Replicate creates multiple actors, this is all still within one actor.
  • EastboundEastbound Posts: 1,074Member, BASIC
    Bleh?
  • firemaplegamesfiremaplegames Posts: 3,206Member
    Apparently openGL has always had some issues with this. Sometimes the edge texels don't match up with the edge pixels and cause seams.

    There seems to be some workarounds with edge texture clamping (whatever that is) but of course you cannot access that through GS.

    I had similar issues when I placed a bunch of actors next to each other perfectly, but as I panned the camera across them, gaps appeared. Seems like something to do with the camera not stopping on whole pixels? I don't know.

    Some things you can try:

    Try making your image a power of 2, either 64x64 or 128x128. Maybe the 80x80 is causing issues.

    Try changing the bg color of the Scene to something other than black. I'm not sure that is even where it is pulling the black seam color from, but try setting the bg color to something closer to the tile's general color. Not a fix, but may help alleviate the problem visually.

    As a quick test, change the Scene's background color to Red. Do red seams now appear instead of black? If so, at least you know where the color is coming from.
  • BarkBarkCoBarkBarkCo Posts: 1,400Member
    If these wall actors are not set to collide with each other, just overlap them a few pixels...
  • EastboundEastbound Posts: 1,074Member, BASIC
    firemaplegames said:
    Apparently openGL has always had some issues with this. Sometimes the edge texels don't match up with the edge pixels and cause seams.

    There seems to be some workarounds with edge texture clamping (whatever that is) but of course you cannot access that through GS.

    I had similar issues when I placed a bunch of actors next to each other perfectly, but as I panned the camera across them, gaps appeared. Seems like something to do with the camera not stopping on whole pixels? I don't know.

    Some things you can try:

    Try making your image a power of 2, either 64x64 or 128x128. Maybe the 80x80 is causing issues.

    Try changing the bg color of the Scene to something other than black. I'm not sure that is even where it is pulling the black seam color from, but try setting the bg color to something closer to the tile's general color. Not a fix, but may help alleviate the problem visually.

    As a quick test, change the Scene's background color to Red. Do red seams now appear instead of black? If so, at least you know where the color is coming from.

    The scenes background color was already red, so I'm afraid the tearing color is always black. I will try the power of 2 suggestion, but if it fails it looks like I'll have to lay a massive amount of wall actors, which will probably affect performance. Argh.
  • EastboundEastbound Posts: 1,074Member, BASIC
    Turns out changing the images and actors to 64x64 instead of 80x80 fixed the problem. Thanks FMG and everyone else! :p
  • firemaplegamesfiremaplegames Posts: 3,206Member
    Cool, I'm glad that worked!
This discussion has been closed.