Skip to content

mobulum/games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mobulum Games

Monorepo for browser games hosted at games.mobulum.com.
Each game is deployed to its own repo in github.com/mobulum-games with a custom subdomain.

Stack

  • Phaser 3 - game framework
  • Vite - build tool
  • TypeScript - language
  • GitHub Pages - hosting

Structure

games/
├── index.html              # Root page (games.mobulum.com)
├── CNAME
├── projects/
│   ├── base/               # Template for new games
│   ├── defend-yourself/    # Example game project
│   └── .../
├── scripts/
│   └── create-project.sh   # CLI to scaffold new games
└── .github/workflows/
    ├── deploy-root.yml     # Deploys root page
    └── deploy-game.yml     # Deploys game dist to target repo

Create a new game

./scripts/create-project.sh <project-slug>

Example:

./scripts/create-project.sh defend-yourself

This will:

  1. Copy projects/base to projects/defend-yourself
  2. Update package name, title, and display text
  3. Install deps and build
  4. Add the game to the root page games list
  5. Create repo mobulum-games/defend-yourself on GitHub
  6. Push dist files with CNAME defend-yourself.games.mobulum.com

Development

cd projects/<slug>
npm run dev     # Start dev server on :3000
npm run build   # Production build to dist/

Deploy

  • Root page: auto-deploys on push to master when index.html changes
  • Games: auto-deploys on push to master when files in projects/<slug>/ change
  • Manual deploy: trigger Deploy Game workflow with project slug

Required setup

  1. Create a GitHub PAT with repo scope and add it as DEPLOY_TOKEN secret in this repo
  2. Enable GitHub Pages on each target repo (Settings > Pages > master branch)
  3. DNS: CNAME *.games.mobulum.com -> mobulum-games.github.io

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors