Skip to content

feature request: automatic trimming for death #126

@SubstituteDoll

Description

@SubstituteDoll

This is a little out there in terms of how many people would want this, but I for one have thousands of demos that needs this done so I would like to request it. It would be very much related to issue #57.

Basically, I would like there to be a feature as a button to automatically cut up the demo such that it splits a demo into each life. The following would be the pseudocode for this.

  1. make a backup of the original demo and the bookmarks files somewhere (as the demos.tf also notes this trimming operation as being unstable)
  2. Parse the demo file to retrieve ticks where the recording player dies
  3. Fence posting:
    3-1. For the first time, if the demo starts while the recording player is waiting for respawn, trim the demo 1 second before the respawn of the recording player.
  4. For each death:
    4-1. Trim the demo 2 seconds (or a configurable amount of time, for freeze cam) after the death.
    4-2. Trim the demo 1 second before the respawn of the recording player.
    4-3. Discard the ticks in between.
    4-4. For the bookmarks file, trim and split them the same, and recalculate and rewrite the bookmarks for the tick numbers that changed for the latter demo.
    4-5. (Optional) Do the same for VDM files if exist.
    4-6. For the split demo files' names, concatenate the string "life-n"
  5. (Optional) After the for loop, ask the user if they want to delete lives where there was no recorded event in the newly-split bookmark files.

This way, any (casual) player can basically batch-lossly-compress their demos into only lives with highlights!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Idea 💡Idea for a feature or enhancement
    No fields configured for Feature.

    Projects

    Status

    Idea

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions