Hasty Briefsbeta

Bilingual

Creating Lighting in a 2D Game

a year ago
  • #Game Development
  • #Dynamic Shadows
  • #2D Lighting
  • D.O.R.F. currently uses 2D sprites with baked-in lighting, leading to issues like artifacting and depth-sorting problems.
  • The team is developing a dynamic lighting system for 2D sprites using normals sprites and depth sprites.
  • Diffuse sprites provide the main visual information without lighting.
  • Normal sprites use color information to simulate 3D facings for realistic lighting effects.
  • Depth maps (Z-Depth) use grayscale to determine distance from the camera, aiding in depth-sorting.
  • Micro Z-depth sprites (Shadow Sprites) create 3D meshes on the fly for dynamic shadow casting.
  • The system is experimental, with potential issues in shadow mesh accuracy and animated objects.
  • Despite the complexity, the system is efficient, requiring fewer frames than expected for animations.
  • Dynamic lighting allows for varied sunlight angles and multiple light sources, enhancing atmosphere.
  • The system is still in development, with significant rework needed for existing assets.