Files
prosperon/website/content/start/_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

109 lines
1.9 KiB
Markdown

---
title: "Get Started"
---
## Installation
Grab the Prosperon executable for your platform and drop it in a project folder. Prosperon is a single binary — no installer required.
## Create a Project
Initialize the module system:
```
./cell init
```
This creates `.cell/` with the module shop, bytecode cache, and configuration.
## Your First Module
Create `hello.cm` — a module that returns a frozen API:
```javascript
return {
greet: function(name) {
return `Hello, ${name}!`
}
}
```
## Your First Program
Create `hello.ce` — a program that uses the module:
```javascript
var hello = use('hello')
log.console(hello.greet('Prosperon'))
$delay(_ => $stop(), 0.1)
```
Run it:
```
./cell hello
```
## A Simple Game
Create `config.cm` for window settings:
```javascript
return {
title: "My Game",
width: 1280,
height: 720
}
```
Create `main.ce` as your entry point:
```javascript
var core = use('prosperon/core')
var sprite = use('sprite')
var input = use('input')
// Create a sprite
var player = sprite({
image: "player.png",
pos: {x: 100, y: 100},
width: 32,
height: 32
})
core.start({
width: 1280,
height: 720,
title: "My Game",
update: function(dt) {
// Game logic here
},
render: function() {
// The compositor handles rendering registered sprites
}
})
```
## Example Games
Prosperon ships with several examples:
- **Pong** — classic two-player pong
- **Snake** — snake game with growing tail
- **Tetris** — falling block puzzle
- **Chess** — full chess with move validation
- **Bunnymark** — sprite rendering benchmark
Run any example:
```
./cell examples/pong
```
## Next Steps
- [Read the manual](/docs/) for the full API reference
- [Rendering guide](/docs/rendering/) to understand the compositor
- [Input guide](/docs/input/) for multi-device input handling
- [Join the forum](https://discourse.prosperon.dev) to connect with other developers