User Tag List

Results 1 to 4 of 4

Thread: Increase at same rate with FPS drop.

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Posts
    402
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Increase at same rate with FPS drop.

    Hi,

    What we be the correct mathimatical equasion to increase an Alterable Value by 1 every 1 second, so a game at 50fps would count to 50 every 1 second, but if the FPS were to drop below 50, how would I ensure that the Alterable Value still counted to 50 every second even below 50fps.

    Thanks.

    Edit: This is also similar to how the in-built movements make up movement speed when the FPS drops.

  2. #2
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase at same rate with FPS drop.

    You could do it in a almost correct way like this:

    +always
    -add (1.0/frame rate)

    But to get true precision you'd have to implement frame rate interdependency see this article

  3. #3
    Clicker Fusion 2.5

    Join Date
    Jun 2006
    Posts
    402
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase at same rate with FPS drop.

    Hmm interesting, I had a little think about this, and wouldn't:

    1 * [setframerate] / currentframerate

    ^ so a game programmed to run at 55fps running at 55fps would look like this:

    1 * 55 / 55 = 1

    ^ and a game meant to be running at 55 but runing at 23 would look like this:

    1 * 55 / 23 = 2.39

    -

    I guess this would work right? it might not be 100% accurate, but it'd be better than assuming the game will run at 55fps on all machines - and I also assume it would only work with alterable values as they have decimal points.

    Thanks

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Increase at same rate with FPS drop.

    Yes, exactly.

    EDIT: Though normally you change to using "per second" instead of "per frame" numbers:
    So instead of:
    Always:
    -Add [change per frame] * [desired framerate] / [frame rate]
    You just do:
    Always:
    -Add [change per second] / [frame rate]

    But what you put is a good drop-in replacement to code which currently says:
    Always:
    -Add [change per frame]

Similar Threads

  1. Drag and drop movement- force drop action
    By qenio in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th April 2013, 09:53 PM
  2. FPS drop/increase after pausing a game
    By JoKa in forum iOS Export Module Version 2.0
    Replies: 20
    Last Post: 13th February 2013, 08:24 PM
  3. iPhone 5 app frame rate drop bug [beta 8]
    By UrbanMonk in forum iOS Export Module Version 2.0
    Replies: 19
    Last Post: 13th February 2013, 09:24 AM
  4. String object frame rate drop.
    By UrbanMonk in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 17th August 2012, 08:40 PM
  5. Making an enemy drop-rate
    By Mantoid in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th August 2006, 05:53 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
  •