Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replays #42

Open
wants to merge 12 commits into
base: target-gd3.2
Choose a base branch
from
Open

Commits on Sep 29, 2022

  1. Replays

    snapshotdata.gd:
    
    Now has a separate "lifetime history" of stored snapshots and EncDecBuffer.
    
    New function, _add_to_lifetime_history, that accepts a snapshot, encodes it and appends it to to the end of the lifetime history before clearing the lifetime history buffer's buffer
    
    New function, _convert_replay_to_snapshots
    grabs a replay of encoded snapshot data and decodes it through the lifetime history buffer, replacing each index of the replay with a snapshot before clearing the lifetime history buffer and returning the replay itself.
    
    New function, _convert_replay_to_lifetime_history, which is the same as the previous function, but instead of modifying the replay array and returning it, the snapshots are decoded and deposited directly in the _lifetime_history array.
    
    replay.gd:
    stores gzip compressed "replays" of serialized snapshot data to files. If the game is running out of the editor (even if project is not opened specifically), replays are saved to res://replays/ . Otherwise, replays are saved to a replay directory in Godot's userdata folder.
    
    gitignore updated to not include .REPLAY files or the replays/ folder.
    ExplodingImplosion committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    cdddab8 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2022

  1. small update

    Cleaned some code that didn't do anything
    
    Capitalized print strings
    
    Reorganized/changed some of the print strings
    
    get_file_name renamed to make_file_name for clarity
    
    organized similar file opening functionality into a simple function call
    
    removed redundant file_path_normal and file_path_debug functions
    
    Saving a replay now has an optional "name" argument (default is just 'Replay')
    ExplodingImplosion committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    d06723d View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2022

  1. Decoupled replay from network addon

    replay.gd:
    
    File moved to new folder
    
    Added copyright notice header
    
    Replays can now be initialized as their own objects
    
    snapshotdata.gd:
    
    Removed previous coupling with replay.gd, now 'reverted' to previous.
    
    TODO: implement a variable rate at which replays store full snapshots to make playback easier.
    ExplodingImplosion committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    202337a View commit details
    Browse the repository at this point in the history
  2. cleaning

    .gitignore reverted
    
    snapshotdata whitespace restored
    ExplodingImplosion committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    cfa85dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0505d78 View commit details
    Browse the repository at this point in the history
  4. Update main.tscn

    Implement description draft
    ExplodingImplosion committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    f75604f View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2022

  1. gaming

    removed an extra space typo from the dbghelper debug helper addon section
    
    replayviewer updates, unfinished
    
    replays now save snapshots to their arrays and encode upon being saved
    
    save func no longer static, moved to what was previously save_self
    ExplodingImplosion committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    fb75cf7 View commit details
    Browse the repository at this point in the history
  2. gaming

    main.gd: replayviewer filepath fixed
    
    replayviewer.gd and .tscn: general updates
    
    megamain.gd: replay instance variable, records replays if project settings say so
    
    replay.gd: has scene_path instance variable (serializes it when saved), added functions to check if a snapshot is a full snapshot based on its relative signature, and to check if a specific snapshot from a replay is a snapshot. also added some helper funcs for accessing the "status" of a replay. (How 'long' a replay is, how far through the replay a given frame index is).
    
    made the replay an actual plugin
    ExplodingImplosion committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    289d458 View commit details
    Browse the repository at this point in the history
  3. updoots

    ExplodingImplosion committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    a6ee4ea View commit details
    Browse the repository at this point in the history
  4. more stuff

    reading a serialized replay gets up to build_tracker after replayviewer.gd calls read_replay --> load_new_replay --> deserialize_history --> decode_delta
    ExplodingImplosion committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    15ec517 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. stuff

    ExplodingImplosion committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    ed3510b View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2022

  1. Configuration menu
    Copy the full SHA
    0100391 View commit details
    Browse the repository at this point in the history