Turning off V-Sync on Node-Webkit

Discussion and feedback on Construct 2

Post » Mon Mar 25, 2013 7:53 pm

So, I was trying to maintain a solid 60fps on Chrome with quite a lot onscreen, multiple enemies with their own platform behaviour with multiple effects and multiple everything everywhere, I kept looking through my code multiple times to try and speed things up, deactivating stuff when they aren't doing anything and whatnot, but I seem to keep getting 30-40fps.
However, I randomly tried exporting the game as an .EXE file, and woah, a solid 60fps, even with more enemies than I tried before!

Whilst using Chrome, I deactivate V-Sync so that I can see how fast the game is updating, and seeing as Node-Webkit provides faster speeds, I'd love to be able to see the fps without V-Sync. Is there a way to do this via hacking or anything?

B
45
S
19
G
10
Posts: 562
Reputation: 9,543

Post » Mon Mar 25, 2013 8:33 pm

I'm not sure, but If you can you'd have to wrap it in node webkit manually.

https://github.com/rogerwang/node-webkit/wiki/How-to-package-and-distribute-your-apps

It would probably have to be done in the manifest file.

https://github.com/rogerwang/node-webkit/wiki/Manifest-format

"chromium-args

since v0.4.0

(string) Specify chromium (content shell) command line arguments. It will be useful if you want to distribute the app with some custom chromium args. For example, if you want to disable the GPU accelerated video display, just add "chromium-args" : "--disable-accelerated-video". If you want to add multiple arguments, separate each two arguments by space. This field can take a number of flags in one argument as well, via enclosing them in single quotation marks.

A list of Chromium's command line arguments is available at http://src.chromium.org/svn/trunk/src/content/public/common/content_switches.cc"

I haven't read them all, but it might be in the list of command line arguments there.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Tue Mar 26, 2013 8:21 pm

This seems really useful, I will mess around with this and see what I come up with. Thanks :D
B
45
S
19
G
10
Posts: 562
Reputation: 9,543


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 4 guests