Timedelta problem

This forum is currently in read-only mode.
  • Using timedelta is supposed to make your game "framerate independent" right?

    http://www.mediafire.com/?whyuwuuhunh

    Try running this cap in both unlimited and v-synced framerate mode and see which one goes faster.

    On my comp, v-synced moves "normally" and unlimited flies right off the screen.

    I'm propably just stupid, but if anyone knows how to make it work I would like to know how.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ekhem

    Always (every tick) -> Add 5*timedelta to 'asd'

    If you have unlimited frame rate then you have like about 400fps for example to it adds 400 times a second "5*timedelta to 'asd'" if you have v-syns you have about 75/60 (depends on your monitor refresh rate) so it will add only 75/60 times a second.

  • basically the value asd is like the velocity right?

    so when you add to it it's like acceleration

    acceleration is measured in distance over time squared

    • the "squared" intuatively telling you you need two timedeltas.

    you need one for the change of velocity over time, and one for the change in position over time

    what it should be to make it independent of framerate is:

    System: Always (every tick)

    SpriteAdd 5*timedelta to 'asd'

    SpriteSet Y to Sprite 0 .y+Sprite 1 .value('asd')*timedelta

    hope thats clear

  • Ok, Thanks a lot for quick answers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)