Skip to content

Improve platforming feel, add player health/respawn, enemy chase AI, rooms 2–4, and HUD rebuild#5

Merged
LloydNicholson merged 2 commits into
copilot/rewrite-project-in-godotfrom
copilot/improve-platforming-and-ai
Mar 21, 2026
Merged

Improve platforming feel, add player health/respawn, enemy chase AI, rooms 2–4, and HUD rebuild#5
LloydNicholson merged 2 commits into
copilot/rewrite-project-in-godotfrom
copilot/improve-platforming-and-ai

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 21, 2026

Adds coyote time, jump buffering, wall-jump improvements, a full player health/iframes/knockback/death-respawn cycle, enemy patrol→chase AI with stomp kills, three new rooms wired into the room chain, and a rebuilt HUD with health, level name, and respawn overlay.

Platforming (Player.gd)

  • floor_snap_length = 6.0 — step-up collision fix
  • Coyote time (0.12 s) and jump buffering (0.12 s pre-press queued for next landing)
  • Wall-jump lock (0.25 s) prevents immediate re-stick; plays "jump" animation instantly
  • Air acceleration raised 25% → 40% of ground accel

Player health system (Player.gd, GameState.gd)

  • GameState gains health_changed(current, max), player_died, player_respawned signals; player_stamina now has an emitting setter
  • take_damage(amount, knockback_dir) — applies knockback velocity, starts 1.2 s iframes (blinking sprite)
  • instant_kill() — bypasses iframes; used by death pits
  • stomp_bounce() — upward reward for stomping enemies
  • DEAD state: 2 s pulsing-red death animation → respawn at spawn position with full HP and iframes

Enemy AI (Enemy.gd, Enemy.tscn)

  • Exports: chase_speed, detect_range, max_health
  • Switches patrol → chase when player enters detect_range
  • Stomp detection: player falling (velocity.y > 50) from above → enemy.take_damage(1) + player.stomp_bounce(); otherwise deals player.take_damage(1, dir)
  • health label above each enemy, updated on hit

DeathArea (DeathArea.gd)

  • Calls player.instant_kill() instead of hard-reloading the scene directly

HUD (HUD.gd, HUD.tscn)

  • Level name label (get_parent().name)
  • Health row: filled/empty hearts — "♥".repeat(hp) + "♡".repeat(max - hp)
  • Full-screen respawn overlay (ColorRect + label), shown on player_died, hidden on player_respawned

New rooms + wiring

Room Difficulty notes Loop
Room2 3 enemies (one 2 HP), moving platforms Room1 → Room2 → Room3
Room3 4 enemies (two 2 HP), wall-jump gaps Room2 → Room3 → Room4
Room4 Gauntlet: 4 enemies (three 2 HP + one 3 HP) Room4 → Room0

Room1 gains a right-side RoomWarpForward completing the full loop.

Original prompt

Pull request: #3

Improve platforming: fixed collision stepping, added coyote time + jump buffering, tuned air acceleration, and update wall-jump behavior/animations.
Add player health, invincibility frames, knockback, and a death/respawn animation loop; introduce enemy patrol/chase AI with health and indicators.
Add new rooms (rm_2–rm_4) plus warp wiring, and rebuild HUD elements (health/timer/diamonds/level name/respawn overlay).


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…nd HUD

Co-authored-by: LloydNicholson <34131158+LloydNicholson@users.noreply.github.com>
Agent-Logs-Url: https://github.com/LloydNicholson/sluggers/sessions/1c3d6d65-a1df-4278-883d-64b69a95b255
Copilot AI changed the title [WIP] Enhance platforming mechanics and introduce player/enemy features Improve platforming feel, add player health/respawn, enemy chase AI, rooms 2–4, and HUD rebuild Mar 21, 2026
Copilot AI requested a review from LloydNicholson March 21, 2026 13:27
@LloydNicholson LloydNicholson marked this pull request as ready for review March 21, 2026 13:29
@LloydNicholson LloydNicholson merged commit 17c58c6 into copilot/rewrite-project-in-godot Mar 21, 2026
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.

2 participants