- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using Construct 2 to develop my game and building it with Intel XDK. I've been trying out the new Intel XDK update with CW16 and noticed an odd result where my game framerate improves when i enable the Intel FPS counter (--show-fps-counter). I assumed that this would slow my game down but has had the opposite effect, to an extent where its running at 60 fps on old devices (whereas before it would be between 30-45fps).
I've tried creating my own FPS counter with Construct 2 and it didn't give a performance boost, so it's got something to do with Intel's FPS counter.
I've also had --ignore-gpu-blacklist enabled but I've tried --show-fps-counter without anything else, no gpu blacklist or anything (apart from show fps counter, the only other thing i have in my 'intelxdk.config.additions.xml' is <preference name="debuggable" value="false" />) and I still get 60fps, so it definately has something to do with the Intel FPS counter. I should also mention that the along with the fps counter, it also shows the gpu raster is on.
Does anyone know why the Intel FPS counter is giving such a boost? Has anyone else experienced this? I'd like to know what's causing the boost as the problem i face is how to get this performance boost without the FPS counter showing, as you don't want to release a game with the fps counter showing in the corner.
Any help would be appriciated.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How are you measuring the fps without the --show-fps-counter enabled ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I should have mentioned that without --show-fps-counter, my game was quite laggy. With the FPS counter, there was a noticable difference as my game was running very smooth, so i can tell the improvement in framerate based on that. It ran smoothly on older devices that I've tested it on so the improvement is pretty big in that regard.
As mentioned, I had also created my own fps counter with Construct 2 and it's didn't give a performance boost like --show-fps-counter did.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you getting similar results if you use --ignore-gpu-blacklist without the fps flag? Or is --ignore-gpu-blacklist having no impact?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No i'm not, if i use --ignore-gpu-blacklist without the fps flag it doesn't run as smooth, there are noticable framerate drops. The --ignore-gpu-blacklist only has a minor impact, if any for me ,It may run slighty better but gameplay is still quite jittery.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There may be some other options that are being enabled by that fps option. You can see the complete list of Chromium options here > http://peter.sh/experiments/chromium-command-line-switches/ < search for gpu to find most of the flags relevant to what you are doing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to know what options are being enabled via the --show-fps-counter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'd have to talk to the Chromium project, that's not something we create or control, it's a Chromium project setting. The project is open source, so you might be able to find a reference in the online source code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tom, would you be able to provide a copy of your game so we can provide it as a test case. I'm trying to get the attention of our Crosswalk experts, to see if they can help explain this mystery.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
show-fps-counter can decrease the performance, but cannot increase the performance. It's really weird.
In addition, show-fps-counter is not Intel FPS counter. As XDK is based on Chromium project, it's chromium feature.
show-fps-counter does
- create one layer
- trace the FPS and memory info and paint this info on the layer using software skia.
- update it 4 times per second
Do you feel more smoothness when show-fps-counter is on? or do you see just higher number than what your own fps counter says?
If show-fps-counter and your own fps counter shows different output, they measures different stuff.
show-fps-counter measures how many times real display is updated per second. If you implement your fps using Window.requestAnimationFrame(), it should show similar results. If you use javascript timeout, the result should be very different.
In addition, if you don't use Window.requestAnimationFrame(), I recommend to use Window.requestAnimationFrame(). You will have more smoothness.
On the other hands, gpu rasterization might be enabled by chance when you use command line. Could you try --enable-gpu-rasterization and --force-gpu-rasterization? There is one difference between two options. --force-gpu-rasterization enables gpu rasterization, no matter gpu blacklist. In addition, could you try --disable-gpu-rasterization also, and report performance difference.
Thanks,
Dongseong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul, I will try and provide you with a copy of my game when i get the chance to, what will i need to provide? Do you require the whole project folder?
Donseong, thanks for the explanantion. I must admit i was very surprised to see my game running better with the FPS counter enabled, as i also assumed that this would decrease performance if anything. There is much more smoothness with the FPS counter enabled, without it, the game does feel jittery, not very smooth.
I have tried --enable-gpu-rasterization without the fps counter and i didn't get the same performance. I will try --force-gpu-rasterization and --disable-gpu-rasterization and report back with my results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tom, yes, the entire project folder would be the best, that way we have all the information. Simplest way to send that is to zip the entire project directory and then provide me with a download link via private message. You can put it in onedrive, google, dropbox, etc. I'll send you a PM that you can reply to with the link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul, I've sent you a PM with a link to my project folder.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tom -- thanks, got the project. Will try it out today.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul, could you try to reproduce it using chrome browser?
You can enable fps counter via --show-fps-counter command line or via clicking radio button "FPS Meter" in chrome devtool. See how to use devtool of android chrome. https://developer.chrome.com/devtools/docs/remote-debugging
If you can reproduce it using android chrome browser, you can see what's bottleneck using Timeline profiling. If we know bottleneck, we can fix it together.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tom -- I'm not seeing any difference between a build "with FPS" and one "without FPS" -- I've tested it on three devices:
- Google Nexus 7 (2nd version), ARM processor, Android 6.0.1
- Asus Zenphone 2, x86 processor, Android 5.0.1
- Samsung Victory, ARM processor, Android 4.1.2
None of them had an issue, the game behaved similarly on all three devices with and without FPS enabled. That last one is the one I expected to have issues, due to the age of the hardware and Android in that device.
My suspicion is that when you "disable" the FPS setting you are simply commenting it out of the additions file. If you do that, you also need to put a space between the double-dash characters, otherwise the file will encounter a parse error and the information in that file will fail to be appended to the build config files that are sent to the builder.
See the comments from that file, reproduced below, where I have commented out that line so the problem I describe above does not happen:
<!-- use this feature to add command-lines to be used by Crosswalk builds on device --> <!-- see http://peter.sh/experiments/chromium-command-line-switches/ for complete list --> <intelxdk:crosswalk xwalk-command-line="--disable-pull-to-refresh-effect" /> <!-- ignore gpu blacklist for larger collection of gpu accelerated devices --> <intelxdk:crosswalk xwalk-command-line="--ignore-gpu-blacklist" /> <!--<intelxdk:crosswalk xwalk-command-line="- -show-fps-counter" />--> <!-- you must remove space between option dashes "- -" to uncomment an option --> <!-- <intelxdk:crosswalk xwalk-command-line="- -ui-prioritize-in-gpu-process" -->
Particularly, the second-to-last line. Notice that I have added a space between the double-dash when disabling that option, in the example above. We have added a check in 3240 that catches that condition (although, it fails to provide a useful message, but it does prevent a build from happening).
If this file fails to be appended to the build config files, it means that your --ignore-gpu-blacklist option will be lost and will not be included in the build.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's surprising, because i'm definately getting a boost. I've tried it on an Sony Xperia Z3 compact and HTC One S and got similar results where i saw a boost in performance with FPS enabled. The fact that i got a boost in performance on a HTC One S is surprising as it's an old phone, but it too was running at 60fps. Is it running smoothly at 60fps for you when you tested it on your devices?
I don't know what it is but there must be something, i do find it odd that you haven't seen experienced the boost that i have even after providing my project file.
Whether i'm commenting the FPS counter out of the additions file or space between the double-dash when disabling that option, i don't see a difference to be honest.
Could there be any other factors to consider for what I'm experiencing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you set "debuggable" equal to "true" in the additions file and then build two versions of the app (one with FPS and one without) and provide those APK files (actually, provide the two ZIPs that contain two APKs, each, one for x86 and one for ARM). It helps if you change the App ID and title between builds, so they are unique for each build. That way I can load both onto a device at the same time. For example, I did the following for my tests:
- "com.test.autorunner.fps_off" and "Autorunner FPS-OFF"
- "com.test.autorunner.fps_on" and "Autorunner FPS-ON"
Then download and attach the two ZIP files to a private message (just respond to the one I sent you originally). I have already provided your app to the Crosswalk team, but seeing what you have built might also help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've sent you the files you've requested.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page