r/phaser

▲ 6 r/phaser

Is there any free skeletal animation tool for phaser ?

I'm looking for a good free skeletal animation tool that works well with phaser 4?

reddit.com
u/sniperking108 — 8 days ago
▲ 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
▲ 2 r/phaser

Added ragdoll ants, persistent goo and power-ups to my Phaser 3 roguelite – frame spikes went from 13.5 ms to 7.4 ms after fixing the first version

Thanks again for all the feedback on my last post about ANT HUNTER (gecko knight raids an ant colony). The game felt too calm, so this week was all about action:

- Killed ants get flung with a bit of fake 3D physics (height, gravity, bounce, wall reflection) instead of just fading out

- Goo stays on the floor: one RenderTexture at half resolution, blobs get queued and drawn in a single beginDraw / batchDraw / endDraw per frame

- Power-ups for 6 seconds: flame cone, chain lightning, exploding kills

- Kill streaks with callouts, and a "perfect dodge" that slows the world to 25 % while the gecko keeps full speed

The first version stuttered badly when 30+ ants died at once. What fixed it:

  1. Batch all goo stamps per frame instead of drawing each one separately

  2. Pool the flying goo bits (pre-warmed, max 120)

  3. Update the kill-streak DOM element once per frame, not on every kill

  4. Limit sounds to 40 voices per 60 ms (hordes were clipping the audio)

Happy to go into detail on any of it. Is anyone doing something smarter for persistent decals in Phaser?

youtube.com
u/Next-Share6716 — 13 days ago