-
Notifications
You must be signed in to change notification settings - Fork 38
/
contribute.php
98 lines (88 loc) · 9.06 KB
/
contribute.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
$breadcrumbs = array
(
'Development' => 'development.php',
'Contribution Guidelines' => 'contribute.php'
);
include('header.php');
?>
<h1>Contribution Guidelines</h1>
<p>You would like to see a feature implemented or a bug fixed in SFML? Great! Contributions to SFML are highly appreciated, be it in the form of general ideas, concrete suggestions or code patches. </p>
<p>This document explains how you can contribute. By carefully reading it, you minimize the time it takes on your and on our side until a modification is implemented. Since we can't (and don't want to) implement everything, the following guidelines clarify what it takes for a contribution to be accepted.</p>
<h2 id="general-considerations"><a class="h2-link" href="#general-considerations">General Considerations</a><a class="back-to-top" href="#top" title="Top of the page"></a></h2>
<p>In case of any questions or doubt (and after reading all the available resources), feel free to ask on the forum. Before opening GitHub issues and/or pull requests, use the forum to discuss your matter.</p>
<h3 id="scope"><a class="h3-link" href="#scope">Scope</a></h3>
<p>Contributions must fit into one of the following SFML modules:</p>
<ul>
<li>System</li>
<li>Window</li>
<li>Graphics</li>
<li>Audio</li>
<li>Network</li>
</ul>
<p>That clearly rules out anything specifically related to game development. Such <strong>counterexamples</strong> are: Physics, collision detection/response, AI, path finding, 3D abstraction layer (like the current graphics module), file system, etc.</p>
<p>There are several reasons why SFML does not support these features:</p>
<ul>
<li>The API should be focused and of high quality. Instead of implementing a lot of features that are possible and sometimes even simple to implement, we consider it important that people have a clear view of what this library provides.</li>
<li>For most of the listed points, there are existing libraries that have been developed over years and provide everything you need.</li>
<li>Resources are limited. The time we would invest into other features can be used to improve and extend the existing multimedia library.</li>
<li>How these features could be provided is controversial. Many of them are very specific and concrete implementations are often limited to a few use cases.</li>
<li>Many features can be added as an extension. SFML works as an abstraction of low-level and platform-specific functionality to provide a portable API. Higher-level features do not have this requirement.</li>
</ul>
<p>The rule of thumb is: If a feature can easily be added on top of SFML without modifying the core library, it is probably not a good candidate to be integrated.</p>
<h3 id="code-style"><a class="h3-link" href="#code-style">Code Style</a></h3>
<p>Contributions in the form of code must follow our <a href="style.php" title="Go to the style guide"><strong>syntactical conventions</strong></a>. Before submitting a pull request, please make sure your commits really adhere to them. For design and semantics (e.g. "do I use a pointer or a reference", "what is the correct type here"), have a look at existing SFML source code.</p>
<h3 id="philosophy"><a class="h3-link" href="#philosophy">Philosophy</a></h3>
<p>SFML has been developed under the following considerations, keep them in mind when contributing:</p>
<ul>
<li><strong>Simple.</strong> Features are easy to use. Even more complex functionality should be provided in the most simple way possible, using abstraction where necessary.</li>
<li><strong>Slim API.</strong> Minimal APIs are preferred to bloated collections of functionality that try to fit everyone's needs. Especially when introducing new functionality, it is often a good idea to start with a small set of classes and functions. It can still be extended later.</li>
<li><strong>Fast.</strong> Performance-critical tasks are implemented efficiently. Readability and correctness take precedence though, and premature optimization is to be avoided.</li>
<li><strong>Clean code.</strong> Source code is well-structured, modular, readable and uses modern C++ idioms. Avoid clever hacks or micro-optimizations.</li>
<li><strong>Pragmatic.</strong> SFML does not attempt to solve every possible problem, instead it tries to offer functionality that is useful to a wide variety of users.</li>
</ul>
<h2 id="contributing"><a class="h2-link" href="#contributing">Contributing</a><a class="back-to-top" href="#top" title="Top of the page"></a></h2>
<h3 id="reporting-bugs"><a class="h3-link" href="#reporting-bugs">Reporting bugs</a></h3>
<ol>
<li>Make sure it is really a bug and not a misunderstanding of what SFML is supposed to do. Check the <a href="documentation/latest/">documentation</a> again to be sure.</li>
<li>Make sure the bug has not already been reported. Check <a href="https://github.com/SFML/SFML/issues?q=">the GitHub issues</a> and <a href="http://en.sfml-dev.org/forums/index.php?action=search">the forum</a>.</li>
<li>Use the <a href="https://github.com/SFML/SFML">latest revision</a> from GitHub and check if the bug has not already been fixed. Refer to the <a href="tutorials/latest/compile-with-cmake.php">official tutorial</a> for information on how to build SFML yourself.</li>
<li>Open a new thread on the <a href="http://en.sfml-dev.org/forums/">forum</a> in the appropriate help board and give the following information:
<ul>
<li><a href="http://en.sfml-dev.org/forums/index.php?topic=5559.msg36368#msg36368">A minimal and complete code example</a> that reproduces the bug as you are experiencing it.</li>
<li>Instructions for reproducing the bug if it isn't obvious when running the example.</li>
<li>Environment information (operating system, SFML version, compiler etc.).</li>
<li>Screenshots and/or videos, if necessary, to demonstrate certain behavior.</li>
<li>Anything else that helps identify the problem.</li>
</ul>
</li>
</ol>
<h3 id="requesting-features"><a class="h3-link" href="#requesting-features">Requesting features</a></h3>
<p>If you have an idea for a new feature, and it's within SFML's scope (see above), create a proper thread on <a href="http://en.sfml-dev.org/forums/index.php?board=2.0">the dedicated sub-forum</a>.</p>
<p>A feature request should always contain a rationale for the change. Whenever you suggest a feature, argue from a user perspective: in which way is SFML limited? What use cases does the feature allow? How can other users benefit from the change?</p>
<h3 id="testing"><a class="h3-link" href="#testing">Testing</a></h3>
<p>Testing is a crucial part of integrating new changes – the larger the number of people who help us, the faster we can proceed with development, and the quicker we can find and eliminate bugs.</p>
<p>Feel free to participate in forum discussions, GitHub issues or existing pull requests. You can also try out the latest changes in the master Git branch and report any issues that you might find back to us on the forum.</p>
<h3 id="patches-pr"><a class="h3-link" href="#patches-pr">Sending patches/pull requests</a></h3>
<p>In general code is only accepted when a proper GitHub issue already exists (usually preceded by a forum discussion). Make sure that nobody else is already working on an issue, or simply offer help and wait for a response.</p>
<p>Patches are accepted through GitHub pull requests. These are the steps required to send in such a request:</p>
<ol>
<li><a href="https://github.com/SFML/SFML/fork">Fork SFML</a>.</li>
<li>Commit your changes and push them to your forked repository.</li>
<li>Create a <a href="https://help.github.com/articles/creating-a-pull-request">pull request</a> that targets the <em>master</em> branch.</li>
</ol>
<p>In the pull request, provide the following information:</p>
<ul>
<li>Descriptive title.</li>
<li>Concise description of the modification.</li>
<li>Reference the GitHub issue that you implemented/fixed.</li>
<li>Link to the forum thread where the discussion originated.</li>
<li><a href="http://en.sfml-dev.org/forums/index.php?topic=5559.msg36368#msg36368">A minimal complete code example</a> that helps people to test the implementation. The idea is that anybody can test the functionality with minimal effort. If external files are needed, add a link to them.</li>
<li>Bugfix: the code should reproduce the bug.</li>
<li>Feature: show how the feature is used.</li>
</ul>
<p>For smaller issues, a single commit should be attached to the pull request. If you implement a larger modification, you may split the commits, but please do so semantically ("implemented feature X, fixed bug Y") and not chronologically ("started X, continued Y, finished Z"). Keep in mind that in addition to adding new commits, you can also overwrite existing ones by force-pushing (<code>git push --force-with-lease</code>) to your repository branch.</p>
<p>We may ask you to elaborate and improve certain parts of your code, sometimes we also edit it directly. We consider it important that you are listed as a contributor in the SFML commit history, so make sure that you choose credentials (author name and e-mail address) that you want to be published.</p>
<?php
require("footer.php");
?>