Strange bug with "Replace Color" effect (updated)

0 favourites
  • 12 posts
From the Asset Store
Strange Game Ambient Loops 3 - This is the third volume in the Strange Game series.
  • Problem Description

    The color replace effect is only working properly on certain frames of my sprite object despite every frame having the exact same colors. It isn't working on some tiled background objects either. I think it might be something related to the tolerance parameter because some palettes I'm trying to use do modify the sprite's colors a tiny bit. Also if I put the tolerance to, say, 100, then the colors aren't what I want but at least they work with every frame. This bug only occurs during preview, by the way.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/105 ... orBug.capx

    Description of Capx

    Contains 1 sprite object w/ Replace Color effect that plays a new animation each second to demonstrate the bug.

    Steps to Reproduce Bug

    Just preview the layout and watch.

    Observed Result

    The object's red color is only replaced by green on certain animations/frames.

    Expected Result

    The object's red color should be replaced by green for all animation/frames.

    Affected Browsers

    Tried on NW, Chrome, and FireFox.

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    Tested on 200-204.2 / Capx was built in 203.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Tokinsom

    I tested in FF, I.E and NW and it appears to work ok for me. All frames look green.

    Using r203, the same as your .capx was built using.

  • What the hell. Maybe it's a driver issue then? The effect was working fine in my game for over 6 months then all of a sudden it breaks and absolutely nothing I've tried fixes it. I've wasted hours!

    UPDATE: Drivers were up to date. I discovered the bug only happens while previewing the game; the exported game is fine. This is exactly what I'm seeing:

  • Def ok for me. Even slowed down anim rate in case I was missing something but nope.

    Maybe some more helpful users could also test and report back?

  • Works fine for me as well in r204.2.

    But it's not the first time where people are having issues with shaders manipulating colors :/

  • Tested this on my desktop and I'm somehow getting the same bug :T My teammate says he's not getting it in the .capx above nor the actual game though. Oy...For the record, this is also happening with all my game objects, not just the player.

  • May be useful to compare GPU and driver versions, and maybe also browser versions. It's akin to the problem PC developers have always had - making a game work on such divergent hardware systems.

    For the record, Nvidia GTX 970, driver ver: 347.88 (not v latest, but I like to wait for bugs to be ironed out).

  • Okay, I just tried this and I am seeing the exact same results as in Tokinsom's provided GIF example.

  • Seems to work on my end (Nvidia GTX 650Ti Driver V 350.12)

    Not sure if it's related... but I have noticed similar behaviors with updating tilemap and sprite textures. They either don't update after exit and restart / or I have to create a new object to replace it. OR I get a solid color sprite upon updating of image.

    See:

    I only ask, cause as of late I have been noticing odd bugs in relation to images / sprites / tilemaps - I wonder if this is at all related.

  • no problems here

    Mobile intel 4 series, gma 4500m

    64bit windows 8.1

    EDIT: something strange, don' t know if it is related, but it runs at 63 framerate >_>

  • Is there a color replace plugin that doesn't use webgl?

  • It appears correctly here in all of Chrome, IE and Firefox on an nVidia GeForce GTX 660.

    Inside shaders, color values are normalised to a float in the range [0, 1]. So the color values you are entering are really divided by 255 and rounded to a low-precision float to conserve memory bandwidth. My best guess is a driver, OS or browser component changed recently, and now something is rounding in a different direction, so it amounts to a rounding error. The workaround should be simple: just increase the tolerance to say 2 or 3, and it will still include close colors that have a small rounding error compared to what you are testing for.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)