Skip to content

Build System

The TYPE Game Engine is built on top of Electron, providing a desktop application that combines game development tools with runtime execution.

Electron Integration

Current Electron Architecture

Game Runtime Process

The game renderer is where the TYPE engine executes:

Future Editor Integration

A React-based editor is planned for integration with the engine:

Build Process

The TYPE engine uses a dual-configuration build system with Electron and Vite:

Configuration Flow

Build Process Details

electron.vite.config.ts responsibilities:

  • Sets up Electron main process compilation
  • Configures preload script with security policies
  • Prepares renderer process shells
  • Manages Electron-specific optimizations
  • Coordinates the overall build pipeline

vite.config.ts responsibilities:

  • Bundles TypeEngine and sub-engines
  • Processes game components and systems
  • Handles asset optimization and loading
  • Creates game runtime bundle for interpretation

Integration flow:

  1. electron.vite.config.ts runs first to establish Electron core
  2. Core setup triggers vite.config.ts for game file processing
  3. Game files are bundled and made available to Electron core
  4. Electron core interprets and executes the game bundle

File System Integration

Electron provides secure file system access for project management:

Available Build Commands

CommandDescription
pnpm devStart development mode with hot reloading
pnpm buildBuild application for production
pnpm build:linuxBuild Linux distributables
pnpm build:macBuild macOS distributables
pnpm build:winBuild Windows distributables

Development vs Production

Development Mode

  • Hot reloading for both main and renderer processes
  • Source maps for debugging
  • Unoptimized bundles for faster compilation
  • Development server for asset serving

Production Build

  • Optimized and minified bundles
  • Asset optimization and compression
  • Code splitting for better performance
  • Platform-specific packaging

Build Performance

The dual-configuration system allows for optimal build performance by separating Electron core concerns from game logic bundling, enabling independent optimization strategies.

Security

The build process maintains Electron security best practices with context isolation and secure preload scripts to prevent security vulnerabilities.

Released under the Academic License.