-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
User does event polling instead of an internal vector Documentation visual quality improvement with category dropdowns Animation struct for more control over how animations are rendered getTicks now works Documentation for contributing has been created Kraken handles window closing and controller connected/disconnected events Basically the input namespace got scattered requirements.txt for necessary pip packages to contribute
- Loading branch information
1 parent
6e0286a
commit 1ccc733
Showing
48 changed files
with
928 additions
and
802 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Coding Guidelines | ||
================= | ||
|
||
This document outlines the coding guidelines for Kraken Engine. | ||
These guidelines are intended to ensure that Kraken stays in its best shape and documentation is consistent and easy to read. | ||
|
||
General Principles | ||
------------------ | ||
|
||
- **Consistency**: Follow the style of the surrounding code. This is elaborated in the next section. | ||
- **Clarity**: Write code that's easy to read and understand. This means using descriptive names for variables, functions, and classes. | ||
- **Documentation**: Write clear, concise, and useful comments. | ||
- **Testing**: Write tests for your code (you may ask an experienced contributor to assist you). | ||
- **Error Handling**: Check for errors and handle them appropriately. | ||
|
||
|
||
Style Guidelines | ||
---------------- | ||
|
||
Kraken Engine uses a consistent code style defined by the ``.clang-format`` file in the root directory. Additionally, the ``.pre-commit-config.yaml`` file automatically runs clang-format on staged files before committing, ensuring proper formatting. | ||
|
||
However, the formatter doesn't catch everything. Please follow these additional guidelines: | ||
|
||
- **Naming Conventions**: | ||
- Classes, Structs, and Enums: ``PascalCase`` | ||
- Functions and Variables: ``camelCase`` | ||
- Constants: ``ALL_CAPS`` | ||
- Header Files: ``PascalCase.hpp`` | ||
- Source Files: ``snake_case.cpp`` | ||
- **Header Includes**: Only include headers that are strictly necessary in a given file. Avoid including general-purpose headers (e.g., ``<iostream>``) in header files unless they are directly needed there. Instead, include them in source files where applicable. This practice reduces unnecessary dependencies and improves compile times. | ||
- **Comments**: Focus comments on the *why* behind your code, not the *what*. Clear and descriptive function and variable names should make the code's intent self-explanatory. | ||
|
||
Documentation Guidelines | ||
------------------------ | ||
|
||
Kraken Engine uses **Sphinx** and **Doxygen** for generating documentation. | ||
Follow these guidelines to maintain consistency and clarity: | ||
|
||
Writing Docstrings | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
When writing docstrings, adhere to the **Doxygen** format. Here's an example: | ||
|
||
.. code-block:: cpp | ||
/** | ||
* @brief Adds two numbers. | ||
* | ||
* @param a The left-hand side operand. | ||
* @param b The right-hand side operand. | ||
* | ||
* @return The sum of a and b. | ||
*/ | ||
int addNums(int a, int b); | ||
For more details on Doxygen formatting, refer to the `official Doxygen documentation <https://www.doxygen.nl/manual/docblocks.html>`_. | ||
|
||
Writing Documentation | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Use **reStructuredText (RST)** format for creating and editing documentation files. | ||
|
||
- If you add a new class, function, or namespace to the codebase, create a corresponding ``.rst`` file in the appropriate directory under ``docs/``. | ||
- Include the following details in the ``.rst`` file: | ||
- A clear description of the class, function, or namespace. | ||
- Example usage code (if applicable). | ||
- Doxygen's generated documentation. | ||
|
||
For guidance on RST syntax, check the `official Sphinx documentation <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_. | ||
You can also review existing ``.rst`` files in the repository as examples. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,71 @@ | ||
How To Contribute | ||
================= | ||
|
||
This page is currently under construction. Please check back later for updates. | ||
Welcome! | ||
Your contributions help make Kraken Engine better for everyone, | ||
whether it's fixing a bug, adding a feature, or improving the documentation. | ||
|
||
.. image:: ../_static/under_construction.gif | ||
:alt: Page Under Construction | ||
Prerequisites | ||
------------- | ||
|
||
Before you begin, ensure you have: | ||
|
||
- A GitHub account | ||
- Git installed locally | ||
- A C/C++ compiler (e.g., GCC, Clang, MSVC) | ||
- Python 3.9 or later | ||
- Doxygen | ||
- Familiarity with our :doc:`guidelines` | ||
|
||
Setting Up | ||
---------- | ||
|
||
The Kraken Engine repository uses a `dev` branch (e.g., ``0.0.6dev``) for upcoming releases. | ||
Base your work on this branch. | ||
|
||
1. Fork and clone the current `dev` branch. | ||
2. Run ``pip install -r requirements.txt`` to install dependencies. | ||
|
||
Compiling | ||
--------- | ||
|
||
To control which of the following targets you want to build, change the options in ``meson_options.txt``. | ||
For example, both ``build_example`` and ``build_tests`` set to ``false`` builds only the library. | ||
Then, run either of the following commands: | ||
|
||
Library Only | ||
~~~~~~~~~~~~ | ||
|
||
.. code-block:: bash | ||
meson setup build | ||
meson compile kraken -C build | ||
Library + Example Demo | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: bash | ||
meson setup build | ||
meson compile krakenapp -C build | ||
Library + Test Suite | ||
~~~~~~~~~~~~~~~~~~~~ | ||
|
||
.. code-block:: bash | ||
meson setup build | ||
meson compile krakentests -C build | ||
Making Changes | ||
-------------- | ||
|
||
*Before making changes to Kraken, please read the* :doc:`guidelines`. | ||
|
||
1. Commit and push your changes to your fork. | ||
2. Submit a pull request to the `dev` branch of the Kraken Engine repository. | ||
3. Address any feedback from maintainers. | ||
4. Once approved, your changes will be merged, and you will be credited in the changelog. | ||
|
||
Thank you for contributing to Kraken Engine! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Testing Your Contributions | ||
========================== | ||
|
||
Before submitting a pull request, you should run tests and preview the documentation to ensure that your changes are correct. | ||
|
||
Testing Code | ||
---------------- | ||
|
||
If you haven't already, read through building the *test suite* in the :doc:`how_to_contribute` section. | ||
|
||
Tests are written using the Google Test framework and can be found in the ``tests`` directory. | ||
After making changes or adding new features, run the test suite to ensure that your changes do not break existing or new functionality. | ||
|
||
Previewing Documentation | ||
------------------------ | ||
|
||
1. Install the required dependencies via pip: | ||
|
||
.. code-block:: bash | ||
pip install -r docs/requirements.txt | ||
2. Generate the documentation with Doxygen: | ||
|
||
.. code-block:: bash | ||
cd docs | ||
doxygen | ||
1. Build the documentation: | ||
|
||
.. code-block:: bash | ||
make -C docs html | ||
You will find the generated documentation in the ``docs/_build/html`` directory. | ||
If everything looks as intended, you can submit your pull request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.