First off, thank you for considering contributing to Inglorious Forge! It's people like you that make open source great. We welcome contributions from the community! Whether you're fixing a bug, adding a feature, or improving the documentation, your help is appreciated.
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.
If you find a bug, please check the issues on GitHub to see if it has already been reported. If not, please open a new issue. Be sure to include a clear title, a detailed description of the problem, and steps to reproduce it if possible.
If you have an idea for a new feature or an improvement to an existing one, feel free to open an issue to discuss it. This allows us to coordinate our efforts and prevent duplication of work.
We love pull requests! If you're ready to contribute code, here's how to do it:
- Fork the repository and create your branch from
main. - Make your changes and add tests for any new functionality.
- Ensure the test suite passes (
pnpm test). - Make sure your code lints. The project uses ESLint for linting and Prettier for formatting.
- Issue that pull request!
- Fork and clone the repository.
- Install dependencies using pnpm:
pnpm install
- Run the Storybook documentation locally:
This will start the Storybook server, which is the primary development environment for the engine's components and documentation.
pnpm --filter @inglorious/docs storybook
- Run the linter to check for code style issues:
pnpm lint
- Run the unit tests to ensure everything is working as expected:
pnpm test
A note on code style, particularly regarding "magic numbers" for vector components. Instead of creating a constant for each vector index:
const X = 0
const Y = 1
const Z = 2
const x = entity.position[X]
const y = entity.position[Y]
const z = entity.position[Z]We find it cleaner to use array destructuring, like so:
const [x, y, z] = entity.positionThere are a few exceptions: in the /docs folder we prefer the first version because not everyone is used to destructuring and we wanted to make the examples as readable as possible for people coming from, say, Godot. In that case we would put the X, Y, and Z constants on top of the file, right below the imports, so that they can be used throughout the whole game file.