Skip to content

Latest commit

 

History

592 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Strata Game Library

A floating game world shown as geological layers: shaders, terrain, water, vegetation, and atmosphere

CI npm Node.js License: MIT

Strata is a declarative TypeScript game framework for procedural worlds. Its pure core handles game definitions, state, input, persistence, composition, pathfinding, and procedural algorithms; optional adapters bring those capabilities to React Three Fiber, Babylon/Reactylon, and Pixi.

Documentation · Quick start · Packages · Adapters · Contributing

Install

Install the umbrella package and only the peers used by your renderer:

pnpm add strata-game-library react react-dom three \
  @react-three/fiber @react-three/drei

The same package works with npm, Yarn, and Bun. Node.js 22 or newer is supported; consumers are not required to use pnpm or Mise.

Use explicit subpath imports from the same install when you need a renderer or integration. There are no separately installable Strata packages.

Quick start

import { createRPGGame } from 'strata-game-library';
import { ProceduralSky, StrataGame, Water } from 'strata-game-library/r3f';

const game = createRPGGame({
  name: 'River Crossing',
  version: '1.0.0',
  world: {
    regions: {
      meadow: { name: 'Meadow', center: [0, 0, 0], radius: 80 },
    },
    connections: [],
  },
  scenes: {
    meadow: {
      id: 'meadow',
      render: () => (
        <>
          <ProceduralSky sunPosition={[100, 50, 100]} />
          <Water size={200} depth={20} />
        </>
      ),
    },
  },
  initialScene: 'meadow',
  modes: { exploration: { systems: [] } },
  initialState: { currentRegion: 'meadow', player: { name: 'Scout' } },
});

export function App() {
  return <StrataGame game={game} />;
}

The root entry is renderer-independent. Renderer components and integrations use explicit subpaths such as strata-game-library/r3f, /reactylon, /pixi, /astro, /capacitor, /react-native, and /yuka, so installing Strata does not eagerly load every optional framework. The Yuka subpath is an ecosystem adapter: install Yuka and its R3F peers only when that is the AI runtime your game has chosen.

Package

strata-game-library is the only published package. Its public subpaths keep optional renderer and plugin code tree-shakeable without creating additional npm identities.

Architecture

shaders ──▶ core ──▶ r3f ──▶ presets
                  ├─▶ reactylon
                  └─▶ pixi

packages/core is strict, renderer-independent TypeScript. React imports belong in adapters/r3f; Babylon and Pixi concerns remain in their own adapters. This boundary keeps algorithms portable and lets consumers choose their rendering stack.

Development

Maintainers use Mise locally so a fresh clone selects the latest stable Node.js and pnpm without placing a package-manager pin in a published manifest:

mise trust
mise install
mise run install
mise run check

CI uses the official Node and pnpm setup actions, not Mise. It tests both the declared Node.js support floor and the latest stable Node.js, then runs linting, type checking, tests, builds, documentation checks, and packed-package consumption tests.

See the contribution guide for repository setup and pull-request expectations. Releases use Conventional Commits and release-please; trusted GitHub Actions publication uses npm provenance.

License

MIT © Jon Bogaty.

About

Strata Game Library - procedural 3D graphics and game framework for React Three Fiber

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages