diff --git a/CLAUDE.md b/CLAUDE.md
index 9f32fd7..99caba2 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -314,6 +314,15 @@ For browser usage without bundlers, use `dist/gamebyte.umd.js`. It exposes `wind
- Constants in SCREAMING_SNAKE_CASE
- Private members prefixed with underscore or using `private` keyword
+## Documentation Site - Demo Placement Rule
+
+When adding or editing documentation pages in `docs-site/docs/`:
+- **Primary LiveDemo must appear right after the page title** (before any code blocks or detailed text)
+- `import LiveDemo` goes after frontmatter, before the `# Title`
+- Each page should have at least one relevant demo
+- Demo HTML files live in `docs-site/static/demos/`
+- New demos should follow the existing pattern: Pixi CDN + `../gamebyte.umd.js`, dark theme, self-contained
+
## Documentation
- Main README: `README.md`
diff --git a/docs-site/docs/assets/loading-caching.md b/docs-site/docs/assets/loading-caching.md
index 8f3df33..ceef6c7 100644
--- a/docs-site/docs/assets/loading-caching.md
+++ b/docs-site/docs/assets/loading-caching.md
@@ -9,10 +9,16 @@ llm_summary: "Assets.load([{ key, url, type }]). Types: texture, audio, json, mo
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Asset Loading & Caching
GameByte's asset system handles loading, caching, and memory management.
+
+
+
+
## Basic Loading
```typescript
@@ -118,8 +124,3 @@ if (Assets.isBundleLoaded('level-2')) {
}
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/audio/overview.md b/docs-site/docs/audio/overview.md
index e8d89ee..60b66c6 100644
--- a/docs-site/docs/audio/overview.md
+++ b/docs-site/docs/audio/overview.md
@@ -9,10 +9,16 @@ llm_summary: "Audio system: Music (background loops), SFX (effects), Spatial (3D
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Audio Overview
GameByte's audio system handles music, sound effects, and spatial audio.
+
+
+
+
## Audio Types
| Type | Use Case | Example |
@@ -72,8 +78,3 @@ Audio.unmute();
Audio.toggle();
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/boilerplate/overview.md b/docs-site/docs/boilerplate/overview.md
index ac25b74..d4b4b81 100644
--- a/docs-site/docs/boilerplate/overview.md
+++ b/docs-site/docs/boilerplate/overview.md
@@ -6,6 +6,8 @@ The GameByte Framework provides a complete boilerplate system for building hyper
## Live Demo
+
+
+
## When to Use
Use `SimpleScreen` instead of `BaseUIScreen` when you need:
@@ -160,8 +164,3 @@ class LoadingScreen extends SimpleScreen {
}
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/changelog/v1.3.0.md b/docs-site/docs/changelog/v1.3.0.md
index 13cab84..190bf06 100644
--- a/docs-site/docs/changelog/v1.3.0.md
+++ b/docs-site/docs/changelog/v1.3.0.md
@@ -16,6 +16,7 @@ llm_summary: "GameByte v1.3.0 release notes. 10 new modules: TickSystem (per-com
import Head from '@docusaurus/Head';
+import LiveDemo from '@site/src/components/LiveDemo';
@@ -414,6 +415,26 @@ sounds.play('coin', { volume: 0.5, pitch: 1.2, variation: 0.3 });
---
+## Live Feature Demos
+
+### TickSystem & Game Loop in Action
+
+
+
+### GameSoundPresets - Procedural Audio
+
+
+
+### PostProcessing Pipeline
+
+
+
+### 3D Features (InstanceManager, Environment)
+
+
+
+---
+
## Other Improvements
### Responsive Resize Integration
diff --git a/docs-site/docs/core-concepts/architecture.md b/docs-site/docs/core-concepts/architecture.md
index 6b16923..128d2a9 100644
--- a/docs-site/docs/core-concepts/architecture.md
+++ b/docs-site/docs/core-concepts/architecture.md
@@ -9,10 +9,20 @@ llm_summary: "Laravel-inspired DI container. game.bind(key, factory) registers s
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Architecture
GameByte uses a Laravel-inspired architecture with a service container, service providers, and facades.
+
+
+
+
## Service Container
The service container manages all game services and their dependencies.
@@ -238,6 +248,14 @@ interface ServiceMap {
const score = game.make('score.manager');
```
+## Reactive State
+
+
+
## Architecture Diagram
```
diff --git a/docs-site/docs/core-concepts/configuration.md b/docs-site/docs/core-concepts/configuration.md
index 96429fd..347335a 100644
--- a/docs-site/docs/core-concepts/configuration.md
+++ b/docs-site/docs/core-concepts/configuration.md
@@ -9,10 +9,18 @@ llm_summary: "Configure via createGame({ config }) or game.setConfig(). Key opti
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Configuration
GameByte provides sensible defaults with full customization options.
+
+
## Configuration Methods
### At Creation
diff --git a/docs-site/docs/getting-started/first-game-tutorial.md b/docs-site/docs/getting-started/first-game-tutorial.md
index eb6532b..dde81f7 100644
--- a/docs-site/docs/getting-started/first-game-tutorial.md
+++ b/docs-site/docs/getting-started/first-game-tutorial.md
@@ -360,7 +360,9 @@ private collectCoin(): void {
}
```
-## Complete Code
+## Complete Game Demo
+
+
See the [full example on GitHub](https://github.com/gamebyte-ai/gamebyte-framework/tree/main/examples/platformer).
diff --git a/docs-site/docs/getting-started/installation.md b/docs-site/docs/getting-started/installation.md
index 383c12a..c8c975c 100644
--- a/docs-site/docs/getting-started/installation.md
+++ b/docs-site/docs/getting-started/installation.md
@@ -9,10 +9,18 @@ llm_summary: "Install via npm: 'npm install @gamebyte/framework'. For browser: u
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Installation
GameByte Framework can be installed via npm or used directly in the browser via CDN.
+
+
## npm (Recommended)
```bash
diff --git a/docs-site/docs/getting-started/quick-start.md b/docs-site/docs/getting-started/quick-start.md
index 2f1c4a2..a2c0eb8 100644
--- a/docs-site/docs/getting-started/quick-start.md
+++ b/docs-site/docs/getting-started/quick-start.md
@@ -15,6 +15,16 @@ import LiveDemo from '@site/src/components/LiveDemo';
Build your first GameByte game in 5 minutes.
+
+
+:::tip Theme Support
+This demo automatically adapts to your selected theme. Try toggling the theme using the 🌙/☀️ button in the navigation bar!
+:::
+
## Step 1: Setup HTML
```html
@@ -103,18 +113,6 @@ Open the HTML file in a browser or use a local server:
npx http-server -p 8080
```
-## Live Demo
-
-
-
-:::tip Theme Support
-This demo automatically adapts to your selected theme. Try toggling the theme using the 🌙/☀️ button in the navigation bar!
-:::
-
## What's Happening?
1. **`createGame()`** - Creates the game instance with service container
diff --git a/docs-site/docs/input/overview.md b/docs-site/docs/input/overview.md
index d474532..251c092 100644
--- a/docs-site/docs/input/overview.md
+++ b/docs-site/docs/input/overview.md
@@ -9,10 +9,18 @@ llm_summary: "Unified input: Input.keyboard, Input.touch, Input.gamepad. Event-b
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Input Overview
GameByte provides a unified input system for all platforms.
+
+
+
+
+
+
## Input Sources
| Source | Use Case |
@@ -61,8 +69,3 @@ function update(deltaTime: number) {
}
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/input/touch.md b/docs-site/docs/input/touch.md
index 0aa8731..47d0b36 100644
--- a/docs-site/docs/input/touch.md
+++ b/docs-site/docs/input/touch.md
@@ -15,6 +15,12 @@ import LiveDemo from '@site/src/components/LiveDemo';
Mobile-optimized touch handling with gesture support.
+
+
## Basic Touch
```typescript
diff --git a/docs-site/docs/layout/examples.md b/docs-site/docs/layout/examples.md
index 401dd94..52aef28 100644
--- a/docs-site/docs/layout/examples.md
+++ b/docs-site/docs/layout/examples.md
@@ -7,10 +7,14 @@ keywords: [layout, examples, game-ui, patterns, flexbox]
llm_summary: "Common game UI layout patterns: Game HUD with top/bottom bars, level select grid, settings menu, shop screen, leaderboard. All use flexbox via @pixi/layout."
---
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Layout Examples
Common layout patterns for mobile game UI using the GameByte layout system.
+
+
## Game HUD
Typical game screen with top bar, content area, and bottom navigation:
@@ -430,10 +434,3 @@ window.addEventListener('resize', () => {
});
```
-## Live Demo
-
-See all these patterns in action:
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/layout/layout-manager.md b/docs-site/docs/layout/layout-manager.md
index e0a6d93..f3c1849 100644
--- a/docs-site/docs/layout/layout-manager.md
+++ b/docs-site/docs/layout/layout-manager.md
@@ -7,10 +7,14 @@ keywords: [layout-manager, responsive, breakpoints, scaling, api]
llm_summary: "LayoutManager handles layout initialization, responsive scaling, and breakpoints. Use getLayoutManager() for singleton access. Provides presets and responsive utilities."
---
+import LiveDemo from '@site/src/components/LiveDemo';
+
# LayoutManager API
The `LayoutManager` class provides centralized layout management with responsive scaling support.
+
+
## Basic Usage
```typescript
@@ -346,8 +350,3 @@ async function createGame() {
}
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/layout/overview.md b/docs-site/docs/layout/overview.md
index 0d3195e..5d2e2df 100644
--- a/docs-site/docs/layout/overview.md
+++ b/docs-site/docs/layout/overview.md
@@ -7,10 +7,16 @@ keywords: [layout, flexbox, yoga, responsive, pixi-layout]
llm_summary: "GameByte uses @pixi/layout (Yoga flexbox engine) for responsive UI layouts. Supports flex direction, justify content, align items, gap, wrap, and percentage sizing."
---
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Layout System
GameByte integrates [@pixi/layout](https://layout.pixijs.io/) - a powerful Yoga-based flexbox layout system for PixiJS. This enables CSS-like flexbox layouts for game UI.
+
+
+
+
## Why Flexbox for Games?
- **Responsive Design**: Automatically adapts to different screen sizes
@@ -113,14 +119,6 @@ container.layout = LayoutPresets.center;
hudContainer.layout = GameLayoutPresets.gameScreen;
```
-## Live Demo
-
-Interactive examples of all layout features:
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
-
## Next Steps
- [Layout Presets](./presets) - Pre-defined layout configurations
diff --git a/docs-site/docs/layout/presets.md b/docs-site/docs/layout/presets.md
index 7a7a5a6..5dc9bd2 100644
--- a/docs-site/docs/layout/presets.md
+++ b/docs-site/docs/layout/presets.md
@@ -7,10 +7,14 @@ keywords: [layout, presets, flexbox, ui-patterns, game-ui]
llm_summary: "LayoutPresets provides pre-defined flexbox configurations. GameLayoutPresets has game-specific layouts. Helper functions create custom layouts easily."
---
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Layout Presets
GameByte provides pre-defined layout configurations for common UI patterns.
+
+
## LayoutPresets
General-purpose layout presets:
@@ -286,8 +290,3 @@ const scaledLayout = scaleLayout(LayoutPresets.card, 1.5);
container.layout = scaledLayout;
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/overview.md b/docs-site/docs/overview.md
index 1ce1e5a..2ac2a38 100644
--- a/docs-site/docs/overview.md
+++ b/docs-site/docs/overview.md
@@ -10,6 +10,8 @@ llm_summary: "GameByte is a comprehensive game framework unifying 2D (Pixi.js) a
+import LiveDemo from '@site/src/components/LiveDemo';
+
# GameByte Framework
**Modern Mobile-First Game Development Framework**
@@ -94,8 +96,18 @@ GameByte is optimized for AI-driven development:
See the [AI Agent Guide](/ai-agent-guide) for integration details.
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
+## Live Demos
+
+### Space Shooter
+
+
+
+### 3D Rendering
+
+
+
+### Physics Engine
+
+
diff --git a/docs-site/docs/physics/overview.md b/docs-site/docs/physics/overview.md
index c8e891b..a0897fb 100644
--- a/docs-site/docs/physics/overview.md
+++ b/docs-site/docs/physics/overview.md
@@ -9,10 +9,16 @@ llm_summary: "2D: Matter.js via Physics.create2DWorld(). 3D: Cannon.js via Physi
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Physics Overview
GameByte integrates industry-standard physics engines for realistic simulations.
+
+
+
+
## Engines
| Dimension | Engine | Use Cases |
@@ -84,8 +90,3 @@ Physics.onCollision('player', 'enemy', (playerBody, enemyBody) => {
- **FPS/TPS**: 3D (Cannon.js)
- **Hybrid (3D world, 2D gameplay)**: Either based on gameplay needs
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/rendering/3d-three.md b/docs-site/docs/rendering/3d-three.md
index bbe0da0..c6ce9f8 100644
--- a/docs-site/docs/rendering/3d-three.md
+++ b/docs-site/docs/rendering/3d-three.md
@@ -332,3 +332,13 @@ mesh.frustumCulled = true;
// Disable for always-visible objects
skybox.frustumCulled = false;
```
+
+## More 3D Demos
+
+### Camera Controls
+
+
+
+### Pathfinding in 3D
+
+
diff --git a/docs-site/docs/rendering/hybrid-mode.md b/docs-site/docs/rendering/hybrid-mode.md
index fe5fdac..5dfbb7f 100644
--- a/docs-site/docs/rendering/hybrid-mode.md
+++ b/docs-site/docs/rendering/hybrid-mode.md
@@ -15,6 +15,12 @@ import LiveDemo from '@site/src/components/LiveDemo';
Hybrid mode combines Three.js (3D world) with Pixi.js (2D UI overlay) for the best of both worlds.
+
+
## When to Use Hybrid Mode
- 3D games with complex UI (RPGs, strategy games)
@@ -161,16 +167,6 @@ class GameScene extends BaseScene {
}
```
-
-
-:::tip Theme Support
-This demo automatically adapts to your selected theme. Try toggling the theme using the 🌙/☀️ button in the navigation bar!
-:::
-
## Layer Management
### Z-Order Control
diff --git a/docs-site/docs/rendering/overview.md b/docs-site/docs/rendering/overview.md
index a1803b6..baf3c04 100644
--- a/docs-site/docs/rendering/overview.md
+++ b/docs-site/docs/rendering/overview.md
@@ -9,10 +9,26 @@ llm_summary: "Three render modes: '2d' (Pixi.js), '3d' (Three.js), 'hybrid' (bot
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Rendering Overview
GameByte supports three rendering modes to cover any game type.
+
+
+### 2D Rendering (Pixi.js)
+
+
+
+### 3D Rendering (Three.js)
+
+
+
+### Hybrid Mode (2D + 3D)
+
+
+
## Rendering Modes
| Mode | Engine | Use Case |
@@ -196,8 +212,3 @@ renderer.add(mesh);
- [3D Rendering](/rendering/3d-three) - Deep dive into Three.js
- [Hybrid Mode](/rendering/hybrid-mode) - Combining 2D and 3D
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/docs/scenes/scene-management.md b/docs-site/docs/scenes/scene-management.md
index b50d397..92315e9 100644
--- a/docs-site/docs/scenes/scene-management.md
+++ b/docs-site/docs/scenes/scene-management.md
@@ -9,10 +9,18 @@ llm_summary: "SceneManager: add(), switchTo(), remove(). BaseScene lifecycle: in
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Scene Management
Scenes organize your game into distinct states like menus, gameplay, and game over screens.
+
+
+
+
+
+
## Basic Usage
```typescript
@@ -232,14 +240,3 @@ await sceneManager.switchTo('game'); // Instant switch
await sceneManager.preloadAll(['game', 'settings', 'shop']);
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
-
-### Memory Game Example
-
-This memory card game demonstrates scene state management with card matching logic, timer, and score tracking:
-
-
diff --git a/docs-site/docs/ui-components/overview.md b/docs-site/docs/ui-components/overview.md
index 2f5aab5..e2c6f9d 100644
--- a/docs-site/docs/ui-components/overview.md
+++ b/docs-site/docs/ui-components/overview.md
@@ -237,6 +237,24 @@ const button = new UIButton({
});
```
+## More Component Demos
+
+### Game Buttons
+
+
+
+### Top Bar (HUD)
+
+
+
+### Hexagon Level Selector
+
+
+
+### Bottom Navigation
+
+
+
## Performance Tips
1. **Reuse components** instead of creating/destroying
diff --git a/docs-site/docs/ui-components/responsive-layout.md b/docs-site/docs/ui-components/responsive-layout.md
index 74b8f45..915b27d 100644
--- a/docs-site/docs/ui-components/responsive-layout.md
+++ b/docs-site/docs/ui-components/responsive-layout.md
@@ -9,10 +9,14 @@ llm_summary: "ResponsiveLayoutManager handles screen adaptation. Use UIContainer
+import LiveDemo from '@site/src/components/LiveDemo';
+
# Responsive Layout
GameByte's layout system adapts to any screen size.
+
+
## Screen Adaptation
```typescript
@@ -236,8 +240,3 @@ layout.on('orientationchange', (orientation) => {
layout.lockOrientation('landscape');
```
-## Live Demo
-
-import LiveDemo from '@site/src/components/LiveDemo';
-
-
diff --git a/docs-site/static/demos/2048-demo.html b/docs-site/static/demos/2048-demo.html
new file mode 100644
index 0000000..db3f982
--- /dev/null
+++ b/docs-site/static/demos/2048-demo.html
@@ -0,0 +1,522 @@
+
+
+
+
+
+ GameByte - 2048 Demo
+
+
+
+ 2048
+ GameByte Layout System - Grid & Dynamic Repositioning
+
+ Arrow keys or swipe to slide tiles. Merge equal numbers!
+
+
+
+
+
diff --git a/docs-site/static/demos/archero-menu-demo.html b/docs-site/static/demos/archero-menu-demo.html
index b7ca65d..e66be7a 100644
--- a/docs-site/static/demos/archero-menu-demo.html
+++ b/docs-site/static/demos/archero-menu-demo.html
@@ -11,11 +11,11 @@
canvas { display: block; }
-
+
-
+
+
+
+
+
+