Files
prosperon/docs/index.md
John Alanbrook 83b798e365 Add Hugo website and rewrite docs to match current engine
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>
2026-02-23 18:09:55 -06:00

2.8 KiB

title, type
title type
Prosperon Manual docs

Prosperon

Prosperon is a 2D game programming environment built on Pit, an actor-based language designed for safe, sandboxed scripting.

You write game logic in Pit — a simplified JavaScript with actor primitives — and Prosperon handles rendering, input, audio, and asset management. Games are composed from small, focused modules. No class hierarchies, no giant scene trees.

How It Works

A Prosperon game is a collection of modules (.cm) and programs (.ce).

  • Modules return a frozen value — an API, a config, a data table. Import them with use().
  • Programs are actor entry points. They run top-to-bottom, register message handlers, and spawn children.

The engine provides modules for everything a 2D game needs:

Module Purpose
sprite Create and register sprites
draw2d High-level factories for sprites, text, shapes, tilemaps
camera Create cameras with transform and projection
input Multi-device action mapping with control stacks
sound Audio playback with PCM caching and voice mixing
tween Fire-and-forget animation with easing
world Entity management and lifecycle
resources Asset discovery and path resolution
core Main loop, window, frame scheduling

You create sprites, poke their positions, and the engine handles everything else — batching, sorting, effects, presentation scaling. Like programming sprites on a GBA, but with modern hardware behind it.

Design Principles

Minimal code. The fewer lines it takes to do something, the fewer bugs it has, the faster it runs, and the less you need to keep in your head.

Duck typing. If an object looks like a sprite — has a position, an image, a layer — it works as a sprite. No base classes to inherit from.

Text-based. Every file in a Prosperon project is text. Scripts, configs, levels. Git diffs are readable, merges are clean.

Modules, not globals. Everything is accessed via use(). No global engine object. The world, camera, input — all imported as modules.

Data-driven rendering. Your game logic never touches the GPU. You declare drawables and their properties. The rendering pipeline sorts, batches, applies effects, and draws.

Guides

  • Quickstart — Run your first program
  • Tutorial — Build a game step by step
  • Entities — The world and entity model
  • Rendering — Sprites, cameras, and the rendering pipeline
  • Graphics — Textures, images, and coordinate systems
  • Input — Action mapping, devices, and control stacks
  • Resources — Asset loading and discovery

API Reference