This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by aarocka

Ok I previously posted a thread asking how to implement Google Swiffy animations in impact. Click here Then I realized I have a different problem entirely

What I want is to be able to animate something, like an intro or a cut scene. In biolab, they used a plugin called Ai to canvas. They built the logo in illustrator, exported it to canvas, drew the logo, then used more ctx to make the logo shake. I want to be able to have animation that can be triggered when ever. In my case I would like the preloader to run, then run some into animation, then bring us to the menu screen, or have the animation run while the game is loading. I would also be able to trigger animated cut scenes.

Now normally in games, cut scenes are pre-rendered video files. Naturally, I thought of making my animation in flash and exporting h.264 files. But there are some issues with that. The first one is that not every browser supports h.264. The second issue is size. The game would become very large. Now size really isn't the issue because the game will not be hosted on a web server. What I mean by this is that I will probably be selling this on steam. In order to do this, I will need to package it in a desktop application using adobe air/flex (I know, html5 game in a flash container) or titanium desktop. The third issue is that I will be packaging the game for iOS using Ejecta, and correct me if I'm wrong, Ejecta does not support video.

With all of this in mind, I thought about what my options are. I could create classes in obj-c to play videos and then link them to javascript classes. This would probably be the best option because I could put a video player over the pre-loader while the game loads, and trigger video cut scenes. But I really don't know how to do that. I then thought about using something like google swiffy or adobe edge, but we just learned that they rely on external javascript libs and don't actually use canvas, they use css3, svg, and div tags, which I know is not fully supported by Ejecta.

What am I to do?

1 decade ago by drhayes

I don't have any good answers for you and hesitated to reply, but I figured any help is good help..?

You should check out FabricJS:

The bad news is that you'd be writing your cutscenes in JavaScript. The good news is that the featureset it provides seems really useful: it has a nice abstraction on top of the canvas element for drawing more complicated shapes. It also (crucially) has a SVG-to-canvas parser that could be of use.

That also means that your integration overhead would be pretty low: you could subscribe to Fabric events to detect when animations and, at a higher level, entire cutscenes are complete. It means that your code base doesn't stretch across languages and projects (JS/Obj-C and your game/Impact/Ejecta).

1 decade ago by aarocka

I'm going to give that a shot, thanks. If it can parse svg, in theory it could parse swiffy and other tools of that nature. One other thing, how do I import external js libs in impact. I assume I just put it in the plugins folder and include what ever in the main.js, right?

1 decade ago by drhayes

I haven't moved past the "put a <script> tag on the page" stage of deployment. Assuming whatever packaging tool you're using is based on that, just put your library before Impact in the <head> element and it'll be available before your game starts.
Page 1 of 1
« first « previous next › last »