Toy Engine

CommunityGame enginesv0.1.2samples.toy-engine
Or from the terminal
gamedev pkg add samples.toy-engine

Overview

An example game engine package: detects toy-engine.json projects, creates them, runs a tiny local game server shown in the game panel, and gives the agent two live tools.

The publisher's README is in the README section.

README

Written by the publisher, shown as published.

Toy Engine — an example game engine package

A complete game engine implemented by a package over the Extension Host (the gameEngines API, stable since package API 0.4.0; SPEC "Engine API over the Extension Host"), with no native binaries:

  • aigd-package.json — the declarative half: contributes.gameEngines (markers: a toy-engine.json file; no editor; connection: "package"; a browser game view; two starters with preview images in media/; a showcase: the colours, pitch, subtitle and tags of the create dialog). The App detects projects from it without running code.
  • extension.js — the imperative half, registered with aigd.gameEngines.registerEngine in activate(): project.create/validate, editor.launch (starts toy-server.cjs with progress lines), editor.stop, editor.gameView, editor.runIdentity, editor.health, and the agent's live tools get_state / set_ball.
  • toy-server.cjs — the "game": an HTTP server on 127.0.0.1 serving the project's index.html and a small control API.

Try it: docs/packages/TRY-IT.md §8. The contract, method by method: ENGINE-PACKAGES.md. gamedev pkg init --engine writes a TypeScript copy of this package under your own id.

Versions

Releases of Toy Engine
VersionReleasedNeeds the app
0.1.2Latest0.32.0 or newer
0.1.00.32.0 or newer

Install

In the desktop app

Open the Packages window (the package icon in the status bar), select Browse, search samples.toy-engine and click Add to Project.

No app yet? Download AI Game Dev free for Windows, macOS or Linux.

From the terminal

With the gamedev CLI, in your project folder:

gamedev pkg add samples.toy-engine

Requirements

  • AI Game Dev 0.32.0 or newer

More about packages

Install
gamedev pkg add samples.toy-engine