Reputation: 34
I have separate manifest files for each level of my game. So when user is playing on Level #1, files for Level#2 are being preloaded at the same time using LoadQueue (PreloadJS).
I've noticed some strange behaviour. Stage FPS is set to 24. But FPS raises (it can be noticed visually) while its preloading next files. It comes to normal FPS when files are preloaded..
How do I fix it? FPS raises at least 1.5x times.
EDIT: I'm using Ticker (RAF activated) and its set to 24 frames per second. Also each sprite has its own 'framerate' property. In most cases its set to 24 as well, but sometimes it has 16 (every 3 frame has been cut and hence framerate set to 16).
EDIT2: Here is an example to check the issue. There are 2 manifest files (for Level1 and Level2). Level1 starts while level2 is being loaded in the background. You can notice that the sprite in Level1 played on higher FPS. It gets to normal FPS when Level2 loading is completed.
It's better to download it and test locally, otherwise FPS changes are less noticable when downloading speed is not as high as in local or on WiFi.
Link: http://www.filedropper.com/preloadjsfps
Upvotes: 0
Views: 126