Devlog - A Pathfinding and Enemy Spawn Issue (17th September 2024)
Enemy Spawning and Pathfinding Issues:
Today, I worked on spawning enemies using the free version of the A* Pathfinding Project. There are currently issues with spawned enemies not properly connecting to a path or reaching the player target. I reached out to my unit coordinator for help, mentioning the following details and attaching screenshots for context:
- Image 1: Shows four enemy objects placed directly in the scene, following paths correctly towards the player target, though there is a strange animation glitch.
- Image 2: This image includes both manually placed and spawned enemy objects. While the manually placed enemies follow a path, the spawned objects are following paths to unknown points rather than the player.
- Image 3: Confirms that the manually placed enemies follow the correct path from the furthest point in the scene toward the player target, showing the intended behavior for the pathfinding system.
The issue likely involves the spawned enemies not updating their paths correctly to follow the player target, and I plan to further troubleshoot or await feedback from my unit coordinator.
Enemy Ghost Color Change and Health Adjustment:
In addition to the pathfinding work, I implemented a feature where the enemy ghosts blink and turn red after being alive for a set period of time (10 seconds). Upon turning red, their health increases, making them harder to defeat. This was achieved by creating a separate health system, and when the ghosts turn red, their health increases from the initial value of 2 to 4.
- A coroutine handles the blinking effect, alternating the ghost's color between red and white for a few seconds before locking the color to red.
- The arrow collision system was adjusted to account for the increased health after the ghost turns red. Each arrow strike reduces the ghost's health, and when the health reaches zero, the ghost is destroyed.
- The ghost's health is now publicly accessible in the
EnemyHealth
script to provide feedback on remaining health in the console.
Debugging and Improvements:
- Encountered an issue where the arrow collision stopped working due to missing health access. This was resolved by exposing the
health
field in theEnemyHealth
script. - Ensured that after two strikes when the ghost is in its normal state, and four strikes when in its red state, the ghost is successfully destroyed.
- The setup now works smoothly, allowing for future tweaks in the ghost's behavior and difficulty progression based on health and color states.
Gauntlet Legacy Reborn
Status | In development |
Author | stealthmode61 |
Genre | Adventure |
Tags | Dungeon Crawler, Pixel Art, Retro, Singleplayer, Top-Down |
More posts
- Documentation & User Guide50 days ago
- Week 12—User Interface / Polish54 days ago
- Presentation and Graphics61 days ago
- Devlog – Checkpoint 3: Enemies / Interaction / Puzzles68 days ago
- Pause Game Menu71 days ago
- Basic Level Blocking75 days ago
- Character Selection & Prefab Assignment76 days ago
- Gameplay Refinements and Core System Enhancements78 days ago
- Devlog Update - Enhancing Gameplay with Raycasting and Strategic Item Usage80 days ago
- Devlog Update: Scoring Enhancements and Enemy Behaviour81 days ago
Leave a comment
Log in with itch.io to leave a comment.