Перейти к содержимому

Catapults & Broken Arrows: Sprite decoding bugs | Rebuilding Heroes of Might & Magic 1 [Episode 107]

Первый герой меча и магии

0:00 / 0:00

Catapults & Broken Arrows: Sprite decoding bugs | Rebuilding Heroes of Might & Magic 1 [Episode 107]

349 просмотров · 1 месяц назад
Первый герой меча и магии
231 подписчик
349 просмотров · 1 месяц назад
In this episode of rebuilding the Heroes of Might and Magic 1 engine from scratch, I work through a batch of battle-screen fixes that had been nagging at me. I start by reworking the auto-battle system: pulling the "instant win" cheat off the auto button and binding it to F12 for the human player only, then repurposing the auto button to actually hand combat over to AI logic, complete with optional spellcasting you can toggle off. From there I chase down a morale bug where the game announced and animated the wrong creature on a "good morale" bonus turn, traced back to a flag that wasn't being cleared at the right moment. The bulk of the session is about making ranged and wide-creature combat look right. I fix the dragon, phoenix, and cyclops attacking forward into empty space instead of mirroring to strike creatures behind them, correct the odd-row mirroring math, and re-center the wide sprites so a flipped dragon keeps its tail in the right hex. Then comes the big one: arrows refusing to fly flat across the same row. After a lot of back-and-forth, the real culprit turns out to be my sprite decoder throwing out the flat arrow frame because it was under 20 pixels tall and got mistaken for a shadow. Once that missing sprite is restored, the angle math works, and a final mirroring fix gets arrows facing the correct direction for shooters on the right. I also smooth out the catapult so the boulder launches seamlessly instead of pausing mid-animation.