yellowstonegames / SquidLib

Useful tools for roguelike, role-playing, strategy, and other grid-based games in Java. Feedback is welcome!
Other
448 stars 46 forks source link

SquidPnael summon() has weird bounce-back effect #180

Closed SquidPony closed 6 years ago

SquidPony commented 7 years ago

''' // fx is a third panel in a SquidLayers that was added to do visual overlay effects // x and y are the starting coordinate, and c is the character passed in to fade in float timing = rng.nextFloat() / 2; fx.summon(timing, x, y, x, y, c, SColor.TRANSPARENT, color, false, 0, 0, 0.5f); '''

causes a random delay before fading in the character as expected but after animating the character reappears for a moment

I'm wondering if this might be related to a similar problem with slide() seeming to end itself as an animation a frame or two after arriving at the destination... there may be a bug in the end of animations processing

tommyettinger commented 7 years ago

I haven't really done much with the delay code; that was something smelc needed for his game and not all of the effects may have actually been used in Dungeon Mercenary, so the delays may not work all in the same way. I was implementing a similar method for use in SparseLayers (the newer, faster, experimental, incomplete way to show only the chars that you want to and not render invisible stuff), and noticed that the delay logic seemed strange in SquidPanel's summon() and burst(). I'll have to check the specifics, but I think the summoned Actor is added before the delay is processed, which would be a bug.

tommyettinger commented 6 years ago

The ghost-char problem with SquidPanel.summon() should be fixed now, but I have yet to check the exact behavior of SquidPanel.slide(). If slide() isn't causing any problems, I'd prefer to leave it as-is; a lot of stuff could break if slide() changes its behavior in some serious way. I'll close this now; you can reopen if the slide stuff is a problem.