Why are you worried about performance for a 2D game that's basically moving a few sprites around the screen? A game like this shouldn't be taxing for modern hardware; and should even run cleanly on pretty much any computer made in the last 15-20 years. (Or even older, if you weren't using Javascript.)
As some of the other comments imply that there are some performance issues; more than using a profiler, I would make sure that your mental model of the event loop from your framework is correct. If all you're doing is moving some sprites around the screen, you need points where your code pauses because it has nothing to do. This could either be awaiting something from the framework, or putting most of your logic in callbacks that are triggered by the framework.
A different way to say it: Between frames, there's not that much calculation that your game needs to do when you're just moving a few sprites around in 2D. The event model that you hook into should be something where your game does its calculations, and then waits between frames.
> Why are you worried about performance for a 2D game that's basically moving a few sprites around the screen? A game like this shouldn't be taxing for modern hardware
> As some of the other comments imply that there are some performance issues
Because there's nothing implied and they experience perf issues first hand? TFA:
The fact that they experienced issues on a relatively powerful machine is some kind of commentary on modern software development. The screenshots look like something you could have played on a typical 1998 machine or even older.
It could be a bug or something. Bugs have been with us from the beginning. There may not have been as many bugs in 1998, but if so, only because the computers crashed very easily back then.
As some of the other comments imply that there are some performance issues; more than using a profiler, I would make sure that your mental model of the event loop from your framework is correct. If all you're doing is moving some sprites around the screen, you need points where your code pauses because it has nothing to do. This could either be awaiting something from the framework, or putting most of your logic in callbacks that are triggered by the framework.
A different way to say it: Between frames, there's not that much calculation that your game needs to do when you're just moving a few sprites around in 2D. The event model that you hook into should be something where your game does its calculations, and then waits between frames.