A TypeScript game engine for native games

Open a window and draw a shape on every frame. Perry compiles the game and links Bloom’s native library.

main.ts
import { initWindow, runGame, clearBackground, Colors } from "@bloomengine/engine";
import { drawCircle } from "@bloomengine/engine/shapes";

initWindow(640, 360, "Bloom");
runGame(() => {
  clearBackground(Colors.BLACK);
  drawCircle(320, 180, 16, Colors.GREEN);
});

Where this stands today

A desktop build needs the Rust toolchain as well as Perry. The first build compiles the native engine for that target.

Questions and answers

Can the same loop run in a browser?

Use runGame for a callback-based loop. The documented web build produces WebAssembly and requires wasm-pack.

Sources