Skip to main content

Game Boilerplate

The GameByte Framework provides a complete boilerplate system for building hyper-casual and mobile games quickly. This includes pre-built screens, panels, and navigation systems that follow proven mobile game patterns.

Live Demoโ€‹

๐ŸŽฎTrivia Quiz - Screens, Panels & Navigation in Action
Loading demo...
๐ŸŽฎHubScreen with TopBar and Navigation
Loading demo...
Theme Support

This demo automatically adapts to your selected theme. Try toggling the theme using the sun/moon button in the navigation bar!

Architectureโ€‹

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ScreenManager โ”‚
โ”‚ (Stack-based navigation + transitions) โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚HubScreenโ”‚โ†’ โ”‚GameHUD โ”‚โ†’ โ”‚Result โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ โ”‚Screen โ”‚ โ”‚Screen โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ PanelManager โ”‚
โ”‚ (Modal, BottomSheet, Fullscreen) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Quick Startโ€‹

import {
ScreenManager,
PanelManager,
HubScreen,
GameHUDScreen,
ResultScreen,
GameModalPanel,
GameBottomSheet,
} from '@gamebyte/framework';

// Create managers
const screenManager = new ScreenManager({
container: stage,
width: 720,
height: 1280,
defaultTransition: 'slide',
});

const panelManager = new PanelManager({
container: stage,
screenWidth: 720,
screenHeight: 1280,
});

// Create and show hub screen
const hub = new HubScreen({
topBarResources: [
{ type: 'coins', value: 1000, showAddButton: true },
{ type: 'gems', value: 50 },
],
bottomNavItems: [
{ id: 'shop', type: 'shop', label: 'Shop' },
{ id: 'play', type: 'play', label: 'Play', highlighted: true },
{ id: 'profile', type: 'profile', label: 'Profile' },
],
});

screenManager.push(hub);

Componentsโ€‹

Screen Managementโ€‹

Pre-built Screensโ€‹

Panel Systemโ€‹

Typical Game Flowโ€‹

// 1. Start at Hub
screenManager.push(hubScreen);

// 2. User taps Play โ†’ Push Game Screen
screenManager.push(gameScreen, 'slide');

// 3. Game ends โ†’ Replace with Result
screenManager.replace(resultScreen, 'fade');

// 4. User taps Home โ†’ Pop to Hub
screenManager.popToRoot();

// Show settings panel anytime
panelManager.show(new GameModalPanel({ title: 'Settings' }));