Color Depth Issues in Game Salad

I'm noticing some color depth issues with my Game Salad game. I'm saving high quality PNGs, with very nice, subtle gradients. They look good in the creator preview, but one the device they look like garbage.

The gradients you see in this screenshot should be smooth gradients, not harsh, color stepped gradients. It seems like the engine is reducing the number of colors in the image.

Is this standard behavior? Any workaround?

Thanks!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited October 2018

    This is a known issue with GameSalad. I believe if you Google gradients gamesalad you should find forum posts about it. I think the solution has to do with adding a single transparent pixel to the image or something like that.

    Here's a thread: https://forums.gamesalad.com/discussion/38139/gradients-looking-terrible

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I recall using the 'transparent pixel trick' at some point years ago and it worked well.

  • SocksSocks London, UK.Member Posts: 12,822

    @jhamond987 said:
    I'm noticing some color depth issues with my Game Salad game. I'm saving high quality PNGs, with very nice, subtle gradients. They look good in the creator preview, but one the device they look like garbage.

    The gradients you see in this screenshot should be smooth gradients, not harsh, color stepped gradients. It seems like the engine is reducing the number of colors in the image.

    Is this standard behavior? Any workaround?

    Thanks!

    This is an issue with Box2D rather than GameSalad itself . . . . the solution is to force your images to be read as 32bit (rather than 24bit), if you use Photoshop you can do this by firstly making sure the layer you are working on is a 'Layer' rather than the 'Background', then select a single pixel . . . set the eraser tool to 1% and run it over the pixel, which should mean the pixel is now 99% opaque (or 1% transparent).

    This is enough to force the PNG to be read as a 32bit file by Box2D.

    This method ends up with a smooth image/gradient with the near undetectable compromise of a single pixel with 99% opacity (rather than 100%), but any process that forces 32bit will do the trick.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,170

    Well, probably OpenGL and not Box2D (Box2D only handles collision shapes and movement).

    Since I haven't touched the render pipeline yet, I'm only 80% sure, but I think it's something to do with how OpenGL renders the texture. The other 20% guess is that it's how we load the image and convert it into a texture.

    I could take a looks someday, but with all the other work we have, I think we can chalk this up to something that we won't fix because there's a work-a-round.

  • jhamond987jhamond987 Member Posts: 2

    @jhamond987 said:
    I'm noticing some color depth issues with my Game Salad game. I'm saving high quality PNGs, with kickass website very nice, subtle gradients. They look good in the creator preview, but one the device they look like garbage.

    The gradients you see free movies online in this screenshot should be smooth gradients, not harsh, color stepped gradients. It seems like the engine is reducing the number of colors in the image.

    Is this standard behavior? Any workaround?

    Thanks!

    solved.!!

Sign In or Register to comment.