Skip to content

Commit e6a0bbc

Browse files
added a contributing.md file
1 parent ce2511f commit e6a0bbc

File tree

3 files changed

+115
-1
lines changed

3 files changed

+115
-1
lines changed

CONTRIBUTING.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# How to Contribute
2+
3+
Since Starcore isn't that big of a game yet, things are somewhat simple.
4+
All we ask is that you follow the basic rules and have common sense.
5+
6+
When you write code, heres some simple things we ask of you:
7+
8+
## Issues
9+
10+
If you wish to fix a bug, make an enhancement, or even wish to
11+
simply make a recommendation, then no worries! You can make an [issue](https://github.com/korithekoder/Starcore/issues)
12+
or create a sub-issue and help someone with an issue that needs to be worked on!
13+
14+
## Comments & Formatting
15+
16+
Comments are very valuable because they allow you and other
17+
programmers to easily understand what is happening in your code.
18+
19+
However, sometimes they can be a hindrance as well.
20+
21+
If your comments have typos, aren't clear or concise, or just
22+
hard to understand in general, then they won't be any
23+
use. Even too many comments can make it difficult to understand your code.
24+
25+
### Example of GOOD Comments (With Good Formatting)
26+
27+
```haxe
28+
/**
29+
* Get's the last key that was pressed on the current frame.
30+
*
31+
* @return The last key that was pressed. If no keys were pressed, then
32+
* `FlxKey.NONE` is returned instead.
33+
*/
34+
public static function getLastKeyPressed():FlxKey
35+
{
36+
for (key in 8...303) // Loop through all keys in FlxKey
37+
{
38+
try
39+
{
40+
if (FlxG.keys.anyJustPressed([key]))
41+
{
42+
return key;
43+
}
44+
}
45+
catch (e:Exception)
46+
{
47+
// Skip and move on if it is not a valid key
48+
}
49+
}
50+
return FlxKey.NONE;
51+
}
52+
```
53+
54+
### Example of BAD Comments (With Bad Formatting)
55+
56+
```haxe
57+
58+
/**
59+
* gets the last key or whatever that was pressed
60+
* return the last thing pressed lolz
61+
*/
62+
public
63+
static
64+
function getLastpressed():FlxKey
65+
{
66+
// loop thouhg all keys (8-303)
67+
for (key in 8...303) // loop through all keys
68+
{
69+
// try to check if its pressed :p
70+
try{
71+
// check if its pressed
72+
if (FlxG.keys.anyJustPressed([key]))
73+
{
74+
// return the pressed key
75+
return key;
76+
}
77+
}
78+
// catch the exception
79+
catch (e:Exception) {
80+
// just skip with non valid key xd
81+
}
82+
}
83+
// return nnoe if no kyes are pressed
84+
return FlxKey.NONE;
85+
}
86+
```
87+
88+
> [!TIP]
89+
> You can format a file on VS Code with `SHIFT` + `ALT` + `F` to match the code style standards, although just know that it won't fix typos or correct your grammar, thats all on you!
90+
91+
## Things You CANNOT Do
92+
93+
Excluding *collaborators*, there are some files that contributors simply cannot change or delete.
94+
95+
1. You are not allowed to change these files:
96+
- Any files in the [setup folder](setup/).
97+
- Any files in the [unused folder](unused/), that's for the collaborators!
98+
- `.gitattributes`
99+
- `.gitignore`
100+
- `.prettier.js`
101+
- `checkstyle.json`
102+
- `COMPILING.md`
103+
- `CONTRIBUTING.md`
104+
- `hxformat.json`
105+
- `LICENSE.md`
106+
- `project.hxp`
107+
- `README.md`

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ When one *does* come out, ***WAY*** more info will be put in here and it
66
will be released on [itch.io](https://itch.io) under my name (`@korithekoder`), so
77
when it does release, be sure to take a look!
88

9+
# Contributing
10+
11+
If you would like to contribute to the game, then you can very gladly do so!
12+
We appreciate every contribution made by the people who would like to help make this game
13+
come to life. <3
14+
15+
For more info, please read the [contributing](CONTRIBUTING.md) file for more info.
16+
917
# Development
1018

1119
When developing the game, it is ***strongly*** advised that you play in debug mode; that

project.hxp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ class Project extends HXProject
208208
this.window.orientation = (isDesktop() || isMobile()) ? Orientation.LANDSCAPE : Orientation.AUTO;
209209
this.window.hardware = true;
210210
this.window.vsync = false;
211-
// this.window.defaultFont = 'assets/fonts/Born2bSportyFS.ttf';
212211
this.window.allowHighDPI = true; // Force / allow high DPI
213212
}
214213

0 commit comments

Comments
 (0)