Linden Engine
PRD v1.4

Dokumentasi

1. Pengantar

1.1 Apa itu Linden?

Linden adalah platform pengembangan game berbasis AI yang mengubah prompt bahasa alami menjadi kode game deterministik, aset, dan scene graph yang siap produksi. Menggunakan Multi-Agent Orchestrator yang terdiri dari 5 agen spesialis yang bekerja secara paralel.

AgenSpesialisasi
Game ArchitectScene hierarchy, node tree, lifecycle management
ProgrammerGDScript 2.0, C# 12, Rust bindings, AST diffing
Technical ArtistShader GLSL/HLSL/WGSL, sprite atlas, normal maps
QA InspectorHeadless simulation, collision testing, performance profiling
Level SynthesizerProcedural level generation, difficulty pacing, biome design

1.2 Fitur Utama

  • Prompt-to-Playable – deskripsikan game dalam bahasa alami
  • Hot-Reload <100ms – perubahan instan tanpa restart
  • Multi-Target Export – WebGPU, Windows, macOS, Linux, Steam
  • AST-Level Precision – tidak pernah menimpa kode custom
  • Deterministic Output – hasil konsisten dan dapat diprediksi
  • Zero-Royalty – 100% kepemilikan penuh atas output

1.3 Persyaratan Sistem

KomponenMinimumDirekomendasikan
BrowserChrome 113+, Safari 18+, Firefox 120+Chrome 132+ (WebGPU)
RAM4 GB8 GB
GPUWebGL 2.0 supportWebGPU / Vulkan 1.3
OSWindows 10, macOS 12, Linux (Ubuntu 22.04)Windows 11 / macOS 14+
Internet10 Mbps50 Mbps (untuk streaming agent)

2. Panduan Memulai

2.1 Pendaftaran & Login

  1. Buka Linden Studio (linden.ai)
  2. Klik "Start Building" atau "Sign In"
  3. Login menggunakan Google Account, GitHub, atau Email
  4. Setelah login, diarahkan ke Workspace Dashboard

2.2 Dashboard Overview

workspace · dashboard
┌────────────────────────────────────────────────────┐ │ [Logo] v1.4 Engine [Search] [User Avatar] │ ├─────────────┬──────────────────────────────────────┤ │ Sidebar │ Main Workspace │ │ ────────── │ ──────────────────────────────────── │ │ • Projects │ ┌──────────────────────────────┐ │ │ • Templates │ │ Prompt Input Area │ │ │ • Showcase │ │ [Describe your game...] │ │ │ • Docs │ │ [Generate Prototype] │ │ │ • Settings │ └──────────────────────────────┘ │ │ │ │ │ │ Recent Projects: │ │ │ • CyberRogue (2 mins ago) │ │ │ • DungeonCrawler (1 hour ago) │ └─────────────┴──────────────────────────────────────┘

2.3 Proyek Pertama: "Hello Platformer"

  1. Langkah 1 — Masukkan Prompt:
    Create a 2D platformer with a blue character who can jump and
    collect yellow coins. Add a red enemy that moves back and forth.
  2. Langkah 2 — Klik Generate:

    Tombol "Generate Prototype" mengirim prompt, memproses 30-60 detik, lalu menampilkan preview game interaktif.

  3. Langkah 3 — Lihat Hasil:

    Game Canvas, Scene Graph (node Godot), Code Editor (GDScript), dan Agent Log.

  4. Langkah 4 — Ekspor:

    Pilih format: Web (HTML5/WASM), Godot Project (.zip), atau Windows .exe.

3. Konsep Dasar

3.1 Memahami 5 Agen

3.1.1 Game Architect

Transforms deskripsi level, genre, dan mekanik inti menjadi node tree Godot dan signal bus.

3.1.2 Programmer Agent

Menulis kode deterministik dan type-safe. Menggunakan AST Diffing — hanya mengubah baris yang diperlukan.

3.1.3 Technical Artist

Membuat aset visual dan shader (GLSL/WGSL) dari deskripsi visual dan palet warna.

3.1.4 QA Inspector

Menjalankan 10,000 physics ticks headless, memeriksa NaN/INF, clipping, dan memory leak.

3.1.5 Level Synthesizer

Generate level prosedural dengan Wave Function Collapse (WFC) + difficulty curve.

3.2 Pipeline Kerja

┌──────────────┐ ┌───────────────┐ ┌───────────────┐ │ Prompt │────▶│ Architect │────▶│ Programmer │ │ (Natural) │ │ (Node Tree) │ │ (Code Gen) │ └──────────────┘ └───────────────┘ └───────────────┘ │ │ ▼ ▼ ┌───────────────┐ ┌───────────────┐ │ Artist │ │ QA Inspector │ │ (Assets) │ │ (Testing) │ └───────────────┘ └───────────────┘ │ │ └───────────┬───────────┘ ▼ ┌─────────────────┐ │ Level Synth. │ │ (Procedural) │ └─────────────────┘

3.3 Memahami Token

AktivitasTokens
1 prompt parsing~100-500 token
Generate full platformer~12,000 token
Shader generation~2,400 token
Physics tweak~800 token
Level generation~3,500 token

4. Panduan Menengah

4.1 Menggunakan Agent Secara Manual

Gunakan tag @agent untuk memanggil agen tertentu:

