1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00
lovr/CONTRIBUTING.md

56 lines
2.2 KiB
Markdown
Raw Normal View History

2017-08-28 01:12:53 +00:00
Contributing
===
You want to contribute to LÖVR? That's awesome!
Submitting Issues
---
2017-08-28 01:19:49 +00:00
Feel free to file an issue if you notice a bug. Make sure you search before filing an issue, as it
may have already been asked.
2017-08-28 01:12:53 +00:00
Issues are okay for feature requests and questions about the development of LÖVR as well, but
2017-08-28 01:18:55 +00:00
usually you'll get a better response by asking in
[Slack](https://join.slack.com/ifyouwannabemylovr/shared_invite/MTc5ODk2MjE0NDM3LTE0OTQxMTIyMDEtMzdhOGVlODFhYg).
2019-12-16 01:04:02 +00:00
Questions about how to use LÖVR should go in Slack.
2017-08-28 01:12:53 +00:00
2019-12-16 01:04:02 +00:00
Editing Documentation
2017-08-28 01:12:53 +00:00
---
2019-12-16 01:04:02 +00:00
If you notice any typos or inconsistencies in the docs, speak up! You can mention it in Slack, or
if you're feeling brave you can submit a pull request in the [lovr-docs repo](https://github.com/bjornbytes/lovr-docs).
2017-08-28 01:12:53 +00:00
Contributing Code
---
2019-12-16 01:04:02 +00:00
To contribute patches to the C code, you can fork LÖVR, commit to a branch, and submit a pull
request. Note that contributions to the repository will be released under the terms in the LICENSE.
For larger changes, it is a good idea to engage in initial discussion via issues or Slack before
submitting. Try to stick to the existing coding style:
2017-08-28 01:12:53 +00:00
- 2 space indentation.
- 100 character wrapping (ish, sometimes it's more readable to just have a long line).
2019-12-16 01:04:02 +00:00
- Use descriptive, camelCased variable names when possible.
2017-08-28 01:12:53 +00:00
If you modify the embedded `boot.lua` script, you can compile it into a C header by doing this:
```sh
2019-12-16 01:04:02 +00:00
xxd -i src/resources/boot.lua > src/resources/boot.lua.h
2017-08-28 01:12:53 +00:00
```
2017-08-28 01:18:55 +00:00
Organization
---
An overview of the folder structure:
- `deps` contains submodules for external dependencies. Some smaller dependencies are also included
in the `src/lib` folder.
- `src/api` contains Lua bindings. There's a file for each module and a file for each object.
- `src/core` contains shared engine code. It's usually lower-level and not specific to LÖVR.
- `src/lib` contains smaller third party libraries.
- `src/modules` has a folder for each module in the project. It's good to keep them separated as
much as possible, there's inevitably some overlap.
- `src/resources` contains embedded files. These are compiled to binary headers using `xxd`.
2019-03-13 16:43:32 +00:00
2019-12-16 01:04:02 +00:00
Branches other than master can be force-pushed during development to organize commit history.