Processing.js low framerate on mobile
in
Processing with Other Languages
•
1 year ago
I am trying to port a small game I made in processing to processing.js so I can use and expand upon it for mobile devices. The graphics are mostly SVG based. I'm planning on pretty much rewriting it from the ground up in hopes of making it more efficient, but just to test it out I decided I'd benchmark the framerate of the current build.
My results:
Chrome (desktop): 60fps consistently
Android default browser (2.3 on droidX): 10-12. Started around 24, but dropped down over about 30 seconds.
Safari (iPhone 4): Pretty much the same situation as android.
I knew it would be slower on mobile, but I wasn't expecting it to be this slow. Is this the standard experience with PJS on mobile? Am I doing something particularly wrong that makes it very inefficient? Would it be better to calculate the animation speeds based on current framerate or a timer in order to guarantee consistent animation across platform? Any help of advice would be appreciated.
1