Skip to content

fix(fp): the camera stays above the road, boats keep off bridges, left click punches - #21

Merged
KunalSiyag merged 1 commit into
mainfrom
fp/street-fixes
Oct 22, 2026
Merged

KunalSiyag merged 1 commit into
mainfrom
fp/street-fixes

Conversation

@KunalSiyag

Copy link
Copy Markdown
Owner

Summary

Three of the reported street bugs: the camera could go below the roads, ships sailed on the roads over the water, and left click did a "hands up" shove instead of a punch.

What changes in the game

  • Camera under the road: looking up from low down behind the car (mouse pushed all the way) no longer drops the chase camera under the road; it stays 0.25 m above the ground, or the water off the land. Photo mode's free flight stops 0.20 m above the ground instead of flying through the street.
  • Boats on the road: boats keep to open water and never sail through a bridge. A boat heading for a bridge built after it set out turns back where it is. Boats float with their waterline at the water surface (they rode 2 cm high).
  • Punch on left click: left click throws a jab and a cross in turn, with no need to hold the guard first; your character turns to whoever stands in front (else to where the camera looks). R shoves. Holding right click raises the guard, the fighting stance (fists up, the camera in closer). The pause menu's key list says so.

Implementation

  • scripts/fp/drive/drive_feature.gd: camera_xform lifts the chase eye to CAM_RADIUS above _ground_below(eye) (the collision ground, WATER_Y where there is none).
  • scripts/fp/player/player.gd: _photo_fly clamps the flight to TpsRig.GROUND_CLEAR above the ground (WATER_Y off the land).
  • scripts/world/city_life.gd: _open_water(i) (water with no road on it) builds the boats' water tiles and neighbours; _update_boats turns a boat back (from and to swapped, t mirrored) when the tile ahead is a bridge; boats ride at WS.WATER_Y ± BOB (their model origin is the waterline).
  • scripts/fp/actions/actions_feature.gd: strike(what := "punch") takes "punch" (the combo) or "shove", a queued press keeps which; every swing faces its target, else the camera's yaw. New input act_shove (R) in INPUTS. project.godot gains only the act_shove block.
  • scripts/fp/ui/pause_menu.gd: Click Punch, Right-click Guard, R Shove.

Tests

  • fp_boats_test (new, 9 checks): a grown city with a river and bridges; 300 s of boats never on a bridge, at the water surface, still moving; a boat headed into a bridge turns back where it is and gets no closer.
  • fp_actions_test: the punch without the guard, the combo, the shove on R through strike("shove"), the R binding.
  • fp_drive_test: _check_camera (above the car, and looking up from low down it stays above the road).
  • fp_player_test: photo flight down stops 0.20 m above the ground.

Docs

README (player controls, city life), docs/fp/ARCHITECTURE.md (inputs, A, E, driving and body actions rows), docs/fp/slices/A-player.md (photo mode spec and test), the actions flag description in data/feature_flags.json, regenerated API docs.

Validation

  • GRIDFALL_OFFLINE=1 GATE_RETRIES=1 tools/gate.sh full: PASS (42 steps: import, parse, 38 unit tests, the orbit and first-person smokes), no retries.

  • After the gate only the actions flag description changed; tools/gate.sh quick --only fp_ops_test (it checks every flag has a description) passed again.

  • pre-commit run --all-files and python tools/checks/run_all.py: PASS, no new findings.

…t click punches

The chase camera could drop under the road: looking up from low down behind
the car (the orbit pitch pushed all the way) lowered the eye with nothing to
hold it above the ground. It now stays CAM_RADIUS above the ground under it,
the water surface off the land and beside a bridge deck. Photo mode's free
flight had no floor at all, so flying down went straight through the street;
it now stops TpsRig.GROUND_CLEAR above the ground, like the third-person
camera.

Boats sailed through bridges and so seemed to sail on the road: CityLife
treated every water tile as open water, bridge tiles included. Boats now keep
to open water (water with no road on it), turn back where a bridge stands
ahead of them (one built after they set out), and float with their waterline
at the water surface instead of 2 cm above it.

Left click used to shove whoever stood in front, the arms-out push that read
as hands up, unless the guard was held. It now throws the jab and cross combo
straight away, the body turning to whoever the swing goes for or else to where
the camera looks. The shove moves to R (the act_shove input), and the guard on
right click is the fighting stance (fists up, camera in closer). The pause
menu's key list, the README, the architecture notes, the player slice and the
actions flag description follow.

Tests: fp_actions_test throws the combo without the guard, shoves on R and
checks the bindings; fp_drive_test looks up from low down behind the car and
stays above the road; fp_player_test flies down in photo mode and stops at the
ground; the new fp_boats_test sails a grown city's boats past its bridges for
300 s and checks they never cross one, float at the surface, keep moving and
turn back at a bridge ahead.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Automated review

No new findings on the 18 changed files (gdlint, complexity, TODO policy, dead code).

Run python3 tools/checks/run_all.py locally for the full set of checks.

@KunalSiyag
KunalSiyag merged commit 556990d into main Oct 22, 2026
8 checks passed
@KunalSiyag
KunalSiyag deleted the fp/street-fixes branch October 22, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant