spite / ccapture.js

A library to capture canvas-based animations at a fixed framerate
MIT License
3.6k stars 406 forks source link

Breaks Phaser-based games #2

Open hackergrrl opened 9 years ago

hackergrrl commented 9 years ago

I'm not sure whether this is ultimately an upstream or downstream issue, but when I start the GIF capturer my game seems to freeze. I'm assuming this has something to do with the methods CCapture overrides, but haven't had a chance to dig deeper. I'd really love to be able to use this lib to record gameplay videos.

spite commented 9 years ago

Do you have an example that I can check?

hackergrrl commented 9 years ago

Clone this repo and run locally (you'll likely need a local http server). Hit spacebar to begin recording. You'll see that the game stops animating. The render method is still being called but not update, which maybe suggests the logic that overrides the time methods is preventing Phaser from issuing updates to game states. (NB: removing the logic in CCapture.js that overrides time methods "fixes" the problem, although obviously the gains of fixed framerate are lost.)

https://github.com/noffle/phaser-ccapture-breaking

Let me know if I can provide any further information!

(cc @photonstorm, who I can give further context to out-of-band if desired)

spite commented 9 years ago

I'll take a look as soon as possible, hopefully this weekend. I'll keep you posted!

gching commented 8 years ago

I am getting the same problem too for the WEBM encoder. For some reason, start() is blocking.