Skip to content

Conversation

@Arufonsu
Copy link
Contributor

@Arufonsu Arufonsu commented Dec 27, 2025

Movement System Improvements:

  • Refactors how both, NPCs and Critters randomly move around, replacing the boring single-tile-paused movement with a more natural, range-based pathing system.
  • NPCs now intelligently navigate around obstacles and other entities
  • Collision detection overhead with optimized valid direction finding
  • Prevents movement patterns from messing with current path finder's target
  • Code chore: cached status check consolidation
  • Code chore: updated naming conventions for movement variables
  • Code chore: TODOs - soft reset (walk) to spawn point and hard reset (warp) when pathfinder is unable to lead back to spawnpoint

New NPC Patrol Patterns:

  • Horizontal patrol (left/right from spawn)
  • Vertical patrol (up/down from spawn)
  • Diagonal backslash patrol (UpLeft ↔ DownRight)
  • Diagonal forwardslash patrol (UpRight ↔ DownLeft)
  • Patrolling NPCs return to their spawn/patrol point when there's no target left to smack or out of former map

Random and Patrol modes use NPC sight range as distance reference. Patrol modes track spawn position to prevent drift.

image
2026-01-17.01-04-30.mp4
2026-01-17.00-12-09.mp4
2026-01-17.00-10-38.mp4
2026-01-17.00-00-24.mp4
2026-01-17.00-18-57.mp4

@Arufonsu Arufonsu added the enhancement Minor feature addition or quality of life change label Dec 27, 2025
@Arufonsu Arufonsu force-pushed the enhancement/smoother-random-movement branch from 3a3bd29 to 5587f64 Compare December 28, 2025 00:41
@Arufonsu Arufonsu marked this pull request as draft December 29, 2025 23:13
@Arufonsu Arufonsu force-pushed the enhancement/smoother-random-movement branch 2 times, most recently from 127d7f9 to 46a13da Compare December 30, 2025 00:07
@Arufonsu Arufonsu marked this pull request as ready for review December 30, 2025 00:07
@Arufonsu Arufonsu marked this pull request as draft January 1, 2026 17:25
@Arufonsu Arufonsu force-pushed the enhancement/smoother-random-movement branch from 46a13da to 14ef75d Compare January 17, 2026 04:01
@Arufonsu Arufonsu changed the title enhancement: smoother NPC and Critter random movement logic update: NPC and Critter movement Jan 17, 2026
@Arufonsu Arufonsu added the feature request New and valid feature request label Jan 17, 2026
@Arufonsu Arufonsu marked this pull request as ready for review January 17, 2026 04:08
@Arufonsu Arufonsu requested a review from a team January 17, 2026 04:08
@Arufonsu Arufonsu force-pushed the enhancement/smoother-random-movement branch from 14ef75d to b1d4047 Compare January 21, 2026 20:49
@Arufonsu Arufonsu marked this pull request as draft January 21, 2026 21:25
Movement System Improvements:
- Refactors how both, NPCs and Critters randomly move around, replacing the boring single-tile-paused movement with a more natural, range-based pathing system.
- NPCs now intelligently navigate around obstacles and other entities
- Collision detection overhead with optimized valid direction finding
- Prevents movement patterns from messing with current path finder's target
- Code chore: cached status check consolidation
- Code chore: updated naming conventions for movement variables
- Code chore: TODOs - soft reset (walk) to spawn point and hard reset (warp) when pathfinder is unable to lead back to spawnpoint

New NPC Patrol Patterns:
- Horizontal patrol (left/right from spawn)
- Vertical patrol (up/down from spawn)
- Diagonal backslash patrol (UpLeft ↔ DownRight)
- Diagonal forwardslash patrol (UpRight ↔ DownLeft)
- Patrolling NPCs return to their spawn/patrol point when there's no target left to smack or out of former map

All patrol modes use NPC sight range as patrol distance and track spawn position to prevent drift.
@Arufonsu Arufonsu force-pushed the enhancement/smoother-random-movement branch from b1d4047 to d4c79eb Compare January 26, 2026 02:36
@Arufonsu Arufonsu marked this pull request as ready for review January 26, 2026 02:37
@Arufonsu Arufonsu added chore Cleans up code, documentation or project structure without altering functionality performance Performance optimization labels Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Cleans up code, documentation or project structure without altering functionality enhancement Minor feature addition or quality of life change feature request New and valid feature request performance Performance optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants