Skip to main content

Posts

Showing posts with the label Sprites

Avoiding pixel overlap between sprite frames

When working with sprites in Corona SDK I've quite often run into a problem with sprite sheet frames occasionally overlapping each other. When I say occasionally I mean that it doesn't happen for every new sprite I create even though the same sprite sheet is used, and it doesn't happen on all device resolutions. This is what it might look like when the overlap happens. Not pretty... The sprite's image sheet Sprites in action, pixel overlapping between frames To work around this problem in the past, I've just padded my sprite images with a couple of transparent pixels so that the possible overlap won't be visible even though it might still be there. This has caused some additional work both to set up the sprite sheet images, as well as calculating the frames' positions within the sheet. So I figured I was gonna look for another solution to be able to create sprite sheets without padding that still look good. Tough luck it turned out. The pixel o...