Skip to content

Contribution guidelines

Zakru edited this page Jun 17, 2019 · 2 revisions

Here is a some general guidelines to follow while contributing. Adding important rules is welcome, but changing existing ones isn't.

Style guide

Here is a short list of style guidelines to follow while writing code

  • require in the very beginning, if possible
  • Indentation: 2 spaces
  • If you think about some decision for a long time and decide to go one way, explain it with a comment to save others' time trying to understand your code

Where to add a feature

When you are going to add a feature, think: will the feature be only needed in the base game, or will it be part of the engine?

Reasons for a feature to be a base game feature:

  • The feature is
    • a new tile
    • a new enemy
    • any other thing you just want to see in the base game
  • The feature is very specific and cannot be generalized for multiple purposes
  • The feature would have little to no use in every game created with the engine

Reasons for a feature to be an engine feature:

  • The feature can be abstracted down into something that can have multiple purposes
  • The feature extends the engine's functionality in a unique way
  • The feature has great demand in multiple games

Git

Here are some rules regarding the usage of Git while contributing.

Commit messages

The title (first line) of the commit message should generally complete the sentence "When applied, this commit will...". The title should not end with a period and it should be limited to 50 characters. The title should , in short, explain what the commit does. If there is not enough space, the commit should probably be split into more than one to have logically separate changes in their own commits.

The body of the message should be separated with two newlines (enter) and should be wrapped at 72 characters (maximum length of a line should be 72 characters, split the paragraph onto a new line before 73). Paragraphs should also be separated with two newlines.

Clone this wiki locally