Frame Rate

  • watsonj11
    3rd Sep 2013 Member 0 Permalink

    First of all sorry if this is the wronge Discussions Thread but I was not sure where to put it, my questions are this: Does the powder toy ever run faster than 60fps or is that the absolute maximum? also is there anyway my device can detect the frame rate and adjust accordingly? 

    Thank You in advance

  • boxmein
    3rd Sep 2013 Former Staff 3 Permalink
    @watsonj11 (View Post)
    60 frames per second is the conventional rate which to use as a hard maximum since like 99% of the monitors of the universe don't draw faster than that and the other 1% are rendered practically useless by the fact that 60 Hz is a limit set because it's the human eye's sorta limit.
    Basically you can set this higher, making simulations act faster if your processor's single core is awesomely powerful, but as TPT's drawing and updating are so interlinked, you really can't make your game faster with it if a save is running below 60 fps for you.

    tl;dr
    tpt.setfpscap(10000)
    and open a lag test save

    Edit: oh did i mention the limit is partly also there to stop TPT from taking up 100% of the CPU.
    Edited once by boxmein. Last: 3rd Sep 2013
  • watsonj11
    3rd Sep 2013 Member 0 Permalink

    @boxmein (View Post)

     Thank you, do you know if there is any way my device (by device I mean a device I have built in tpt) can detect the frame rate?

  • boxmein
    3rd Sep 2013 Former Staff 0 Permalink
    @watsonj11 (View Post)
    Sadly not. Would be cool though for a timer to send a tick every second regardless of the framerate, or whatnot. I could do that™
    Edited once by boxmein. Last: 3rd Sep 2013
  • billion57
    3rd Sep 2013 Member 0 Permalink

    That's like trying to sense if time slows down.

    As time slows down and speeds up, so do your thought processes and movements. 

     

    Same with TPT. More lag means signals move slower. 

    It's actually pretty funny if you think about it.

     

    Also, there should be some sort of standard for distance and time in TPT. How long, exactly, is one frame? It depends from save to save, of course, but there should be some sort of base unit. And how long is one pixel?

  • boxmein
    4th Sep 2013 Former Staff 0 Permalink
    One frame is FPS-1 or 1/FPS, which for 60 fps is 16 ms.
    One pixel is exactly 2.22e19 atoms.
  • billion57
    4th Sep 2013 Member 0 Permalink

    @boxmein (View Post)

     Hm. For time, I'm not quite sure that's correct.

    For distance, I have no idea where you got that information, but...

    https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=13724

  • jacob1
    4th Sep 2013 Developer 1 Permalink
    TPT has no units of time or scale. It can't have units of time because a frame is a frame, and not everyone gets the same fps.

    Scale makes even less sense. These two can't possibly be on the same scale:



    Scale is just defined by the author, if it's an entire city, then the save is the size of a city. If it's just a gun or car, the scale is much smaller.


    And right now here is no way in tpt to detect the frame rate.
    Edited once by jacob1. Last: 4th Sep 2013
  • Integral
    5th Sep 2013 Member 0 Permalink

    @jacob1 (View Post)

     Maybe it's a railgun/sniper rifle.

     

    YOU NEVER KNOW