devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Flamewave not damaging every other tile

Open neube3 opened this issue 1 year ago • 2 comments

As per discussion from Discord, there is a way to fix the flamewave bug that was agreed upon.

The problem itself can be illustrated with these gifs and pictures (found at https://www.realmsbeyond.net/diablo/stratcddfilez.html and other pages there - it's a real treasure trove!).

(Don't mind the cast-through-wall bug, I've been assured that's fixed already, but it helps to illustrate the problem)

As you can see, monsters that are standing horizontally away for 1, 3, 5 tiles to both sides of the wizard are not affected.

This is because of the grid. The yellow arrow shows a safe route through a lightning wall/firewall/flamewave.

As you can see below, it's not about changing the sprites' size - the sprites themselves are over a tile wide and it looks ok visually, it's the damage that's missing. Note the flames partially obscuring skeletons - since the flame wave already moved past them, you'd expect them to be fried, since they were visually covered in flames. This is not so - and that's the bug.

Imagine the following image as having a flame wave cast straight down on the screen. Yellow squares will be first, then blue squares will be the next ones that will actually be occupied by flame sprites.

AJenbo Decided that the best way would be to just include the damage for the tiles marked in green with circles - that is, the tiles between tiles that are occupied by flamewave now and will be in the next step.

The timing is supposed to be right on the mid-point between when the sprites are occupying the yellow and blue tiles - then, the green tiles' (with circles) damage should be applied.

neube3 avatar Jun 08 '23 15:06 neube3

Related to https://github.com/diasurgical/devilutionX/issues/6190 - the same issue regarding firewall/lighting wall. The implementation will most likely need to be different, so I have separated them for tidyness'/order's sake.

neube3 avatar Jun 08 '23 15:06 neube3

bonus points for solving it with a single implementation

AJenbo avatar Jun 08 '23 17:06 AJenbo