This is a Phaser 3 + Angular 19 starter wired for fast iteration with a small control panel, a config route, and an EventBus to bridge Angular and Phaser. It’s intentionally simple so you can focus on mascot personality, interactivity, and external data.
- Prereqs: Node 18+, npm, Git
- Install:
npm install - Dev (with lightweight telemetry ping):
npm run dev - Dev (offline / no ping):
npm run dev-nolog - Build (prod + base href='./'):
npm run buildornpm run build-nolog - Open: Angular dev server runs at
http://localhost:4200
Notes
- The
devandbuildscripts calllog.jswhich sends a tiny GET to record usage. Prefer*-nologif offline or avoiding network calls. - Production output path:
dist/template-angular/(configured inangular.json). - On Linux systems,
npm installwill automatically set up tmux/tmuxinator environment (see Development Environment section below).
- Scene flow (Boot → Preloader → MainMenu → MascotPlayground)
- Overlay controls in Angular to drive scenes and movement
- Config route with persistent settings (via
StorageService) - EventBus for Angular ↔ Phaser messaging
src/
app/
app.component.* # Angular shell
app.routes.ts # Routes for Home and Configuration
home/ # Overlay controls (status + buttons)
configuration/ # Config UI (persists to StorageService)
phaser-game.component.ts # Hosts the Phaser canvas
storage.service.ts # Wrapper around unstorage localStorage driver
game/
main.ts # Phaser config and scene list
EventBus.ts # EventEmitter bridge
scenes/ # Boot, Preloader, MainMenu, MascotPlayground
public/
assets/ # Static assets copied to build
- Status pill: shows current scene and whether movement is On/Off
- Buttons
- Change Scene: calls the active scene’s
changeScene() - Toggle Movement: works in MainMenu (logo tween) and MascotPlayground (mascot tween)
- Add New Sprite: enabled in MascotPlayground, spawns a random animated companion
- Change Scene: calls the active scene’s
The overlay subscribes to EventBus events to stay in sync with the active scene.
- Game Title: edit the title and click Save.
- Persistence: stored using
StorageService(backed byunstoragelocalStorage driver under theapp:namespace). - Game scene consumption: on app load and on save, Angular emits
config-loaded/config-saved. The Game scene listens and updates its title live.
Tip: Use this route to add more mascot parameters (mood thresholds, animation speed, etc.). Emit Events when they change, and apply them in scenes.
current-scene-ready: (scene: Phaser.Scene)— emitted by active scene when readyadd-sprite— Angular requests Game to create a random spriteconfig-loaded: (config)— emitted after Angular loads saved configconfig-saved: (config)— emitted after user saves config- Additional placeholders already present in the config component if helpful:
toggle-sound: (enabled: boolean)music-volume-changed: (0..1)sfx-volume-changed: (0..1)difficulty-changed: ('easy'|'medium'|'hard')
- Place files in
public/assets/— they’re copied as-is to the build. - Scenes load with relative paths like
this.load.setPath('assets')thenthis.load.image('logo','logo.png'). - Keep sizes small. The Boot/Preloader scenes are minimal by design to avoid blocking loads.
- You’re expected to connect the mascot to something real (API, webhook, workspace events, etc.).
- Do not commit secrets. Prefer public APIs, proxy via a lightweight server if needed, or store non-secret toggles via the config route.
- Provide a demo/test mode in the UI so judges can simulate signals without relying on live events.
On Linux systems, running npm install automatically sets up a tmux development environment with tmuxinator. Tmuxinator is a tmux session manager that allows you to easily manage complex tmux sessions with pre-configured window and pane layouts.
After installation, start your development environment with:
tmuxinator start vibeThis creates a tmux session with 4 pre-configured windows:
- servers-core 🫘🫘 — Runs the Angular development server (
npm run dev) - ai 📎 — Split pane with:
- Claude Code for AI-assisted development
- Scratchpad for notes and temporary code snippets
- stats 📊 — Development monitoring with:
- Claude Code usage statistics (
npx ccusage@latest blocks --live) - System resource monitoring (
htop)
- Claude Code usage statistics (
- terminal 🖥 — General purpose terminal for git, npm, and other commands
The tmux configuration includes:
- Mouse support for easy pane navigation and resizing
- Vi-mode keybindings for familiar navigation
- Quick pane switching with Alt+Arrow keys
- Custom color scheme matching the Vibeathon theme
- Pane synchronization for running commands across multiple panes
Configuration files are located in tools/tmux/:
.tmux.conf— Main tmux configurationvibe.yml— Tmuxinator session template
- Start simple: wire one data source and one visible reaction.
- Use the EventBus to isolate Angular UI from Phaser logic.
- Make states obvious: show status text or simple color/mood changes.
- Keep asset sizes and animation counts reasonable — faster iteration wins.
- Each team should add a short write-up at
learnings/learnings.md. - Summarize how you used AI as a team: what worked, what didn’t, collaboration patterns, and prompt strategies you’d reuse.
- No need to log every single prompt; focus on insights and takeaways that would help future teams.
npm run dev—log.js+ Angular dev servernpm run dev-nolog— Angular dev server onlynpm run build— production build with hashing, base href./npm run build-nolog— production build without analytics ping
- The project doesn’t ship with spec files;
ng testwill report no inputs by default. - If you add specs, run
npx ng test(Karma + Jasmine).
- Branch per team: do work in your team branch and open PRs if helpful.
- Keep commits small and descriptive (e.g., "Add scene transition", "Hook up Slack webhook").
- Create
learnings/learnings.md(see above) to capture team-level insights about using AI. Detailed prompt-by-prompt logs are not required.
- Blank page after build: ensure your host path matches base href
./. - Dev port: Angular serves on
http://localhost:4200. - Offline/blocked analytics: use
npm run dev-nolog/npm run build-nolog. - Reset local config: clear keys under the
app:namespace in browser localStorage.
Good luck, and have fun building a mascot with personality! 🎉
