Smoother movement feel, plus landing/wrap sounds and splat particles #4
Loading…
Reference in a new issue
No description provided.
Delete branch "movement-feel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this does
Makes the existing movement feel smoother. No new abilities.
Movement
GROUND_ACCEL,GROUND_FRICTION). Turning around brakes first, then accelerates.AIR_ACCEL), and extra speed aboveAIR_SPEEDfades slowly (AIR_DRAG) instead of snapping from 150 to 75.MAX_FALL_SPEED = 400.floor_snap_lengthmatches.Holding at edges
MAX_SECS_TO_UNSTICK(0.5s). Before, only ceilings had a hold (the lip), so walking off a floor sideways or crawling off the bottom of a wall dropped instantly.TileMapLayermade of separate shapes, and the edge ray could hit the inside face of a neighbouring tile.)Edge sensor range
edgeSensorRangehalved from 24 to 12: pressing into a surface only wraps around its edge when the slime is touching the edge (center within 12px, about a 1px gap), instead of up to 13px away. Walking up to an edge still always works, since the hold stops you there.EdgeSensorspivot, soexclude_parentdidn't cover the player). With a range equal to the slime's radius (10), edge wraps never triggered.On screen
physics/common/physics_interpolation), so movement looks smooth on monitors above 60Hz.rendering/2d/snap/snap_2d_transforms_to_pixel) to stop the 32px sprite shimmering at fractional positions._physics_process, so interpolation smooths it too, and it now uses1 - exp(-k * delta), so it turns at the same rate at any frame rate.(0, -6)offset rotates with the sprite, so its bottom lines up with the collider on every surface. No change needed.Sounds and particles
MIN_LAND_SPEED. Walking along a surface doesn't trigger it.landSoundsarray on the Player, so you can swap them in the Inspector.Assets/Sounds/CREDITS.txt. The particles are plain pixels, so no art was needed.Testing
Headless in Godot 4.7.2 with a script that builds platforms, spawns the player and simulates input. 39/39 pass:
test_level.tscnloads and runs.test_level.tscn: walking the floor both ways, up to the raised block and the side walls, and climbing ~120px up the tall right wall (across several tile seams) and back down cause no holds; walking off the top of the raised block holds at its edge and then drops.Note: when quitting a headless run, Godot 4.7.2 reports a "leaked" audio playback for any
AudioStreamPlayerthat has played and is still in the scene. I reproduced this with a bare player and a single sound, so it's an engine quirk at exit, not a project problem.Still needs a playtest. Headless tests can't judge feel or how it sounds.
🤖 Generated with Claude Code