• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Sprite appearing to have edges when zooming

drandula

Member
Hi,
I would like to get rid of edges of sprites when I zoom with camera. I have attached examples to showcase edges/lines I am speaking of.
Edges do no appear, when zoom is in default, and pixels are shown in 1:1 ratio.
Edge problem can be removed with Turning off Interpolation of colours between pixels / Antialiasing. But this isn't suitable solution, as overall zooming looks awful. Smooth zooming will be necessary part of game.

I would like to know different solution for this.

Now what I have tried are:
- Sprite settings: Premultiply Alpha, no effect
- Sprite settings: Edge Filtering, no effect
- Sprite itself: Tried fill surrounding areas with white (alpha 0/255). Didn't work, as surrounding transparent color turns back to black with alpha 0.
- Sprite itself: Tried fill surrounding areas with white (alpha 1/255). Made edges appear white, didn't fix.
- Sprite itself: Blurred slightly, fixed.

For my understanding, the best fix is making sprites have softly transparent edge. This transparency must be wide enough as just 1 pixel around still made edge in-game, but in lesser extend. Therefore, no pixel sharp edges - No immediate drop from opaque to transparent.

Are there better solutions? Making sure soft edges for every sprites sprites edges is bit of extra work, as GMS own sprite editor is best for pixel sharp drawing. And pixel sharp edges might just accidently occur anyway.
I assume vector graphics wouldn't have this problem, but for now I am trying to work with sprites. And I would like to have crisp sprites :/

edit. In grass example it is more clear that edges do not appear just because tiles get misplaced and bleed under tile.
 

Attachments

Top