light gradient images

2026-10-15来源 dev.toEnglish
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

400x400

300x300

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)

原文:https://www.a8q9.cn/en/article/light-gradient-images-391516.html

相关文章