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

Question: Is it possible to turn json back into replay file #44

Open
markduk opened this issue May 16, 2022 · 9 comments
Open

Question: Is it possible to turn json back into replay file #44

markduk opened this issue May 16, 2022 · 9 comments

Comments

@markduk
Copy link

markduk commented May 16, 2022

I'm interested to know if it is possible to turn the json back into a replay file? This would open a whole world of editing replays that can then be viewed via RocketLeague.

  • Change player names
  • Change map
  • Change car
@tfausak
Copy link

tfausak commented May 16, 2022

Hopefully @jjbott won't mind me shilling my own project here :)

Rattletrap can do that.

@jjbott
Copy link
Owner

jjbott commented May 18, 2022

Yeah, I never implemented that. In theory you could use my library to fiddle with the deserialized replay in memory, and then re-serialize it.

@markduk
Copy link
Author

markduk commented May 18, 2022

I see the Serialize method in the library, does it work? If so I could easily extend the console to convert from .json to .replay.

@jjbott
Copy link
Owner

jjbott commented May 19, 2022

Sorry I'm slow. Yeah, in theory Serialize works to output a replay.

I don't remember why deserializing from JSON was tough. Deserializing from "Pretty" JSON might be tricky, since it does some data mangling to generate it. "Raw" JSON might not be so bad. Could just be that no one uses my library, so no one asked for it, so why bother. 😄

@Gutbuster
Copy link

It's being used. But I think altering the replays is a slightly obscure need. I also looked into it at some point out of curiosity. Can't remember why. Maybe for adding some debug strings or playing a prank. Can't exactly recall.

@jjbott
Copy link
Owner

jjbott commented May 20, 2022

Yeah, I've always thought it'd be fun to create a completely custom replay from scratch. But unless you're doing something simple like changing someone's name in an existing replay, it's crazy complicated. Like, if you want to inject a player and have it move around, it's possible but you wont have a fun time. :)

@markduk
Copy link
Author

markduk commented May 20, 2022

I'm interested to hear how you and others use this library and why you wrote it in the first place. What problem were you trying to solve? Are you trying to extract data from the replay files for some reason? I can see value in doing that.

@jjbott
Copy link
Owner

jjbott commented May 21, 2022

I personally don't use it. I don't even play Rocket League anymore. 😄 But keeping the library up to date is a fun challenge.

Ages ago I thought it'd be interesting to see what kind of stats you could generate if you could parse the replays. There was a thread on the old Rocket League Forums where people were trying to figure out how to parse them, with a tiny bit of dev help. I joined that, and it was a lot of fun. At the end it felt like a race to see who would get a working parser first. 😄

Once I was able to parse them, I tried generating some visualizations for them. Like, there is code for generating heatmaps in the git history somewhere. But I found them useless, and the "race" was over, so I mostly lost interest.

Long story short, I ultimately never generated anything useful from this. I hope someone out there is!

@somecsharp
Copy link

I think it's pretty cool and appreciate your hard work on this. Has anyone ever tried to persist a replay to a relational database? Much easier to manipulate or analyze after that. The biz objects and models look merged here but easy to separate out. I may give it a shot for fun...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants