r/phaser

Image 1 — My multiplayer RTS is made with phaser
Image 2 — My multiplayer RTS is made with phaser
Image 3 — My multiplayer RTS is made with phaser
▲ 29 r/phaser

My multiplayer RTS is made with phaser

The game is made with phaser with a node js server

And I will release it soon on steam wrapped in a tauri application allowing me link easely the steam account with the game account

Here an old gameplay video

https://youtu.be/aY\_uZiiJj\_s?is=WAH3kmecIedRifwD

I choose phaser because it was really light and simple of utilisation and allowing me to work in the same langage front and back

u/Roma2443 — 2 days ago
▲ 91 r/phaser+8 crossposts

I built a new fast and portable texture atlas builder with a LibGDX exporter

Hey everyone, I was building this tool for my internal use, and thought I would spin it off as a full tool and sell it in case it was useful for anyone else. I wanted something extremely fast and with good CLI integration, and something very portable as well. So that's what I built, in Zig with a Dear ImGui interface.

I am mostly focusing on code-first environments right now, like LibGDX. This is the exporter I use for my own projects in Haxe/Heaps.io, as it uses the LibGDX format.

https://clydegames.itch.io/packrat

Anyway, thanks for checking it out. Let me know what you think.

u/CLYDEgames — 3 days ago
▲ 1 r/phaser

How to learn phaser

Hey guys, I am new at this, I've been trying to learn phaser reading the API docs, checking the examples on phaser desktop and learning from the code, sort of using AI to get guidance and asking basic questions about the framework. I am trying to develope a basic scenario with the player and some npcs,

I have almost done that part and I still think that there is a huge amount of things which get me confused and I think that I don't find the type of tutorials that I need for my sort of test project.

I just was wondering: How did you all learn phaser? What learning methodology you used to learn?

