Skip to content
dhirenmalik edited this page Oct 7, 2026 · 6 revisions

Player — Team 5

Introduction

Team 5 develops the player’s movement, grapple, combat, health and sprite-animation systems. This overview connects the wiki’s existing player pages; it does not replace their detailed documentation.

Reviewed Implementation Status

Sprint 3 develops the player’s combat, movement, grappling and animation systems through PR #196, PR #211 and PR #229.

Area Implementation
Movement Walking, sprinting, dash, ledge dropping, single-impulse jumping and ground detection that supports standing on enemies
Grapple Charged firing, trajectory preview, slack rope, wrapping during flight, corner climbing and respawn cleanup
Combat Inventory-selected bow attacks and facing-based melee with wall obstruction and one hit per enemy per swing
Animation Takeoff, falling and landing states; instrument animation and audio; rope-aligned hanging pose
Reliability Expanded regression coverage, creation-order-independent arrow collision filtering and player/combat maintainability improvements

Controls

Input Action
A/D or Left/Right Move horizontally; pump the swing while attached
Shift Sprint; attempt a dash on press
Space Jump from the ground or release the grapple with an upward boost
W/S while attached Climb or descend the rope
S Request a drop through a one-way ledge
Left click Melee attack in the player’s facing direction
E Use the selected item; fire a selected combat arrow immediately
Hold/release right click with a combat arrow Charge and fire the bow
Hold/release right click with a rope arrow Charge and fire the grapple
Q Draw and play the instrument

Grapple attachment persists after right click is released. Another action or pausing puts the instrument away. Item selection remains the inventory system’s responsibility.

Architecture

PlayerFactory assembles the player’s components. Input produces requests, gameplay components determine whether to accept them, and presentation components display the resulting state.

Component Responsibility Integration boundary
KeyboardPlayerInputComponent Translate controls into action requests Does not apply damage or movement physics
PlayerActions Movement, jumping, dash and airborne state Reads physics state and emits movement-state events
ItemUseComponent Route selected items and coordinate ammunition use Connects inventory to weapons, grappling and consumables
WeaponComponent / BowComponent Coordinate the primary weapon and implement bow behaviour Delegate projectile construction to ProjectileFactory
MeleeComponent Accept swings, identify targets and apply damage Reads facing from PlayerActions; publishes swing and hit events
GrappleComponent Manage charging, attachment, rope paths and climbing Connects projectile contact to player physics
PlayerAnimationController Select animation states Responds to gameplay events rather than determining damage

Extensions should preserve these boundaries. For example, melee presentation follows an accepted swing rather than a raw click, because a request can be rejected during cooldown.

flowchart TD
    Factory["PlayerFactory"] --> Input["Keyboard input"]
    Factory --> Actions["PlayerActions / physics"]
    Factory --> Combat["Item use / weapons / projectiles"]
    Factory --> Grapple["Grapple components"]
    Factory --> Health["CombatStatsComponent"]
    Factory --> Visuals["Animation and HUD components"]
Loading

Subsystem Documentation

The older Player Movement and Grappling page records the previous implementation. Use Player Grappling for the Sprint 3 behaviour.

Player System Lifecycle

  1. The factory attaches the player components and configured combat stats.
  2. Input routes movement, attack, item-use and grapple requests to their components.
  3. Physics/projectiles resolve movement and contact; combat stats publish accepted damage and health changes.
  4. Animation/HUD listeners update presentation; player death completes through the animation-to-loss event flow.

Subsystem-specific timing and tuning values are documented on the linked feature pages.

Testing

PR #196 expanded regression coverage across input, movement, combat, projectiles, grappling, animation, player assembly and rendering. Verification at 41b257f passed 731 project tests and formatCheck.

PR #211 reports 941 passing tests, while #229 reports 950 passing tests alongside manual gameplay checks. These totals describe separate tested revisions and must not be added together or presented as a test result for their final integration.

Run from source using Java 21:

./gradlew test
./gradlew formatCheck

Subsystem pages describe focused checks. Automated rendering tests verify state and drawing behaviour; manual checks establish visual alignment, animation timing and gameplay feel.

Known Limitations

Automated checks do not establish every visual or gameplay combination. See Animations and Player Grappling for presentation and terrain constraints. Historical PR #145 reports predate the Sprint 3 changes and should not be treated as verification of the current implementation.

Relevant Development Links

PR Work Status at review
#57 Combined movement, grapple and ranged attack Merged
#67 Player sprites/animations Merged
#69 Health/i-frames/death Merged
#126 Projectile/grapple/weapon updates Merged
#131 Test fixes Merged
#134 Animation update Merged
#145 Combined advanced mechanics and fixes Merged
#84 Earlier alternative ranged/animation branch Open; not the reference implementation here

The original ranged PR #46 was superseded by #57. Player Features #7 and subsystem issues track plans; source and merged PRs establish implementation status.

PR Work
#196 Regression coverage, collision fixes, maintainability and Sonar coverage reporting
#211 Charged grapple, rope physics, flight wrapping and corner climbing
#229 Movement, melee and animation overhaul

Contribution Attribution

The team comprises Dhiren Malik (deerainn), Darcy Franklin (DarcyMF), Rohan Shirkhedkar (Rohanator2314), Tristan Sheedy (TristanUniCoding), Josiah Enns (Jjmenns) and Aryan Bhatia (AryanBhatia006).

  • Dhiren: initial ranged projectiles/abstraction, player-system integration, ammunition fix, Mockito combat regressions, latest-main conflict integration and 19 movement/ledge regression tests.
  • Darcy: movement/grapple/swing, projectile improvements, weapon-coordinator refactor, melee logic and related tests.
  • Rohan: player health/i-frames/death integration, camera/SOLID-layer integration, and the new rope wrapping/persistence/climbing commits.
  • Tristan: player sprites, locomotion/death animations, charged bow, damping restoration and submission integration.
  • Josiah: hurt/earlier bow animation work, later melee/dash/air-dash assets and animation-anchor integration.

Credits follow verified history rather than assigning every change to the PR submitter. Inventory, HUD, terrain and enemy death integrations include other teams’ work and retain their authorship.

Dhiren Malik (deerainn) expanded regression coverage, corrected arrow collision-filter initialisation order, added the grapple contact guard, addressed maintainability findings and corrected Sonar coverage-report generation.

Darcy Franklin (DarcyMF) developed charged grappling, trajectory preview, slack-rope behaviour and associated tests. Rohan Shirkhedkar (Rohanator2314) contributed arrow alignment, flight-rope tracking, bend preservation, corner climbing and bow-charge animation fixes.

Tristan Sheedy (TristanUniCoding) and Josiah Enns (Jjmenns) contributed the movement, animation, melee and presentation overhaul. Earlier subsystem authorship and cross-team contributions remain credited in the individual feature pages.

Clone this wiki locally