Make player.gd easier to read for newer programmers
No behaviour change (the 1180-frame scripted trace is identical before and after, and all headless tests pass). - Overview at the top: what the slime can do, how a frame runs, and a glossary (y points down, delta, normal, tangent, dot product, raycast). - Big section headers; every setting has a plain-English comment. - No backslash line continuations or dense one-line if/elses: long conditions are split into named bools (climbedPastWallTop, holdingDown, standingStill, hitHeadOn, ...), one-line ifs are full blocks. - Explicit checks instead of truthiness (== 0.0, .is_empty(), == null). - The maths is explained: the hop speed formula (now _get_hop_speed), exponential smoothing, arc length, the wall-hop arc. - Clearer names: pos -> currentPosition, line -> justInsideSurface, step -> distanceThisFrame, along -> inputAlongSurface, offset -> fromCorner, wrapTravelled -> wrapDistanceTravelled, and the wrap angle parameters -> arcStartAngle/arcEndAngle. - Letting go of walls and ceilings split out of the movement steps into _update_wall_letting_go and _update_ceiling_letting_go. - Keeps the "FX resources" grouping of the sound/particle nodes and landSounds from the working copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6622544acb
commit
804a7a76c9
1 changed files with 632 additions and 305 deletions
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue