Sprites blurring colors between frames



  • alt text

    The first image shows two frames of a button I am using like a spritesheet with the second frame being used to stand out more with the bright green. The buttons are not actually animated but use the animation thing so that I can say sprite.animation.frameIndex = 1 or 0

    The problem is when its on sprite.animation.frameIndex = 0 the blue button's bottom line of pixels blurs into the green like example image 2. It happens when scaling or at certain resolutions. I was hoping the problem wouldn't be there on mobile but it is..

    This has happened to me 100 times so far while making my game and I have constantly had to change the way the images look so that their is no huge color differences between frames. I feel like I am doing something wrong for this to happen at all since I never see anyone mention this problem...

    alt text



  • @duskypixel Perhaps adding a row of transparent pixels above and below each button frame would solve this?



  • I tried that and it still looked the same. I imagine the reason is the game is made for 1920x1080 while my monitor is 1440x900 so its probably blurring more than just a single row from the next frame. I want the game to work on multiple mobile resolutions so that is not really a solution to just keep trying until somethings works on my desktop screen.

    I also tried messing around with FlxAtlas and that still looked the same. Eventually I just gave up and now I am using multiple PNG files for each button frame. That is a lot more work but at least it doesn't look bad..


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.