Made a deep-sea exploration game in Phaser 4: custom light map, normal maps derived from pixel art, and all audio synthesised with Web Audio
▲ 15 r/phaser+1 crossposts

Made a deep-sea exploration game in Phaser 4: custom light map, normal maps derived from pixel art, and all audio synthesised with Web Audio

HADAL is a browser game about diving to the bottom of the Mariana Trench: https://game-hadal.vercel.app/en/

A few Phaser 4 things that might interest people here:

  • Lighting: a light map (sunlight that fades by depth, the lamp cone, caustics near the surface), applied to the scene through a camera Blend filter.
  • Normal maps generated automatically from every pixel-art sprite. One gotcha: Phaser doesn't flip normals with setFlipX, so each sprite also gets a mirrored texture.
  • Additive glow: with setForceComposite the camera is composited through alpha, so additive light darkened the scene. Drawing glow into a DynamicTexture with BlendModes.ADD fixed it.
  • No sound files: everything is synthesised live with Web Audio.

Happy to go into detail on any of it, or to hear how others handle lighting in Phaser 4.

u/slinto — 13 days ago
▲ 363 r/skeptic+2 crossposts

uapinsight.com — daily Hacker News-style aggregator for UAP/UFO news

Daily-refreshed feed of UAP news pulled from 14 sources (NewsNation, Liberation Times, Avi Loeb, war.gov releases, Metabunk, etc.). HN-style ranking, neutral framing — disclosure outlets and skeptic sources side by side. No signup, no ads.

uapinsight.com
u/slinto — 5 months ago