-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.0.6dev #31
Merged
Merged
0.0.6dev #31
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
acab7a3
new way to handle window and events
durkisneer1 9a036d4
More control over animations
durkisneer1 973708a
contributing and installing doc update
durkisneer1 f60b960
window close handled for the user
durkisneer1 22ff852
working on errors for controller input
durkisneer1 37ccd32
controller compatibility
durkisneer1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / Csslint (reported by Codacy)
Element (dl.simple) is overqualified, just use .simple without element name. Note documentation