Files
the-tower/README.md

90 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2026-02-12 11:09:40 -06:00
# 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
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
```
Keep single code line length up to 80 characters long. (Notice the first vertical line
in the text editor.)
This keeps code easier to read because it isn't stretching all the way across the screen.
Good:
```gdscript
@onready var head_collision_shape: CollisionShape3D \
= $HeadCollider/HeadCollisionShape
```
Bad:
```gdscript
@onready var head_collision_shape: CollisionShape3D = $HeadCollider/HeadCollisionShape
```
Notice the `\` in the above "good" example. That tells Godot to continue the expression
on the next line.