dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Frame vs timer based game

Hybrid View

  1. #1
    Junior Member
    Join Date
    Feb 2016
    Posts
    1

    Frame vs timer based game

    I am working on a mobile game project in AS3 that makes heavy use of particles. On some devices it is likely that the frame rate will drop below the desired 60FPS.

    Usually, it seems common practice is to base game physics upon time passed between updates. I.e., if the frame rate drops slightly, the game objects will travel a little further to compensate. In this way, the player is supposed to be unable to cheat by purposely slowing their frame rate and playing in slow motion.

    Unfortunately, numerical particle simulations are effected by the length of this time increment. In a physics-based numerical particle system, the smaller the increment is, the more accurate the simulation. As the increment becomes large, the simulation can become erratic and unstable.

    In my current situation I am leaning towards using a frame-based system as this will ensure that the particle effects remain consistent at lower frame rates (albeit, slowed down).

    However, after reading around I get the feeling that this frame-based solution is generally frowned upon so I was wondering how others approach this problem. Are there other dangers that I need to consider?

    Thanks

  2. #2
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,811
    You can use a frame based system, the problem comes in with collision detection. If the particles are moving too fast then they'll avoid colliding by jumping past each other.
    http://stackoverflow.com/questions/9...rame-rate-only
    http://forum.lwjgl.org/index.php?topic=4564.0
    Both of these look good.
    The more complex versions are only really needed if you have small objects moving fast.
    .

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center