Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Hi,

Been doing some quick testing of the sprite animation, and everything works fine except for one thing. I instructed the program to only play the animation once, but it played 3 times. (I've put all the files concerned in a zip file if you are interested). Test file Note: the artwork isn't mine, it belongs to a web illustrator called Grickle -- I just animated one of his characters.

NOTE: I looked at how other engines deal with spritesheet animation. Here is an interesting approach in RenJS:
https://renjs.net/docs-page.html
(Search for CGs)

So one spritesheet could contain several animations. It would also be useful to be able to play them backwards as well as forwards!

(Please tell me if I should dial back the feedback -- don't want to overwhelm you...!)

Hi Goliard, first of all, thank you so much for these tests and your feedback; it's truly invaluable.

I've identified the bug. The `stop` ("Once action") method resets the animation using the trick `animation='none'` on every line of dialogue where the character speaks. Three lines of dialogue = three restarts = animation played three times. The fix: use an `animationend` event to mark the element as `ss-done` after the first playback, and then don't trigger it again.

In short, i fixed it in the upcoming version 2.0, but in the meantime, I recommend using only one line of dialogue when using an animation with the `stop` function. 

Version 2.0 will almost triple the number of lines of code (which is already substantial at over 12,000 lines), so it will take at least one or two months to be released. This is where we're really getting into the most complex functions to code. Since it's a monolithic codebase and any change can create a snowball effect and new bugs, every addition now requires thorough testing.

I'll keep you updated on the progress!

Regarding RenJS's approach to sprite sheets, which was quite innovative when it was released, I must admit I find it uninteresting. It complicates an animation principle that has already proven itself, even within tools like RPG Maker.

I understand the principle, certainly, but either we stick with classic sprite sheet animation or we use Inochi2D or Live2D; we don't create a slightly improved sprite sheet that can ultimately be recreated with more frames.

But playing them backwards as well as forwards is a good idea, i take note about this one !

Thanks for the quick reply! Version 2.0 sets out an incredible roadmap -- I'm not surprised it's going to take some time. Meanwhile, there's a lot to learn about the current release!

Hi! First of all: Please, NEVER dial back the feedback! Honestly, this is pure gold for me. Getting this kind of detailed, real-world testing feedback is exactly how Capsule is going to grow into something incredible. I am not overwhelmed at all; quite the opposite, it’s highly motivating!

Here is a breakdown of your points and how they connect to what's cooking for the engine:

1. The "Plays 3 Times" Bug

  • Thank you for flagging this and providing the test file (Grickle's art style is awesome, by the way!). This is a known execution/reflow quirk in version 1.9's CSS handling. The good news is that the upcoming Version 2.0 completely overwrites the animation and event pipeline. It uses a strict frame-ended tracking method that guarantees a play once instruction plays exactly once, then stops reliably.

2. The RenJS Approach (Multiple Animations per Sheet)

  • You are reading my mind! The Animation State Machine I'm building for Version 2.0 is designed to do exactly this. Instead of having "one file = one animation", you will be able to define multiple named states (like idle, talking, blinking) for a single character, mapping them to specific frame ranges, whether they are on the same spritesheet grid or separate ones.

3. Playing Animations Backwards

  • This is a fantastic idea and so simple to implement with modern web tech! Since Capsule runs on a robust CSS architecture under the hood, adding a toggle to play animations in reverse (animation-direction: reverse) is a very low-cost, high-value feature. I am officially adding a "Play Backwards" option to the v2.0 roadmap thanks to your suggestion.

Keep the feedback coming whenever you encounter something or have an idea. You are actively helping shape the future of the engine! πŸš€

Version 2 will be fantastic! I'm so happy to be able to help -- I think you are doing a great job, and I look forward to the next release!