Explore complete example games
Each demo is an ordinary AtlasEngine game directory. Open one in the editor, run it unchanged, then modify one system at a time.
Hello World
A minimal script that spawns a custom rat model and gives it a new navigation target every five seconds.
games/hello-worldBomberman
Generated arenas, timed bombs, chain reactions, power-ups, rounds, quests, custom UI, and scoped behaviors.
games/bombermanCrystal Caverns
A three-wave expedition with scripted encounters, mobs, loot, regions, quests, UI, and environmental pacing.
games/crystal-cavernsRun a demo
The Compose stack chooses a project with AE2_GAME:
AE2_GAME=crystal-caverns
For direct JVM development, point the server at the directory:
AE2_GAME_DIR="$PWD/games/crystal-caverns" ./gradlew :apps:server:run
Then connect Minecraft to localhost:25565.
Hello World: the smallest useful loop
The starter project demonstrates the script lifecycle and model navigation without hiding the idea behind framework code:
import { onServerStart, everyTicks } from "ae2/stdlib/events";
onServerStart(() => {
const rat = minestom.spawnModelMob("rat", { x: 0, y: 42, z: 0 });
everyTicks(100, () => {
minestom.navigateMob(rat, {
x: Math.floor(Math.random() * 33) - 16,
y: 42,
z: Math.floor(Math.random() * 33) - 16,
});
});
});
Read this one first when you want to understand where scripts start and how the runtime bridge feels.
Bomberman: systems working together
Bomberman is the broad feature demo. Its main script owns arena generation and the round state machine. Small library modules handle grid math, bombs, and power-up rolls. Resource behaviors respond to item pickup, quest, region, and UI events.
| Path | What it demonstrates |
|---|---|
scripts/main.js | Server lifecycle, players, rounds, world generation |
scripts/lib/bombs.js | Timers, explosions, blast chaining |
behaviors/items/ | Resource-scoped pickup effects |
content/ | Blocks, items, models, quests, sounds, textures, UI |
test-blast.mjs | Fast deterministic tests for pure game logic |
Crystal Caverns: a compact adventure
Crystal Caverns builds a luminous arena at runtime and drives players through three guardian waves. It uses a boss bar, scoreboard, item behaviors, a region trigger, two quests, drop tables, and an inventory UI.
The state machine in scripts/lib/expedition.js is intentionally independent of the server. That keeps progression easy to test:
node games/crystal-caverns/test-expedition.mjs
Copy the demo closest to your idea, rename it in game.yml, delete the systems you do not need, and keep one playable loop at every step.