DEV Community

David Newberry
David Newberry

Posted on

light gradient images

Image assets for a game in which the player's view is constricted to a small ring of light.

Large white center 600x600

More diffuse center 600x600

In Pygame the assets are used as follows:

  • gradient image is loaded
  • all black, stage-sized drawing surface is created (darkness overlay)
  • the gradient image is blited (copied) on to the darkness overlay using Additive blending (white lighten)
  • the darkness overlay is blited on to the screen using Multiplicative blending (black darkens)

Top comments (0)