-
Notifications
You must be signed in to change notification settings - Fork 3
Contribution guidelines
Here is a some general guidelines to follow while contributing. Adding important rules is welcome, but changing existing ones isn't.
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
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
Here are some rules regarding the usage of Git while contributing.
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.