Bird morph and refined Jazz/Lori copter behavior (#2)#141
Conversation
new sugar rush animation for frog,
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds two bird player morphs (Bird, BirdYellow) with flight/charging movement, new animations and sounds, HUD icons, checkpoint/morph integration, and related player state, physics, animation, and audio handling across game systems. ChangesBird Morph Gameplay System
sequenceDiagram
participant Player as Player
participant Movement as MovementSystem
participant Animation as AnimationSystem
participant Audio as AudioSystem
participant Checkpoint as Checkpoint/Save
Player->>Movement: Update (bird morph)
activate Movement
Movement->>Movement: Check ground below for bird
Movement->>Movement: Normalize input / compute flight velocity
alt BirdYellow charging
Movement->>Movement: Apply charge gating & lerp to charge target
else normal flight
Movement->>Movement: Lerp to directional target
end
Movement->>Player: Return updated position/rotation
deactivate Movement
Player->>Animation: UpdateAnimation (select composites/idle)
activate Animation
alt descending + firing
Animation->>Animation: Select shoot composite / spawn angled shot
else in-flight idle/walk
Animation->>Animation: Select flight idle/walk
end
Animation->>Player: Animation finished
deactivate Animation
Player->>Audio: OnAnimationFinished
alt ground absent and appropriate state
Audio->>Audio: Start bird fly SFX
else stopped/grounded
Audio->>Audio: Stop/clear bird fly SFX
end
Player->>Checkpoint: Save/Load
activate Checkpoint
alt saving
Checkpoint->>Checkpoint: Apply morph-specific Y offset
else loading
Checkpoint->>Player: Nudge bird upward until clear
end
deactivate Checkpoint
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Content/Metadata/Interactive/PlayerBirdYellow.res`:
- Around line 51-54: The trailing comma after the "States" array in the "Shoot"
object causes JSON parse errors; remove the comma following the closing bracket
of the "States" property so the object becomes valid JSON (locate the "Shoot"
object and its "States" property in PlayerBirdYellow.res and delete the trailing
comma after the ]).
In `@Sources/Jazz2/Actors/Player.cpp`:
- Around line 2972-2975: The bird fly sound (_birdFlySound) is stopped only in
OnPerishInner() causing the sound loop to outlive the actor if the Player is
destroyed via other paths; ensure the destructor (~Player()) also stops and
clears _birdFlySound (call stop() and set to nullptr) and mirror this teardown
in any other non-death cleanup paths to prevent the loop from persisting beyond
the Player object's lifetime.
In `@Sources/Jazz2/PlayerType.h`:
- Around line 38-47: GetNextCheatMorphType currently implements the wrong cycle
order; update its switch mapping so the cheat morph sequence matches the PR
contract: Jazz -> Spaz -> Lori -> BirdYellow -> Frog -> Bird -> Jazz.
Concretely, keep PlayerType::Jazz -> Spaz and Spaz -> Lori, change
PlayerType::Lori to return PlayerType::BirdYellow, change PlayerType::BirdYellow
to return PlayerType::Frog, change PlayerType::Frog to return PlayerType::Bird,
and change PlayerType::Bird to return PlayerType::Jazz so the full cycle is
correct.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7cc5f267-9bf8-4543-9a31-4d912ec2c29b
📒 Files selected for processing (11)
Content/Metadata/Interactive/PlayerBird.resContent/Metadata/Interactive/PlayerBirdYellow.resContent/Metadata/Interactive/PlayerFrog.resContent/Metadata/UI/HUD.resSources/Jazz2/Actors/Player.cppSources/Jazz2/Actors/Player.hSources/Jazz2/Actors/PlayerCorpse.cppSources/Jazz2/Actors/Solid/PowerUpMorphMonitor.cppSources/Jazz2/LevelHandler.cppSources/Jazz2/PlayerType.hSources/Jazz2/UI/HUD.cpp
|
Your changes in Yellow bird attack is still wrong - in the original, you need to have certain speed to trigger it, and the attack will boost the speed. Also in your implementation, when I'm flying and rapidly pressing attack, it's somehow glitching. And bird speed seems to be slower than in the original. Also it seems to me that there is wrong sound effect when shooting with red bird. |
This PR add Bird and BirdYellow as playable characters with flying, new animations, sounds, and a BirdYellow charge attack; new HUD icons.
The cheat "jjmorph" now can change the character in this order: Jazz->Spaz->Lori->BirdYellow->Frog->Bird.
BirdYellow has "charge" as attack. It does not harm, it only increase speed ("charge_ver" animation). The Charge animation is possible only if BirdYellow is moving.
Bird can fly and shoot. It shoots 2 bullet at time. Bird can use all the weapons available to the other characters.
Both Bird can fly in every direction, they slowly fall if jump button or "up" button is pressed.
This PR also reworked second-jump handling for Jazz/Lori using a buffered trigger approach, with an adjusted timing so copter does not visually overlap too early with jump frames.
This PR also add some missing animation for frog.
Summary by CodeRabbit
New Features
Bug Fixes