24a312dd75b1d70efd2972514432398156a78b1b
The Tower
Learning Resources
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
constmeans that the variable cannot change value, whilevarmeans change value- This preference helps to keep code easier to understand and debug
Use snake_case for variable and function names
var joe_mama := 10
func is_joe_mama(id: int) -> bool:
if id == 10:
return true
else:
return false
Use PascalCase for class names
class_name PlayerController
class EnemyProjectile
Ensure you are using types for your variables
Good:
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:
var x = 10
var y = "Test"
func add(a, b)
Ensure your variables and functions have descriptive names
Good:
const PLAYER_SPEED: float = 300.0 # px/sec
Bad:
const S: 300.0
Description
Languages
GDScript
100%