User Tag List

Results 1 to 10 of 10

Thread: Questions about Vsync across different devices.

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Questions about Vsync across different devices.

    Right, for months I have been trying my best to get the most performance possible out of every iOS device I have and have my game running on it and so far i've done really well, however I have some questions about how MMF2 works exactly for frame rates and such.

    Right now I get the best performance on older devices like my 4g touch with vsync on, my game is 30fps in MMF2 and stays 30fps on the ipod touch and runs rather well, however this turns the game into a 60fps game on a more powerful device like my iPhone 5. On PC runtime it's 30fps also.

    If I turn off Vsync I get terrible performance issues and lots of slowdown on my touch, but a locked 30fps on my iPhone 5 and PC.

    This is causing me a little bit of a headache as I want the better performance but have to cater in for two different frame rates, so for example my gravity and position events are every 0:03 which will average to about 32fps and has no big problems outside of a slightly varying jump height for my character which I just can't seem to fix.

    This also effects some events like active overlaying backdrop, add 1 to Y position, it will do twice as many on an iphone 5 due to the 60fps performance.

    What I want to ask is why does MMF iOS get a good performance boost on older models when vsync is on even though the game runs at 30fps? it's also a shame that I can't force vsync on or off via an event at the start of the game so I can lock and unlock it depending on iOS model, I feel this would solve some issues. My game has hundreds of actives and so far a good 1200 events which group disable when not in use, and i'm already cutting back on what I can so it's not like I can just remove things to make the game run better with vsync off this far into development, also I want that extra power!

    One way I am thinking about trying is running events going by an animation frame which repeats, I have animations to run at 30fps also and this may work like a clock.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    506
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should be able to turn off/on VSync based on the device. Just detect the device using this extension:

    And use the VSync On/Off on the frame.

    http://community.clickteam.com/showthread.php?t=70953

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Keith View Post
    You should be able to turn off/on VSync based on the device. Just detect the device using this extension:

    And use the VSync On/Off on the frame.

    http://community.clickteam.com/showthread.php?t=70953
    I don't believe you can toggle vsync with the iOS exporter, it is greyed out in the event editor.

    I'm messing around with vsync, frame rates and timer based rates to find a happy medium, it's just so strange that you get a huge performance boost using vsync on older devices like I do.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleMac Export Module
    colej_uk's Avatar
    Join Date
    Nov 2006
    Location
    UK
    Posts
    739
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've noticed this too, it's been the case for a while.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No matter what I choose it's always playing faster on my 5 or not running well on my touch. An option to disable vsync on iphone 5 might fix things but what if the 4S or iPad run it differently? it's probably not the best solution.

    I made my game 30fps as it's pushing a lot visually and for the most part was fine up until now where I need to lock down exact jump heights and polish everything up.

    Is there a technological reason for vsync 60 to run double speed even though the 30fps game has a 30fps timer? I thought the reason for the timer was to pace a game across a mix of frame rates?

    *edit* nothing I do can fix this problem, vsync 30fps games to 60 just double speeds everything and just ignores the timers? 60fps game is too stressful for an old device.

  6. #6
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, ┼rhus
    Posts
    3,455
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    The reason why we didn't want to hardcode any framerates into the iOS runtime is because of rumored screen-refresh-rate changes and because Apple doesn't provide a way for us to get the current screen refresh rate.
    I have added a small bit of code to allow for vsync when using 30 FPS and 15 FPS. Will be in the next beta.

    I will send you a PM so you can try the change before the release.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I will test it out the next time my mac is on this evening.

    Sorry if I sound quite angry at the matter, I was stressed out working on my game all of yesterday, been real busy with it over the year and it's grown into quite a beast.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Been real busy at work over the last few days but I did get to test out the new 30fps vsync stuff, it works near perfectly (as in full performance on old devices while capping the rate on newer hardware unlike currently) so look forward to it guys

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,142
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Questions about Vsync across different devices.

    That's great that that feature has been added! Diablo, you might be interested in the "keeping things moving" example topic, which uses a global event and some math to give you a global value by which you can multiply any x/y movements to compensate for slowdown and create a dropped frame effect instead. It measures the time since the last frame vs. the time it is supposed to take, and gives you the difference as a float value which you can then multiply any movements (or number of executed fastloops) by. It's great for high end games because it keeps things running at full speed and gives the appearance of dropped frames as well. Of you're interested I have created an advanced version which allows you to limit the number of "dropped frames".

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    Diablohead's Avatar
    Join Date
    Jun 2006
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DistantJ View Post
    That's great that that feature has been added! Diablo, you might be interested in the "keeping things moving" example topic, which uses a global event and some math to give you a global value by which you can multiply any x/y movements to compensate for slowdown and create a dropped frame effect instead. It measures the time since the last frame vs. the time it is supposed to take, and gives you the difference as a float value which you can then multiply any movements (or number of executed fastloops) by. It's great for high end games because it keeps things running at full speed and gives the appearance of dropped frames as well. Of you're interested I have created an advanced version which allows you to limit the number of "dropped frames".
    Sounds good but I am ok, it would be too much to adjust and bug check as my deadline after my single extension on itunes is june-ish and I still have a lot to sort out gameplay wise.

    The new vsync stuff is near perfect for fixing the problems I had with the game playing a little off sync on faster devices.

Similar Threads

  1. VSync Decoupling Questions
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 26th July 2011, 07:46 AM
  2. 2nd gen devices
    By Francois in forum iOS Export Module Version 2.0
    Replies: 19
    Last Post: 20th January 2011, 08:12 PM
  3. Vsync and game speed
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 8th December 2010, 10:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •