Shadow Lights interact improperly with tilemaps

0 favourites
  • 4 posts
From the Asset Store
Immerse your quiz games with our 6 unique music loops, ranging from acoustic chill guitar to cute and upbeat style.
  • Problem Description

    Shadow light-generated shadows glitch and move, cast shadow towards light instead of away, when interacting with Tilemaps.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/142 ... wleak.capx

    Description of Capx

    Illustrates issues with Shadow Light cast shadows - position shifting and incorrect shadow casting.

    Steps to Reproduce Bug

    Use the arrow keys to move the platform object to the right towards the Shadow Light object.

    Observed Result

    The cast shadows will move & shift. In some areas it also seems to be casting a shadow towards the Shadow Light. The Shadow Light is not close to any objects and has a Radius of 0. The tilemap has a higher height (100) than the light (10). The issue also occurs with lights that have a radius higher than 0, or with the light set at a height above the tilemap height.

    Expected Result

    Shadows not to move, no "leaks" in cast shadows, shadows not cast towards light source.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)
    • Edge: (YES)

    Operating System and Service Pack

    Win 10 x64 Anniversary

    Construct 2 Version ID

    r233, r234, r235, r236

  • Bumping this so it doesn't disappear because it's a big, obvious issue.

    Ashley, any thoughts on this?

  • The flickering happens because shadows aren't drawn for tile areas just outside the viewport, which is fixed for the next build.

    The shadows look wrong though because you use multiple shadow light objects, and they only draw shadows, so by default all the shadows get pasted on top of each other. You need to use layering and blend modes to correctly render multiple light sources. See the demo that ships with C2 for an example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The flickering happens because shadows aren't drawn for tile areas just outside the viewport, which is fixed for the next build.

    The shadows look wrong though because you use multiple shadow light objects, and they only draw shadows, so by default all the shadows get pasted on top of each other. You need to use layering and blend modes to correctly render multiple light sources. See the demo that ships with C2 for an example.

    Damn, I thought I'd removed all but one light. My mistake. Thanks for taking care of the issue with the tiles outside the viewport though, it was preventing a baked lightmap solution to avoid avoid having to use multiple layers for each light from working as planned. Maybe there's a way to toggle whether or not it's drawing for all tiles, in the viewport or not?

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