Download Replay FPS — Minecraft Mods — MetaMods

Replay FPS

Active

Downloads

0

Last update

1 year ago

Versions

1.20.1 — 1.20.2
Client
Fabric
Technological
Utils

Replay FPS

Although it should really be called "Replay FPV", but I was thinking about first-person shooters at the time of creation

About the Modification

The Replay Mod is a popular addition for Minecraft: Java Edition that allows recording gameplay for subsequent playback. Despite its extensive capabilities, it has a significant drawback when working with first-person camera.

During standard playback of a recording from a player's perspective, movement appears unnaturally smooth and slowed down. This is because Minecraft updates player positions only 10 times per second, so the game is forced to interpolate the missing data.

This addon solves this problem.

By storing camera data on the client side along with the main recording information, it's possible to capture the movements of the local player with greater detail, which significantly improves the quality of first-person playback.

Usage

This addon doesn't require any additional actions from the user beyond the standard Replay Mod functions. Simply install it along with the main mod and use it as usual. However, it's important to remember that the improvements provided by this addon will only apply to the player who recorded the replay, and only if that player had this addon installed during recording.

Note: In the current version (0.2.0), Mod Menu must be installed to access the settings menu.

Technical Features

Client Recording

The issue with displaying first-person movement occurs because Replay Mod only records game packets transmitted between the server and client. In most cases, this looks the same as observing the game in real time. However, during first-person playback, the server doesn't send enough data to accurately recreate the original movement. This is exactly why observing another player in the standard version of the game results in similar "blurriness" of the image.

The solution involves storing an additional data stream along with the packet stream. This stream consists of a series of channels, each containing continuous values with a constant sampling rate. These channels are recorded directly by the client during capture, completely bypassing the server-client packet transmission system. This not only allows capturing samples at a much higher frequency than possible with packets, but also enables recording data that isn't initially synchronized with the server.

To efficiently store these voluminous data, a special binary format was developed. When recording a replay using this addon, a "client-capture" (ccap) file is added to the recording archive along with the packet data. The specification of this file is available in the project repository.

Packets

Some data isn't practical to store in a continuous stream. Discrete forms of data, such as changes to hotbar contents, are saved as custom packets that are injected into the recording packet stream. These so-called "fake packets" are serialized into PacketByteBuf during recording, but instead of being sent to the server, they are saved locally in the recording file. During playback, Replay Mod sends these fake packets back to Minecraft as regular packets, where a custom handler can analyze them and apply them to the world.

In addition to fake packets, "packet redirectors" can be registered to change how standard packets are applied during playback. This allows processing and applying numerous packets that aren't normally used during replay playback to restore the original client experience.

Building

Like most mods, to build this project, simply open a console in the root directory and enter ./gradlew build. However, the build may fail due to a missing dependency called 'CraftFX'. This is a dependency of the ccap_viewer subproject, which is currently built along with the main project. To fix this, clone and build CraftFX, then publish it to Maven Local.

Project members
Igrium

Igrium

Developer

Created: 4 Dec 2023

ID: 5070