New Hugo site in website/ with prosperon.dev theme (blue/gold/castle aesthetic), docs sidebar navigation, and content pages. Rewrote all doc files to align with the actual codebase: compositor+film2d rendering, use() modules (no global prosperon object), Pit language, script+JSON entity model. Added entities.md, front matter to all 70+ API docs, and updated API index for current module architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
48 lines
2.1 KiB
Markdown
48 lines
2.1 KiB
Markdown
---
|
|
title: "About Prosperon"
|
|
type: docs
|
|
---
|
|
|
|
# Prosperon
|
|
|
|
Prosperon is a 2D game programming environment built on [Pit](https://crumbpit.org), an actor-based language designed for safe, sandboxed scripting.
|
|
|
|
Games are written as small, focused modules in Pit — a simplified JavaScript with actor primitives. Prosperon handles rendering, input, audio, and asset management. No class hierarchies, no giant scene trees.
|
|
|
|
## Design Goals
|
|
|
|
- **Minimal API surface.** A handful of modules cover sprites, input, sound, and composition. Each does one thing.
|
|
- **Data-driven rendering.** You create sprites and set properties. The compositor handles batching, sorting, and GPU submission.
|
|
- **Composition over inheritance.** Entity behavior comes from modules, not class trees. An entity type is a script that returns a prototype object.
|
|
- **AI-friendly.** Many small files with simple dependencies. An LLM can read a module, understand it, and modify it.
|
|
- **Text-first.** Assets are referenced as string paths. Levels are JSON. Everything diffs cleanly in source control.
|
|
|
|
## Architecture
|
|
|
|
Prosperon is not a monolithic engine with a global state object. It is a collection of modules:
|
|
|
|
| Module | Purpose |
|
|
|--------|---------|
|
|
| `core` | Main loop, window, GPU init |
|
|
| `sprite` | Create and manage sprites |
|
|
| `compositor` | Build render plans from scene configs |
|
|
| `input` | Action mapping, device routing |
|
|
| `sound` | Audio playback |
|
|
| `world` | Entity management |
|
|
| `camera` | Viewport into the world |
|
|
| `text2d` | Text rendering |
|
|
| `shape2d` | SDF shapes |
|
|
| `tilemap2d` | Grid-based tile rendering |
|
|
| `tween` | Value interpolation |
|
|
| `resources` | Asset path resolution |
|
|
|
|
Import what you need with `use()`. If you don't use a module, it doesn't load.
|
|
|
|
## The Language
|
|
|
|
Pit is an actor-based language. Programs (`.ce` files) are actors that run top-to-bottom, can register message handlers, and spawn child actors. Modules (`.cm` files) return frozen values and are cached.
|
|
|
|
Actor primitives: `$start`, `$receiver`, `send`, `$delay`, `$clock`, `$stop`.
|
|
|
|
See [Quickstart](../quickstart/) for a hands-on introduction.
|