@architect: "Tambahkan node Area2D di bawah Player untuk deteksi loot"
@programmer: "Buat fungsi collect_item() yang menambah score"
@artist: "Generate 4-frame walk animation untuk karakter"
@qa: "Jalankan test untuk wall-jump mechanic"
@level: "Generate dungeon level dengan 5 ruangan"

4.2 Customizing Output

Buat game dengan:
- Speed: 500px/s
- Jump: 350px
- Gravity: 1500px/s²
- Wall Jump Force: 200px

4.3 Integrasi dengan Godot / Unity Editor

  1. Export project ke format Godot (.zip) atau Unity (.unitypackage)
  2. Import ke editor — kode Anda tetap aman, Linden hanya patch bagian tertentu
  3. Upload kembali project yang sudah diedit untuk sync dua arah

4.4 Command Line (CLI)

npm install -g @linden/cli

# Generate dari file prompt
linden generate -f game_prompt.txt -o ./output
# Export ke Godot
linden export -t godot -o ./my_game
# Jalankan headless test
linden test --ticks=1000 --headless

4.5 REST API & WebSocket

POST /api/v1/generate
Authorization: Bearer YOUR_API_KEY
{
  "prompt": "Create a 2D top-down shooter",
  "engine": "godot",
  "export": ["web", "windows"]
}

5. Panduan Mahir

5.1 Advanced Prompt Engineering

=== GAME SPECIFICATION ===
Title: "Neon Ghost"
Genre: Action-Platformer
Theme: Cyberpunk 2077 inspired

=== MECHANICS ===
- Wall-sliding with spark particles
- Dash ability with cooldown (0.5s)
- Neon katana attack with trail effect

5.2 Custom Agent Configuration

{
  "agents": {
    "programmer": { "target_language": "csharp", "strict_typing": true },
    "artist": { "palette": "cyberpunk-neon", "pixel_art": true },
    "qa": { "ticks": 50000, "check_clipping": true }
  }
}

5.3 Optimasi Performa

  • Gunakan Sprite Sheet daripada single texture terpisah
  • Gunakan Object Pooling untuk proyektil dan partikel
  • Aktifkan headless testing sebelum export final

5.4 Multi-Target Export

TargetFormatUse Case
WebHTML5 + WASMBrowser playable, sharing
Windows.exe (portable)Steam, Itch.io
macOS.app (universal)App Store, Mac gaming
LinuxAppImageSteam Deck, Linux gamers
Android.apk / .aabGoogle Play
iOS.ipa (soon)App Store
ConsolesNDAPlayStation, Xbox, Switch

6. Panduan Profesional

6.1 Enterprise Architecture

Infrastruktur cloud privat, isolasi multi-tenant, dan custom LLM fine-tuning pada server lokal studio Anda.

6.4 Security & Sandbox (Firecracker microVM)

Semua kompilasi dan eksekusi headless berjalan di dalam Firecracker microVM terisolasi dengan batas ketat: 512MB RAM, 2 vCPU, serta syscall filter tanpa soket raw jaringan.

6.5 CI/CD Integration (GitHub Actions)

name: Game QA Verification
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npx @linden/cli test --ticks=10000 --headless

7. Referensi API & SDK

7.1 REST API Endpoint Summary

POST   /api/v1/projects          - Buat project baru
GET    /api/v1/projects/:id      - Ambil state project
POST   /api/v1/generate          - Trigger agen pipeline
POST   /api/v1/export            - Build executable / bundle
GET    /api/v1/status            - Health & consensus status

7.2 WebSocket Streaming

const ws = new WebSocket("wss://api.linden.ai/v1/stream?project_id=XYZ");
ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log("[" + data.agent + "]:", data.message);
};

8. Pemecahan Masalah

8.1 Masalah Umum

MasalahKemungkinan PenyebabSolusi
Error 400Request format invalidPeriksa JSON/header, gunakan curl -v untuk debug
TimeoutProject terlalu kompleksBatch prompt, gunakan async mode, atau tingkatkan tier
Token HabisOver allocationUpgrade tier atau beli token pack
Kode Tidak CompileAST ErrorPeriksa log QA Inspector, coba prompt lebih sederhana
LambatNetwork / CPUGunakan WebGPU, aktifkan cache, atau self-hosted
Asset RusakSprite malformedRegenerate dengan prompt lebih spesifik

8.3 Error Codes

CodeDeskripsiAction
400Bad RequestPeriksa syntax prompt/JSON
401UnauthorizedCek API key / login ulang
403ForbiddenPeriksa permission tier
404Not FoundProject ID tidak valid
429Rate LimitKurangi request, upgrade tier
500Internal ErrorHubungi support
503Service UnavailableCoba lagi nanti

9. FAQ

9.1 Umum

Q: Apa perbedaan Linden dengan ChatGPT + copypaste?

Linden memiliki 5 agen spesialis dalam konsensus, output deterministik, AST-level diffing, dan bisa langsung diekspor ke game engine.

Q: Berapa lama untuk generate game?

Simple platformer: 30-60 detik. Complex game: 2-5 menit. Tergantung kompleksitas dan tier.

9.2 Teknis

Q: Engine apa yang didukung?

Primary: Godot 4.3+. Preview: Unity 6. Roadmap: Unreal Engine.

Lampiran: Glossary

TermDefinisi
ASTAbstract Syntax Tree — representasi kode berbentuk tree
JITJust-In-Time compilation — kompilasi saat runtime
WASMWebAssembly — format binary untuk browser
SPIR-VStandard Portable Intermediate Representation — bytecode shader
GDScriptBahasa scripting native Godot