And if is there a way to understand a bit better the api's docs (?) (sorry if it's a dumb question) :(

reddit.com
u/InformationWooden409 — 2 days ago
▲ 26 r/phaser

Shipped a cozy sim on Phaser 3.90: one scene, zero sprite files, and React doing all the UI

I've been building Wild Willows, a nature-restoration sim where you replant a damaged preserve and animals return as the habitat starts supporting them. It's at wildwillows.app, on the Mac App Store and itch, with a free browser demo. A few architecture decisions that mattered more than I expected:

One scene, forever. The scene list is just [WorldScene]. No title scene, no menu scene, no UI scene. Every menu, panel, the journal, crafting, settings, the tutorial: all React DOM on top of the canvas. Phaser draws the world and nothing else.

I expected to regret this and haven't. DOM gives me real text layout, real focus management, and accessibility (five interface fonts, four text sizes, three colorblind modes, fully rebindable keys), none of which I'd have enjoyed building in-canvas.

A 60-line bridge between them. React owns authoritative state. Phaser reads it synchronously off a shared object and re-renders when told the world is dirty. It's a Map of handlers and a shared blob, no observables, no state library spanning both worlds. React to Phaser: world-dirty, enter-placement, area-changed. Phaser to React: collect-node, open-crafting, animal-clicked, place-at.

Zero sprite files. Every sprite is drawn at boot with Phaser.Graphics and generateTexture(). Plants, animals, the player, habitat objects. About 8,600 lines of drawing code and no image assets at all. Shapes are authored in logical 32px pixels and rasterized 4x (2x on low graphics quality), with every sprite scaled back down by 1/4, so they stay crisp under camera zoom and HiDPI.

A frame budget for world rebuilds. Every action used to rebuild the dynamic layer synchronously, so dragging a volume slider tore down and rebuilt the animal layer about 60 times a second for a preference the world doesn't even draw from. Now that work is keyed and coalesced to at most one run per animation frame, each run is timed, and any task consistently overrunning half a frame automatically drops to every Nth frame, then recovers on its own once it's cheap again. A big save degrades to a lower redraw rate instead of locking up.

Smaller stuff: Scale.NONE plus manual zoom so I can render at native device pixels and let CSS scale the canvas back down, and a screen-space RenderTexture used as a bitmap mask to punch light holes in the night tint.

Happy to go into any of it. The two worst bugs were both Phaser internals: TimeStep.resetDelta making the player walk at a fifth speed for ten seconds after every load, and repeat: -1 tweens outliving the sprites they drove.

u/wildwillowsdev — 5 days ago
▲ 1 r/phaser

The export of my game from the mcp for web (hosted via a http server) plays audio and nothing else, the game works fine in preview

in this relatively simple example https://phaser.io/agent/play/yY6kjXrDL27 when i export despite making changes and rebuilding/republishing (this is v7) the export for web always has the exact same payload and does not work. is there anything i can do? also if i connect my vscode using phaser-game-agent and ask for the file listing, despite having the right project id and version the file listing is wildly different. is there any way to browse the contents of the mcp server other than copying files one by one in the web ui?

u/JustJoekingEX — 10 days ago
▲ 8 r/phaser

Shipped a 100-level Phaser 3 arcade game with zero image assets — and the 5 gotchas that cost me the most time

I just put out a free browser demo of Kinetikout, a brick breaker where the bat runs along the SIDE of the field (Krakout-style, not Breakout-style). Phaser 3 + TypeScript + Vite, wrapped in Capacitor for the Android build.

The part that might interest this sub: there are no image files for any of the gameplay graphics. Every brick pattern, all ten enemy types, all five bosses, the bat, the ball, the explosions and the HUD icons are painted in the boot scene with the Graphics API and baked in with generateTexture(). It scales to any resolution and there's no art pipeline, at the cost of "make the drone look 20% meaner" becoming a debugging session.

Five things that cost me real time, in case they save you some:

  1. Don't use a physics collider for a thin paddle. An immovable thin body made the ball jitter and leak velocity on edge hits. I replaced it with a manual check of whether the ball crossed the bat's inner plane, and computed the bounce myself. Instantly stable.

  2. Never destroy or spawn inside a physics overlap/collider callback. Catching a capsule or killing an enemy directly in the callback corrupted the physics world iteration and hard-froze the game. The fix is boring and works: set a flag, disable the body, and resolve it in update().

  3. Disabled bodies are invisible to colliders — including to your own logic. My sticky paddle holds several balls at once with body.enable = false, so incoming balls flew straight through them. I had to add manual circle-circle reflection for the held balls, running before the bat check.

  4. Scale.FIT with a fixed design size gives you black bars on phones. Instead I compute the design WIDTH at boot from the device aspect ratio (height stays fixed at 720), so the canvas always fills the screen, and I keep the actual 16:9 play field centered inside it. Everything is laid out once in create(), no resize handler needed.

  5. A button's own pointerdown fires BEFORE a scene-level this.input.once("pointerdown"). My "unlock audio on first click" handler kept starting the menu theme after the player had already left the menu, because their first click landed on the Start button. A leaving-scene flag fixed it.

Demo (browser, no install): https://m3lk0n.itch.io/kinetikout

Longer writeup on how the graphics work: https://m3lk0n.itch.io/kinetikout/devlog/1624592/every-sprite-in-this-game-is-drawn-in-code-and-heres-what-it-costs

Full disclosure since it's on the page anyway: the logo and the soundtrack were made with generative AI tools, the flag icons come from flag-icons (MIT). The sprites and the sound effects are code. The full 100-level version is a paid Android app; the browser demo is free and always will be.

Happy to answer anything about the procedural texture stuff.

reddit.com
u/M3lk0N — 10 days ago
▲ 48 r/phaser+1 crossposts

Games with a Hook Hackathon Winners

For the past month we’ve been running a hackathon offering $40,000 in prizes for games built on Devvit (Reddit’s Developer Platform). After a record number of entries (700+) and a ton of great games to evaluate, we are excited to announce the winners of the Reddit Games with a Hook Hackathon (Hookathon?)
Check out the Project Gallery to see all the amazing submissions!

Let’s get right to it!

Best App with a Hook

Best Use of Phaser

Best Use of Retention Mechanics

Best Use of User Contributions

Honorable Mentions

Helper Winners

  • u/Beach-brews
  • u/YellowAdventurous366
  • u/0xeno
  • u/Flimsy_Hand_1233
  • u/FoundationSharp106
  • u/0xkamal7

Feedback

  • u/Competitive_Good900
  • u/BrightyBrainiac
  • u/Suspicious_Law8838
  • u/danishlynx
  • u/No-Froyo4315

 

If you didn’t win, please know it is not a reflection of the overall quality of your work. We say this every hackathon and it remains true – each judge had favorite games that didn’t make it to the winners circle. We strongly encourage you to look into our Developer Funds program, as well as our Featuring Program.

Congratulations to all the winners!

u/Rarer_Air_Error — 14 days ago
▲ 14 r/phaser

Phaser 3 has no global font setting — and other things I only learned by shipping

Been building a card duel game in Phaser 3.80 + TypeScript (esbuild, no tsc in the build), and the two things that cost me the most evenings were both Text. Phaser hardcodes 'Courier' as the default font and exposes no game-level config for it, so the only sane seam is patching TextStyle.prototype.setStyle to inject fontFamily when a call site doesn't pass one — plus awaiting the woff2 before boot, since Phaser bakes a label into a canvas texture once and anything drawn early stays in the fallback face forever (looks fine on your machine, broken on a cold cache). And Text.letterSpacing is quietly broken for stroked text: it strokes the whole line in one call, then fills letter by letter at spaced offsets, so the outline drifts further behind with every character — and it split('')s, tearing surrogate-pair emoji in half. Setting the canvas 2D context's native letterSpacing instead fixes both, but it has to ride syncFont, not updateText — a label that grows assigns canvas.width, which resets the whole context.

The other decision I'd make earlier next time: keep all the game rules Phaser-free — pure modules over one plain state object, no GameObject anywhere near them. That got me a headless balance sim (5000 AI-vs-AI matches through the real rules, printing a report) and lockstep netcode where only moves cross the wire, both for basically free. If you're thinking about multiplayer later, that split is the thing to do now.

Browser build if anyone wants to poke at it: https://valeriitsarov.github.io/solitaire-duelist-2d/ — happy to go into detail on any of it.

u/Hamurapa — 10 days ago
▲ 56 r/phaser

I made my first steam game with phaser!

My first solo game demo was made with phaser and up on steam.

It’s a little auto battler roguelite and phaser was a total win to get it complete 🥂

u/Acceptable_Head8768 — 12 days ago
▲ 2 r/phaser

How to polish this game?

Hello Everyone,

I got a mixture of opinions for the game which I developed in phaser and did the art with Inkscape. I published it in both android and IOS (links below it is free) using Capacitor.

Mainly people complained about the jump mechanics at the start (jump on release), but they get used to it after a while. It was difficult for some players

The main questions are:
How to make the art/rendering look good? I tried with different settings (e.g., antialiasing, pixelart, roundpixels). I still feel it is not polished/crisp enough.

Performance. Sometimes it lags for no reason. Despite 60-61 FPS. I tried powerPreference. And forcing WebGL.

Game download links:
IOS

https://apps.apple.com/us/app/frogazan/id6795361316

Android

https://play.google.com/store/apps/details?id=com.runzbuzz.frogazan

u/alo88startup — 11 days ago