|
| 1 | +# How to Contribute |
| 2 | + |
| 3 | +Around here, things are somewhat simple. All we ask is that you follow the basic rules and have common sense. |
| 4 | + |
| 5 | +## Basic Info |
| 6 | + |
| 7 | +- When you create a pull request to be merged into `develop`, please note that the rules will be *heavily* enforced. This is NOT because we want to be mean, but rather it's to make sure that FNF:JE has a good codebase. We don't want any contributors to deal with poorly put together code! |
| 8 | +- If you're looking for how to compile the game, please take a look at [COMPILING.md](COMPILING.md)! |
| 9 | + |
| 10 | +## Issues |
| 11 | + |
| 12 | +If you wish to fix a bug, make an enhancement, or even wish to |
| 13 | +simply make a recommendation, then no worries! You can make an [issue](https://github.com/stringfromjava/Starcore/issues) |
| 14 | +or create a sub-issue and help someone with something that needs to be worked on! |
| 15 | + |
| 16 | +> [!IMPORTANT] |
| 17 | +> Make sure to set the base branch to `develop` on your pull request, or otherwise ***it will NOT be merged and accepted!!*** |
| 18 | +
|
| 19 | +## Comments & Formatting |
| 20 | + |
| 21 | +Comments are very valuable because they allow you and other |
| 22 | +programmers to easily understand what is happening in your code. |
| 23 | + |
| 24 | +However, sometimes they can be a hindrance as well. |
| 25 | + |
| 26 | +If your comments have typos, aren't clear or concise, or just |
| 27 | +hard to understand in general, then they won't be any |
| 28 | +use. Even too many comments are unnecessary, since your code should be |
| 29 | +self documented and easily readable. |
| 30 | + |
| 31 | +<u>***Formatting MUST match the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).***</u> |
| 32 | + |
| 33 | +### Example of GOOD Comments (With Good Formatting) |
| 34 | + |
| 35 | +```java |
| 36 | +/** |
| 37 | + * Plays a sound. (Duh.) |
| 38 | + * |
| 39 | + * @param path The path to play the sound from. |
| 40 | + * @return The sound instance itself, as a {@link FunkinSound}. |
| 41 | + */ |
| 42 | +public static FunkinSound playSound(String path) { |
| 43 | + FunkinSound sound = new FunkinSound(path); |
| 44 | + if (sound.ID != -1) { // libGDX will return -1 if the sound fails to play. |
| 45 | + soundPool.put(sound.ID, sound); |
| 46 | + } |
| 47 | + sound.play(); |
| 48 | + return sound; |
| 49 | +} |
| 50 | +``` |
| 51 | + |
| 52 | +### Example of BAD Comments (With Bad Formatting) |
| 53 | + |
| 54 | +```java |
| 55 | +/** |
| 56 | + * ooohhhhhef idkk plays a sound igg?????? |
| 57 | + * |
| 58 | + * @prm daPatyhh its da path to play der sound (iykyk :fire:) |
| 59 | + * @return tf you think vro :broken_heart: |
| 60 | + */ |
| 61 | +public static |
| 62 | +FunkinSound playSound (String |
| 63 | + path) |
| 64 | +{ |
| 65 | + // create da sound object duurrr |
| 66 | + FunkinSound sound = new FunkinSound(path); |
| 67 | + // six seven |
| 68 | + if |
| 69 | + (sound.ID != -1){ // i have lito have no idea what this does :wilted_flower: |
| 70 | + soundPool.put(sound.ID, sound); // puts da sound in der sound pool :3 |
| 71 | + } |
| 72 | +sound.play(); // you already know dawg. |
| 73 | + return sound; // return the sound or whatever |
| 74 | +} |
| 75 | +``` |
0 commit comments