Contributing
AGENTS.md at the top of the repository is the full guide for changing the engine, for people and for agents. This page is the short version.
Ground rules
- Tests come first. A feature is not done until it has unit tests and the test scene uses it.
- Permissive licences only: MIT, zlib, BSD, Apache 2.0, public domain.
- No shortcut that leaves a known bug behind. If something is deliberately simple, say so in a comment and name the limit.
- Review the diff before every commit.
Tests
Test names are full sentences that state the behaviour: "A click picks the nearest mesh under it".
When a render test fails, open the image it wrote to build/Tests/RenderOutput and compare it with the reference. Never update a reference without looking at it.
Code style
- PascalCase for types, functions and file names. camelCase for locals and parameters.
- Member variables are
m_plus PascalCase. Statics ares_plus PascalCase. - Tabs. Braces on their own line.
- Everything lives in the
Cairnnamespace. - Comments say why, or state a rule the caller must follow. They do not narrate the code.
Generated pages
Two pages of this site are generated from the code:
- the scripting API reference, from the Lua bindings
- the command reference, from the command processor
After changing a binding or a command, run:
A unit test fails while either is out of date, so they cannot drift from the code.
Adding things
This site
The site is Rspress, in Docs/.