Repository navigation
feat(fp): punch, shove and emote on foot; people react and the city remembers - #18
Merged
Merged
Conversation
…emembers The hero can now use its body in the street (new integration feature "actions", flag on by default). Left click or the right trigger shoves whoever stands in front. Holding right click or the left trigger raises the guard: fists up, the body squared to where the camera looks and the camera arm pulled in, and the strike button then throws a jab and a cross in turn. A blow lands when the fist is furthest out on the nearest person in reach ahead, harder when running, and jolts the view. Keys 1-5 wave, nod, shake the head, shout and dance, and the people around answer. Nothing swings in a car, in photo mode or the overview, in a conversation, under a modal or with the phone open. The presses come as events (a trigger counts once per pull) and the click that captures the mouse throws nothing. People hit react (traffic/reactions.gd): a light blow makes them reel (hit_chest, hit_head) and slide back; a hard one, the third punch in a row or a fast car knocks them down (knockback), and they lie a while, get up (get_up), then shout, run off or walk back. People nearby who saw it run off or shout too. traffic/incidents.gd gives the residents involved a memory and a mood drop, calls the police after an assault and an ambulance for someone a car knocks down; the crew drives out from the nearest station (call_crew, fleets.gd) and stays a while. TrafficFeature gains walkers_near, hit_walker, answer_emote and pose_walker; GameBus gains person_hit and hero_action. The player's car strikes the people it runs into (car_body.gd, as hard as its closing speed), and they barely slow it. The chat hears of it (chat/street_lines.gd): the one who was hit and a witness say so, and a crew called to the scene posts a City Alert card. The audio feature plays the blow, the whoosh of each swing and the fall, synthesized by tools/audio/synth_fp_sfx.py (3 small WAVs). hero_rig.gd gains an action layer (upper-body one-shots with quick fades, the dance on the whole body, a guard pose) and strike_time, measured on the clip by the new hero_fk.gd, which also takes over the rig's foot-contact forward kinematics. FpPlayer gains aim_yaw and kick_view, TpsRig arm_scale. Seven UAL clips join the libraries (punch_jab, punch_cross, hit_head, hit_chest, dance, get_up, shout). fp_actions_test (new) covers the rig's action layer, the shove, the combo and its knock-down, misses, emotes and their answers, the guard, what blocks the actions, presses and held input and the car striking people; fp_chat_street_test (new) the street lines and their pacing; fp_audio_test the blow, swing and fall sounds. The pause menu legend, README, ARCHITECTURE, S0 section 9, the HC clip table and the API docs describe it. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Automated reviewNo new findings on the 59 changed files (gdlint, complexity, TODO policy, dead code). Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses "LMB/RMB do nothing" and "hitting people has no consequences". The hero can now shove, punch and emote on foot, the people hit react, and the city remembers it: moods and memories, police or an ambulance, lines in the chat, and sound. The car the player drives now strikes pedestrians too.
What you can do
What happens to the people you hit
hit_chest/hit_head) and slide back.knockback), lie a while, get up (get_up), then shout at you, run off or walk back. People nearby who saw it run off or shout too.Implementation
scripts/fp/actions/actions_feature.gd(new integration featureactions, flag on by default): swings, combo, guard, emotes. Strike and emote presses are read in_unhandled_input(ARCHITECTURE rule 7). A trigger counts once per pull because every motion event past the dead zone reads as pressed. The guard is a held action.reactions.gd(reel, fall, get up, run off or walk back, witnesses, emote answers) andincidents.gd(memories, mood, crews). New APIs:walkers_near,hit_walker,answer_emote,pose_walkerandcall_crew.fleets.gdcrews can answer a call and stay at the scene. Walkers get areactstate, andpeople.gd/people_kit.gdplay the reaction clips.car_body.gdstrikes people it closes on faster than 0.5 m/s, as hard as the closing speed over 12 m/s, and each person at most once per 1.5 s. The car loses little speed. Drive_reportleaves people toperson_hit.hero_rig.gdgets an action layer (upper-body one-shots, the dance on the whole body, a guard pose) andstrike_time, measured on the clip with the newhero_fk.gd(which now also does the foot-contact forward kinematics).FpPlayer.aim_yaw/kick_viewandTpsRig.arm_scaleare new.person_hit(at, cause, info)andhero_action(action, at).chat/street_lines.gd, plus a "street" incident icon inchat_panel_row.gd.punch_hit,punch_whooshandbody_fall, synthesized bytools/audio/synth_fp_sfx.py, and ahitemitter type.punch_jab,punch_cross,hit_head,hit_chest,dance,get_up,shout) viatools/characters/build_clips.py.ual.glbgrows from 1.0 to 1.3 MB, and the new.resclips and WAVs total about 280 KB. No file is over 5 MB.act_strike,act_aimandemote_wavethroughemote_dance. Only this block ofproject.godotis in the commit.Tests
fp_actions_test(new): the rig action layer and strike times; the shove; the jab-cross combo and its knock-down; misses (nobody ahead, behind, out of reach); emotes and their answers; the guard aim and camera; what blocks actions; presses (events, trigger edge, echo, modal, input off) and held guard; the car striking a pedestrian at 36 km/h but not at 1 km/h; teardown.fp_chat_street_test(new): victim and witness lines, pacing, severity override, crew cards.fp_audio_test: blow, swing and fall sounds.fp_core_test: feature count 16.fp_overview_test: on-foot pad lists include the triggers.Docs
README controls, pause-menu key legend,
docs/fp/ARCHITECTURE.md(new "Integration: body actions" row, plus the A, C, E, HC, I and driving rows and the input list),docs/fp/S0-foundation.md§9 (the two signals), the HC clip table, the I-audio asset table, and regenerated API docs.Validation
tools/gate.sh full: PASS (38 steps: parse, 35 unit tests, the orbit and first-person smokes).tools/gate.sh render --only fp_photo: PASS. The tour addsactions_guardandactions_guard_hud: the hero with the guard up beside someone reeling from a blow.pre-commit run --all-filesandpython tools/checks/run_all.py: PASS, no new findings.