Login
Contributing guide
Login

1. Bugs reporting

Bugs and game crashes are not the only problems, but typos too. If you find any bugs in the game, please report it at options available at contact page.

1.1 Some general hints about reporting bugs
1.2 Example of bug report:

Title: “Game crashed when entering a base”

Body:

  1. Dock to the base
  2. Open the base actions menu
  3. Select option “Trade” from the menu with arrows keys
  4. Press enter
  5. Game crashed.

2. Features proposition

At this moment, please, don't give any propositions about new game features or mechanics. I have my own long To-do list, and your propositions may be duplicates or go against my ideas. Of course, if you really want it, you can always start discussion about a new feature, just I'm afraid, it may take a long time to implement it into the game.

If you want to talk/propose changes to any existing features/mechanics in the game, feel free to contact me via options available at contact page. A general rule about propositions is same as for bugs reports - please, try to write as much information as possible. This help us better understand the purpose of your changes.

List of things which I wish to add to the game, can be found here Please read carefully the description on how to discuss or how they will be implemented in the game.


3. Code propositions

3.1 General information

If you want to start helping in the development of the game, please consider starting with something easy like fixing bugs. Before you begin to add new feature to the game, please contact with me via options available at contact page. Same as with features proposition - your code may “collide” with my work and at this moment you may just lose time by working on it. So it is better that we first discuss your proposition. In any other case, fell free to fix and or improve my code.

3.2 Coding standard

The full description of coding style used by the project, you can find on the Coding Standard page. On the page Testing the Project you will find information how to test your code, so it will be compliant with the project standards.

3.3 Code submission

A preferred way to submit your code is to use tickets on the project page. Please attach to that ticket file with diff changes, the best if done with command fossil patch. But another diff program will work too. In that situation, please add information which program used to create the diff file. If you prefer, you can also use other options from contact page.


4. Additional debugging options

4.1 Code analysis

To enable check for gcov (code coverage) and gprof (code profiling) compile the game with mode analyze (in the main project directory, where steamsky.gpr file is):

gprbuild -XMode=analyze

More information about code coverage and profiling, you can find in the proper documentation for both programs.

4.2 Generating reports

After running the game in analyze mode, you can generate reports by using command:

gprof bin/steamsky gmon.out for generate report for the code profiling

4.3 Generating unit tests

To generate (or regenerate) unit tests, use command gnattest which generate skeletons code for tests units (in the main project directory, where steamsky.gpr file is):

gnattest -P steamsky.gpr

Tests generated only for these subprograms which have explicitly declared tests cases in declarations. Thus, if here are no tests cases declared in the game code, there will be no unit tests generated.

4.4 Build unit tests

Navigate to tests/driver directory from the main directory (where this file is):

4.5 Running unit tests

First, you must build all tests. How to do it, is described in main README.md file. Then, in console, in the main project directory, type: others/tests.sh [amount]

The [amount] is how many times the tests should be run. It is recommended to run them few times in a row to catch all problems. Tests will stop if there will be any issue. At this moment, unit tests are available only on Linux.

More information about GnatTest (how to create unit test, etc.) you can find here.