Skip to content
Public template

About

A quick-start Phaser 4 template used by the Bodging Bear team. Built by webpack, powered by TypeScript

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

Bodging Bear

Phaser 4 Template

The Bodging Bear starting point for new games. It's built so a coding agent can pick it up and run.

Report Bug · Request Feature

About The Project

Template showcase

The Bodging Bear team uses this template when starting a new game. The intro, main menu, how-to-play and credits are already done, so the work starts in GameScene.

It includes Bodging Bear-specific bits (intro, credits, analytics), but feel free to use it for your own project.

Features

  • Bodging Bear intro animation while assets load
  • Main menu with a video background, How to play and Credits scenes
  • TextButton component and a typed event emitter
  • An agent harness: strict TypeScript, type-aware oxlint with project rules that tell agents how to fix a violation and Claude Code hooks

Built With

Getting Started

You need Node.js 24+ and pnpm (corepack enable sets it up from the packageManager field).

pnpm install
cp .env.example .env                    # optional: VITE_SKIP_INTRO=true skips the intro
pnpm dev

Available Commands

Command Description
pnpm dev Dev server on http://localhost:5173
pnpm build Production build into dist/ (relative paths, so it deploys to any static host)
pnpm preview Serve the production build
pnpm check Everything: format check, lint, typecheck and build. CI runs this.
pnpm lint / pnpm lint:fix Type-aware oxlint
pnpm typecheck tsc --noEmit
pnpm format / pnpm format:check oxfmt

Working With Agents

AGENTS.md is the agent brief: layout, conventions, recipes, and the Phaser 4 gotchas. CLAUDE.md imports it.

  • Phaser ships official agent skills inside the npm package. pnpm-workspace.yaml lets pnpm link them into .claude/skills and .agents/skills on install, so agents always read docs for the installed version rather than Phaser 3 knowledge from training.
  • tools/oxlint-plugin has project rules (scene keys, asset imports, no hardcoded resolution, explicit Phaser import) whose messages say what to do instead.
  • tools/agent-hooks has Claude Code hooks: lint every edited file, and refuse to stop while typecheck or lint fail.

License

Distributed under the Creative Commons Attribution-NonCommercial 4.0 International License.
See https://creativecommons.org/licenses/by-nc/4.0 for a human-readable summary of it and LICENSE.md for full license text.

If you wish to commercially use your game that was created using this template, drop us a message at team@bodgingbear.dev.

The Press Start 2P font is licensed under the SIL Open Font License.

Contact

Bartek (@bibix1999) and Kacper (@pietrzakacper) – team@bodgingbear.dev

About

A quick-start Phaser 4 template used by the Bodging Bear team. Built by webpack, powered by TypeScript

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Contributors

Languages