How do I pixelated 1 bit light in my game?

0 favourites
  • 9 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.
  • How do I pixelated 1 bit light in my game? Something like this...

    youtu.be/AqDpKg85-LQ

  • you could check out the polka dot effect (Note that effects can hog a bunch of performance). The game seems to just check the distance and based on distance display different sprites (that would probably be the most efficient in terms of performance)

  • This is effectively a shadow light dithered to 1 bit color. I don't think we have a dither style effect at the moment, but I'm fairly sure a custom effect could be created.

    An alternative is to use a tilemap as a mask and some style of flood fill to update the tile type depending on the light level.

    EDIT: Having watched the youtube clip I think it's basically a tilemap, with 3 or 4 "light" levels per tile type. They swap between the light levels depending on how close the player is to the tile using taxicab distance ( distance = dx + dy )

  • Yay Minit! I love that game.

    I'm pretty positive there's just a "light mask" sprite pinned to the player. The dithering effect comes from the fact that the sprite has a circular dither pattern on it.

    Should be able to reproduce this by creating a layer (for example named "lighting") that's: not transparent, background color is black, and "force own texture" is enabled. Then create a sprite that's all white to represent the light (this is your light mask) and set the blend mode on the sprite to "Destination Out". Make sure the light sprite is on the lighting" layer. Then simply pin that sprite to the player. There's several tutorial videos that show this. Just search for "lighting in construct 3" on youtube.

    The only thing left is to create a circular dither pattern on the light sprite itself. All white pixels will be see through and transparent pixels will reveal the black.

  • This is effectively a shadow light dithered to 1 bit color. I don't think we have a dither style effect at the moment, but I'm fairly sure a custom effect could be created.

    An alternative is to use a tilemap as a mask and some style of flood fill to update the tile type depending on the light level.

    EDIT: Having watched the youtube clip I think it's basically a tilemap, with 3 or 4 "light" levels per tile type. They swap between the light levels depending on how close the player is to the tile using taxicab distance ( distance = dx + dy )

    Sounds like what i need, but i don`t understand how to make it. Look like i need 3-4 mask and one tilemap?

    Check this, dropbox.com/s/yniq3a788wpoa6f/Sketch.c3p

    now is look like fake, not true pixel art light

  • Yay Minit! I love that game.

    I'm pretty positive there's just a "light mask" sprite pinned to the player. The dithering effect comes from the fact that the sprite has a circular dither pattern on it.

    Should be able to reproduce this by creating a layer (for example named "lighting") that's: not transparent, background color is black, and "force own texture" is enabled. Then create a sprite that's all white to represent the light (this is your light mask) and set the blend mode on the sprite to "Destination Out". Make sure the light sprite is on the lighting" layer. Then simply pin that sprite to the player. There's several tutorial videos that show this. Just search for "lighting in construct 3" on youtube.

    The only thing left is to create a circular dither pattern on the light sprite itself. All white pixels will be see through and transparent pixels will reveal the black.

    Thank! Check this, is look like fake :) dropbox.com/s/yniq3a788wpoa6f/Sketch.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank You!

  • You're extremely close. The reason why it looks different from "Minit" though is because "Minit" only moves the light sprite when the player moves into a new tile. So the Pin behavior will NOT work like that.

    Here check this out. It definitely looks closer to Minit. Basically all I do is detect if the player is in a new tile, then I update the light position to the center of that new tile. I had to add a few variables to accomplish this since C3 doesn't allow you to get the tile width/height from an expression, which is weird to me.

    https://www.dropbox.com/s/izwegb2r9aaxtzg/Sketches_LightMoveUpdate.c3p?dl=1

  • WOW! COOL! Thank you So much!

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