You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fire entities spawned by the throw effect spawn, and hence are rendered, before the animation completes. This is because we process the entity spawn buffer before entering the AnimationPlaying game state:
This is a bit more involved to fix than may be evident. We use a distinct game state when running animations, so we want to delay clearing the buffer until completing our work in this state. We currently don't always enter this state at the end of a {Player|Hazard|Monster} turn, so simply deferring clearing the buffer until the end of animation states doesn't quite work. (It may be possible to simply always transition to the animation state and let it be a no-op if the buffer is empty.
Chained Animations
Notably missing is the nice explosion animations when we throw a fire potion, and notably missing from the fire potion animation is throwing the potion itself. Kinda lame.
We need a notion of chained animations here, some algebra allowing us to concatenate animation requests. We'd like to be able to express the throw animation as something like:
Throwing a rod of fire currently looks like this:
There are two issues we'd like to fix here.
Animation and Entity Spawning Order
The fire entities spawned by the throw effect spawn, and hence are rendered, before the animation completes. This is because we process the entity spawn buffer before entering the
AnimationPlaying
game state:This is a bit more involved to fix than may be evident. We use a distinct game state when running animations, so we want to delay clearing the buffer until completing our work in this state. We currently don't always enter this state at the end of a {Player|Hazard|Monster} turn, so simply deferring clearing the buffer until the end of animation states doesn't quite work. (It may be possible to simply always transition to the animation state and let it be a no-op if the buffer is empty.
Chained Animations
Notably missing is the nice explosion animations when we throw a fire potion, and notably missing from the fire potion animation is throwing the potion itself. Kinda lame.
We need a notion of chained animations here, some algebra allowing us to concatenate animation requests. We'd like to be able to express the throw animation as something like:
This is a bit tricky because we don't know the length of the animation at the time of making the request.
The text was updated successfully, but these errors were encountered: