I'm developing a game in JavaScript & HTML5 with CreateJS. (I doubt you'll need CreateJS experience to answer this question, though)
My main game loop function is initialized and run using the CreateJS library like so:
createjs.Ticker.on("tick", loop);
(Similar to an event handler)
Then, it's off to the races - my function loops indefinitely, running my game at around 50FPS.
I want to cap this at 30FPS. But without a "sleep" function, or any real "pause" function, what's the best way to do that? How can I force my loop to slow down?
Thanks! -W