Switching from V-Synced to Fixed at Runtime?

For questions about using Classic.

Post » Fri Jan 14, 2011 6:54 am

Hi guys,

I was wondering if it is possible to switch from V-Synced to Fixed frame rate modes at runtime, and vice-versa. The reason why I am asking is because I want to have an option where users can set whether they want V-Synced or not.

I found out that my game runs smoothly on my PC using V-Synced mode but it doesn't on other peoples computers. When I switch to Fixed mode, it then works on others computers but looks choppy on mine.

Thanks in advance!
B
3
S
1
G
2
Posts: 86
Reputation: 997

Post » Fri Jan 14, 2011 9:09 am

I'm fairly certain you can't change the framerate mode at runtime. You can set the fixed fps rate, when you selected "Fixed" as mode in the runtime properties. That's about it.

[quote="namre":1iban8rs]The reason why I am asking is because I want to have an option where users can set whether they want V-Synced or not.[/quote:1iban8rs]

Fixed mode reduces the display quality significantly. Also if you "code" your game properly, it should run correctly in Vsync mode on all computers. If you had improper events, mostly involving Timedelta errors, the game would appear different on different computers depending on the refresh rate. Did you consider this already?
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Jan 14, 2011 11:21 am

I once made a game (with V-sync mode) and gave it to friend for testing. He said he can't jump onto high platform (which perfectly able to reach on my PC). I used Platform Behavior, and wiki says that all built-in behaviors are made with regard to this problem and uses TimeDelta. But problem was solved with switching to fixed framerate, so I'm not sure that using V-sync with behaviors is reliable
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Fri Jan 14, 2011 4:48 pm

Compile two different .exes, and maybe even make a launcher app for them. Might not be viable if your game.exe is huge though.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri Jan 14, 2011 11:49 pm

The platform behaviour does have some sort of frame rate bug in it. I have posted a bug report on it a month or two ago.
B
9
S
2
G
4
Posts: 346
Reputation: 2,726

Post » Sat Jan 15, 2011 12:07 am

[quote="Steven":12doxilg]The platform behaviour does have some sort of frame rate bug in it. I have posted a bug report on it a month or two ago.[/quote:12doxilg]
That just might be it. I've been using only but behaviors on my game.

[quote:12doxilg]Compile two different .exes, and maybe even make a launcher app for them. Might not be viable if your game.exe is huge though.[/quote:12doxilg]
I just might do that. Thank you for your tip.
B
3
S
1
G
2
Posts: 86
Reputation: 997


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests