Hooves, Corners, Mountains: Debugging Pathfinding | Rebuilding Heroes of Might & Magic [Episode 115]
Первый герой меча и магии
0:00 / 0:00
Hooves, Corners, Mountains: Debugging Pathfinding | Rebuilding Heroes of Might & Magic [Episode 115]
342 просмотра · 3 недели назад
Первый герой меча и магии
235 подписчиков
342 просмотра · 3 недели назад
In this episode of rebuilding the Heroes of Might and Magic 1 (1995) engine, I work through a cascade of rendering and pathfinding bugs — each fix revealing the next.
I start with the "hoof leakage" bug: as a hero's horse animates while walking behind a castle, the hooves poke through structures that should hide them. Working with AI, I trace it to the rendering order — the sprite's occlusion needs to follow the interpolated pixel position of the moving sprite, not the logical tile it just left. Fixing the animation then exposes a long-standing corner-cutting bug, where heroes diagonally clip through castle corners, forests, and mines they should have to walk around. I feed in real tile-map data from the original game to nail down the correct layer-one/layer-two passability rules.
From there I move on to event triggering: heroes were walking straight over mines, sawmills, and castle entrances without stopping, picking up resources before the event fired. I fix the ordering so walk-on events pause the route correctly. Finally, I loosen an overly strict rule that blocked heroes from targeting resources next to mountains, and get routing to work along the thin strip of land in front of water's-edge castles — matching real gameplay from the campaign maps.
By the end, the routing is converging on the original game's behavior — not perfect, but over 90% there.