> For the complete documentation index, see [llms.txt](https://pearl-docs.disco.zone/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pearl-docs.disco.zone/master.md).

# Pearl

Pearl is a small framework for creating video games in the browser using [TypeScript](https://www.typescriptlang.org/). It's made to have a simple API that's easy to extend.

Unlike lots of fancier frameworks, games in Pearl are created mainly in *code*, rather than in a special editor. Rather than trying to be the level editor/sprite editor/visual scripting flowchart of your dreams, Pearl leaves the tooling used to create assets entirely up to you.

Pearl is made up of a small API for creating and rendering entities using *components*. If you're familiar with the [Component pattern](http://gameprogrammingpatterns.com/component.html), or have used an engine like Unity or Unreal Engine, you've seen this before. If not, never fear, as it's easy to pick up.

In addition to allowing you to define your own components, Pearl includes built-in components for handling positioning, collision detection, sprite rendering, and other basic utilities.

To get started with Pearl, begin with the [Tutorial](/tutorial.md), which provides a small boilerplate to get started with, and a simple game to make.

## Credits & Inspiration

Pearl started life as a fork of Mary Rose Cook's [Coquette](https://github.com/maryrosecook/coquette), a wonderful microframework for simple JS games. In addition to using code from Coquette, Pearl uses ideas from frameworks including Unity, Godot, and Superpowers.

Pearl relies on the [SAT.js](https://github.com/jriecken/sat-js) library for collisions, in addition to several other supporting Node modules.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pearl-docs.disco.zone/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
