Skip to content

Particles don't care about frame time #1137

Closed
@einarf

Description

@einarf

On some systems particles are :

  • Not moving smoothly
  • Have a longer or shorter lifespan based on framerate
  • Fades faster or slower based on framerate

Looking at this briefly it's clearly realted to update() methods in sprite and spritelist.

Frametime was probable hardcoded because update don't have frametime parameter:

arcade/arcade/particle.py

Lines 101 to 104 in a0213ac

def update(self):
"""Advance the Particle's simulation"""
super().update()
self.lifetime_elapsed += 1 / 60

We do have an on_update method now that takes a frame time. The whole update vs on_update siutation should probably be resolved in the next major version of arcade. For now I think moving the logic to on_update and calling that from update with hardcoded delta time is a possible fix. The Emitter should be changed to call on_update and we need to somehow find a delta time to pass in without breaking anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions