add README (#3)
This commit is contained in:
73
README.md
Normal file
73
README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# The Tower
|
||||
|
||||
## Learning Resources
|
||||
|
||||
- [Godot Docs](https://docs.godotengine.org/en/stable/index.html)
|
||||
- [GDQuest](https://www.gdquest.com/)
|
||||
|
||||
## Branch Standards
|
||||
|
||||
Name branches as `<you>/<topic>`
|
||||
|
||||
Don't push to `main`
|
||||
|
||||
Create pull requests to merge in code
|
||||
|
||||
## Code Standards
|
||||
|
||||
Prefer `const` instead of `var` if possible
|
||||
|
||||
- `const` means that the variable cannot change value, while `var` means change value
|
||||
- This preference helps to keep code easier to understand and debug
|
||||
|
||||
Use `snake_case` for variable and function names
|
||||
|
||||
```gdscript
|
||||
var joe_mama := 10
|
||||
|
||||
func is_joe_mama(id: int) -> bool:
|
||||
if id == 10:
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
```
|
||||
|
||||
Use `PascalCase` for class names
|
||||
|
||||
```gdscript
|
||||
class_name PlayerController
|
||||
|
||||
class EnemyProjectile
|
||||
```
|
||||
|
||||
Ensure you are using types for your variables
|
||||
|
||||
Good:
|
||||
|
||||
```gdscript
|
||||
var x: int = 10
|
||||
var y := "Test" # := is the same as saying "y equals "Test" and is of type String"
|
||||
func add(a: int, b: int) -> int
|
||||
```
|
||||
|
||||
Bad:
|
||||
|
||||
```gdscript
|
||||
var x = 10
|
||||
var y = "Test"
|
||||
func add(a, b)
|
||||
```
|
||||
|
||||
Ensure your variables and functions have descriptive names
|
||||
|
||||
Good:
|
||||
|
||||
```gdscript
|
||||
const PLAYER_SPEED: float = 300.0 # px/sec
|
||||
```
|
||||
|
||||
Bad:
|
||||
|
||||
```gdscript
|
||||
const S: 300.0
|
||||
```
|
||||
Reference in New Issue
Block a user