Skip to main content

Game projects

A game is a directory of readable source files. Content describes what exists, scripts coordinate the rules, behaviors attach focused reactions to individual resources, and assets control what players see and hear.

Project anatomy

games/my-game/
├── game.yml
├── scripts/
│ ├── main.js
│ └── lib/
├── behaviors/
│ ├── items/
│ ├── mobs/
│ ├── regions/
│ └── uis/
├── content/
│ ├── blocks/
│ ├── droptables/
│ ├── items/
│ ├── mobs/
│ ├── quests/
│ ├── regions/
│ ├── textures/
│ ├── uis/
│ └── worlds/
└── assets/
├── bbmodels/
├── sounds/
└── textures/

Only game.yml and a project name are required. Add the other directories as the game needs them.

The manifest

name: crystal-caverns
description: A cooperative three-wave expedition through a luminous cavern
version: 0.1.0
entry: scripts/main.js

The optional entry defaults to scripts/main.js. Keeping that convention makes projects easy to inspect and move between AtlasEngine installations.

Typed content

Content lives at content/<type>/<id>.json. The shared schema package validates it for both the editor and server, so authoring and runtime agree about the shape.

CategoryResource types
Worldworlds, biomes, regions, blocks
Gameplayitems, mobs, drop tables, quests
Presentationmodels, textures, sounds, inventory UIs

A small item definition looks like this:

{
"id": "crystal_shard",
"name": "Singing Crystal Shard",
"icon": { "texture": "crystal_shard" },
"base": "minecraft:amethyst_shard",
"stackSize": 16
}

Use the editor's form view when you want guardrails, or edit JSON directly when that is faster.

Behaviors

A behavior at behaviors/items/crystal_shard.js is automatically loaded for the matching crystal_shard content resource. Its event subscriptions are scoped, so an item-use handler does not need to check every unrelated item itself.

import { events, on, current } from "ae2/stdlib/behavior";

on(events.ITEM_PICKUP, ({ player, count }) => {
minestom.sendMessage(
player.uuid,
"Found " + count + " " + current.data.name
);
});

Global orchestration belongs in scripts/. A reaction that belongs to one item, mob, region, quest, or UI belongs in its behavior file.

Models and resource packs

Put Bedrock .bbmodel files in assets/bbmodels. AtlasEngine builds the WorldSeed Entity Engine model output and merges content textures, sounds, item models, and UI font glyphs into the generated resource pack.

Projects without Blockbench models are valid too; content-only packs skip the model generation stage.

Validate every game

pnpm games:validate

The root test command also validates all game directories and runs deterministic game-logic tests for the larger demos.