babylon-game-starter

Babylon Game Starter

A modular, configuration-driven 3D game framework built with Babylon.js v9, TypeScript, and Vite.

Babylon Game Starter provides a complete, ready-to-run foundation for building interactive 3D browser games. It ships with physics-based character movement, an environment system, collectibles, inventory, a behavior trigger system, particle effects, an AudioV2-powered sound engine, and full mobile control support — all driven by configuration files.


Features


Tech Stack

Package Version
@babylonjs/core ^9.1.0
@babylonjs/gui ^9.1.0
@babylonjs/havok ^1.3.12
@babylonjs/loaders ^9.1.0
@babylonjs/materials ^9.1.0
vite ^5.0.8
typescript ^5.3.3

Quick Start

npm install
npm run dev

Open http://localhost:3000 in your browser.


Scripts

Command Description
npm run dev Start the Vite development server
npm run build Build for production into dist/
npm run preview Preview the production build locally
npm run export:playground Bundle TypeScript source into playground.json for the Babylon.js web editor

Project Structure

src/
  config/           # Game configuration (assets, HUD, input, physics, etc.)
  controllers/      # Character, camera, and animation controllers
  input/            # Mobile touch input manager
  managers/         # Scene, audio, HUD, collectibles, inventory, and other managers
  types/            # TypeScript type definitions
  ui/               # Settings and inventory UI components
  utils/            # Helper utilities (environment switching, notifications, etc.)
  index.ts          # Entry point
  main.ts           # Babylon.js scene bootstrap
  index.html        # App HTML shell
scripts/
  generate-playground-json.mjs  # Playground export script
public/
  playground.json   # Latest playground export

Documentation

See USERS_GUIDE.md for full documentation including system architecture, configuration reference, and a narrative design guide.

Deployment system documentation is available at src/deployment/DEPLOYMENT.md.