Skip to content

Physics Refactor todo #219

@gcabbage

Description

@gcabbage

Listing some of the todo items remaining from #100

EffectGroup/EffectLists

Particle arrays are still moving incorrectly in autopilot (e.g. particle trails from plasma bolts in VotG).
Note - this issue also affects version 1.x builds

During autopilot we perform multiple physics / behavior updates for each painted frame. This works correctly for space objects etc. However, we only call the update methods for EffectGroup / EffectLists if the primary space object was painted since the last update. This prevents particle effects being created/updated for off screen objects. However, it also prevents onscreen EffectGroup/EffectLists being updated correctly during autopilot

Possible fixes are:

  • Always call the physics update for effects. New particles are added in the behavior so this might not add too much overhead
  • Change the "on screen" check to work based on a clip rectangle rather than an actual "has been painted" check. This will mean effects are also updated while in the map view.

Many painter effects are animated based on the current tick or number of ticks since the effect was created. e.g. watch a shockwave animation in slow motion. Ships and particles will move smoothly, but the shockwave will be expand in noticeably slow steps Changing the painter effects to use the elapsed time (available by summing the time steps passed to the physics update) would help here.

Overlays

Overlays do not have a physics update. This means particles linked to an overlay such as the smoke or venting effects will only be updated once per tick. As with the painter effects these become much more noticeable in slow motion.

Per-tick collision detection

Some collision detection is still occurring in the behavior update (once per tick), this includes shockwave and particle array types

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions