Posts: 16
Threads: 2
Joined: 26/Nov/2017
28th August 2020, 3:56 PM
This has been a highly requested feature in LT Discord especially from @ Magniloquent and @ bi3liu and I've always wanted this in PR2, so I spent all of yesterday making a little prototype to get the ball rolling and hopefully pique some interest here for this feature.
Here's a modified client & custom server with rudimentary replaying capability, and switching cameras with the 1234 keys:
I was thinking there could be a "Replay Manager" somewhere with your last 10 replays, and you could save a replay or send someone a replay in a PM etc.
More gifs:
https://gfycat.com/bigheartedaffectionatecarp
https://gfycat.com/enchantingeagerdeinonychus
It seems like a lot of work but it's surprisingly simple to add. Most of the work is server-side ( which I heard you like,) the replays are recorded by the server and played back from the server so there's no room funny business, bar hacking the game, which would be on the replay. But you can do it however you like.
Here are my implementation details:
Recording
Upon starting a race the server will add a fake "ghost" racer I call the VCR. This exists only on the server, the client is not aware of it. The VCR has the same interface as a regular client connection, i.e. you can write packets to it, and it will be sent packets about other racers as a normal client would, these packets include `createRemoteCharacter`, `beginRace`, position updates `p` and `exactPos`, and everything a normal racer would receive.
EXCEPT: it will not receive a `createLocalCharacter`packet, this is explained in the playback section.
The VCR will save all the packets received during the race with unix millisecond timestamps prepended (this may be better as a delta timestamp), and once all players have left the race it'll save the replay with a unique ID, I used course ID + version + timestamp as the ID.
Playback
To play back the recording the server will read each packet from the replay file and schedule them to be sent at the appropriate intervals according to the unix millisecond timestamp at the beginning of the packet. I omitted the first 3 packet parameters `timestamp`, `subHash`, and `sendNum` from the packets before sending, you may want to remove `subHash` and `sendNum` entirely from being recorded.
Rather than a `createLocalCharacter` packet, a replay spectator will receive a `createSpectator` packet.
I've made a git diff of the (small amount) of changes made to the client https://pastebin.com/6t3Mzn17
The server is completely custom and in Go, so I'm not sure how useful it will be to see.
Here's the raw replay recording from the video (i.e. what the server reads and parses and sends to the spectating client) https://pastebin.com/CdmT5M1Z.
A note about versioning:
Replay recordings may be saved with a copy of the level to avoid issues with different versions or the level being deleted entirely.
Game versions should not be an issue unless a part/item is removed from the game, which is unlikely.
Any questions/criticism welcome.
The Following 42 Users Say Thank You to oxy For This Useful Post:
• Addy, Adulock77, Alex.L, AlphaZ, Arvid, Ashley766, Atari4600, Battlealvin2009, bi3liu, bls1999, Camer the Dragon, Colind, David, Different, edetarod, ExplosionZ, gemj, ItsArkon, Janelle, jc66266, JEEJAYEM, John m., lalafox, Lego-man945, lp, Magniloquent, Master Raiden, MoonFiredk, Nemo Nation, Northadox, Panther, Prince Ande, Robo, Stxtics, Tejs, TheWicked, Tib, TRUC, Vipa, Yolex, ~JBG~, ~mert~
Posts: 1,195
Threads: 55
Joined: 17/Apr/2018
PR2 Name: Ashley766
PR3R Name: Ashley789
28th August 2020, 4:09 PM
Ohh!! That's a pretty neat idea!!
+1 from me
Posts: 2,631
Threads: 452
Joined: 9/Nov/2017
PR2 Name: bls1999
PR3R Name: bls1999
28th August 2020, 4:28 PM
I like this a lot! Nicely done.
I post about the latest site updates on the Dev Log. If you have suggestions, feel free to post them here.
@ Eternal and I pay for this site out of our own savings. Please consider donating to help keep Jiggmin's Village running.
Posts: 90
Threads: 9
Joined: 27/Nov/2017
PR2 Name: Tejs
28th August 2020, 4:49 PM
that looks so cool man
The Following 1 User Says Thank You to Tejs For This Useful Post:
• Prince Ande
Posts: 115
Threads: 11
Joined: 1/Jun/2018
PR2 Name: Magniloquent
28th August 2020, 5:15 PM
A replay system would make Pr2 contests astronomically more accessible. I, and so many other Pr2 players, could finally participate in GGP, T&E, and future contests without the tedium of the current logistical restrictions (like praying a Judge is available and the limit of 1 session for 1 hour/day).
+100 from me.
Posts: 143
Threads: 11
Joined: 27/Nov/2017
PR2 Name: Vipa
28th August 2020, 5:19 PM
(28th August 2020, 5:15 PM)Magniloquent Wrote: A replay system would make Pr2 contests astronomically more accessible. I, and so many other Pr2 players, could finally participate in GGP, T&E, and future contests without the tedium of the current logistical restrictions (like praying a Judge is available and the limit of 1 session for 1 hour/day).
+100 from me. Only +100, @ Magniloquent? Sounds like +69 to me.. Wait wut
The Following 1 User Says Thank You to Vipa For This Useful Post:
• oxy
Posts: 213
Threads: 6
Joined: 28/Nov/2017
PR2 Name: LP
28th August 2020, 9:36 PM
(This post was last modified: 28th August 2020, 9:55 PM by lp. Edited 1 time in total.)
Very nice prototype and an even better idea. I can think of a lot of uses for this.
I think a good idea to add to this would be its own sections where replays are automatically added, saved/favourited and can be named, potentially at the bottom next to the level editor button.
Gj Godxyaf
Posts: 238
Threads: 36
Joined: 14/Dec/2018
28th August 2020, 11:15 PM
(This post was last modified: 28th August 2020, 11:19 PM by John m.. Edited 1 time in total.)
This is the coolest thing ever for pr2 thanks for making it! I hope bls adds this as a update soon, it would be awesome with a leader board type thing!
Posts: 1,557
Threads: 124
Joined: 11/Feb/2019
PR2 Name: Camer999
PR3R Name: Camer_the_Dragon
28th August 2020, 11:35 PM
(This post was last modified: 28th August 2020, 11:37 PM by Camer the Dragon. Edited 1 time in total.)
This is very cool indeed
It'd be very good for judging contests (as said before, no need to wait for a judge to be on to enter a race with you and no relying on their connection)
If this could be combined with a clientside timing that'd be a nice extra bonus to make it so ppl with high ping aren't disadvantaged on contests like GGP where the times are tight and so even 0.15s of ping diff per race can add up
EDIT: ah the racer is server yes, would be cool if there was a version of this for client also (would provide smoother vid and the server one could be used for proofchecks to make sure the client matches up)
á
Posts: 73
Threads: 0
Joined: 8/Jun/2020
PR2 Name: Robobot / Fears
29th August 2020, 4:31 AM
While we're at it, I've always wanted to see an in game leaderboard for campaign's fastest times. Relying on Kongregate or Speedrun.com is a hassle that could be avoided.
Maybe with this update the server could record the replays of the top 3-5-10 runs and have the ability to watch each run back by clicking a ? beside the time or something. Goes hand in hand imo.
Posts: 46
Threads: 2
Joined: 17/Oct/2018
PR2 Name: Prince Ande
29th August 2020, 6:49 AM
I really hope @ bls1999 will make this happen, maybe a beta on 'Tournament' server, or an entirely new one (if the reason for not putting this in the game, should be worries about bugs/other mess-ups).
This is really a game changer, and could be the beginning for so many active and fun contests + much less work as for judges, recording, uploading etc.
Great job, Oxy
Owner of Prince Ande, Viking, ALVESTA, Murderer, Thousand Hands & Ande
The Following 1 User Says Thank You to Prince Ande For This Useful Post:
• Vipa
Posts: 116
Threads: 7
Joined: 4/Jan/2019
PR2 Name: Atari4600
30th August 2020, 3:29 PM
Brilliant! Now I can record speedruns without having to use a video capture software. oh boy. . . I will record many awesome glitches and display them for all to see!
Ben, please make this happen!!!!
Posts: 143
Threads: 11
Joined: 27/Nov/2017
PR2 Name: Vipa
28th November 2020, 9:00 PM
wtf, oh boi why havent i seen this before until now?? this is insane @ oxy good shit yet again, this must be the best pr2 update ever if it comes, wtf this thread was made in august and we still dont have it in pr2?? @ bls1999 xD lel ye maybe its much work to do to implement it, but oxy said it wasnt as much work: "It seems like a lot of work but it's surprisingly simple to add. "
so wee need this saap bls asap* would be itneresting af tbh, u can even put a tab "replays" besides "Pms" and "account" and "chat" where if u click on it u will see ur recent 10 replays maybe or cra more idk, but good stuff oxy again, supringsly insane prototype, ur pro af for making this, but tbh we cant forget @ bls1999 he prob spends much time on this game and makes funy motley monday videos so we shouldny take it for granted atleast someone isu pdateing pr2 remember in 2016 when pr2 had eerrors and 3304 error all the time, actually it was error 3032 i think or something like tat probably beacause juhla ddosed i think, and u could barely play cuz of error and evrynoe was frustrated and ppl was like ging crazy because of error in lt discord i thnk i rmemeber it now and it was kinda berzerk ppl were frustrated "sexually" lol but not really because it was just a pr2 error kinda but ppl didnt get to play the game they loved because of it and if u managed to get into a game without an error ppl would be in ecstascy so things have changed a lot from bls took ove nad we got knew parts and enew updates and things about the game and yheah sure some updates ****ed up and some bugs bu i think it was more positive than all the errors ofc nad maybe i n the future oxy can collab with bls to make pr2 even greater idk if eternal is hekping much with the programming/server side updayying part of p2 or only bls is but atleast oxy has someknowledge ik so hmaybe he could help out idk if bls want too cuz atm it seems like bls only one to update pr2 and stuff and maybe its otoo much wor k for him but in the end he can ask for help form us commmunity if needed but yeah again good job oxy i hope this works, kinda wen tout of topic a bit but i hope u for give me for that lel
Posts: 90
Threads: 9
Joined: 27/Nov/2017
PR2 Name: Tejs
28th November 2020, 9:26 PM
i agree with both statements above
The Following 1 User Says Thank You to Tejs For This Useful Post:
• Vipa
Posts: 115
Threads: 11
Joined: 1/Jun/2018
PR2 Name: Magniloquent
28th November 2020, 9:57 PM
I agree with the statement above.
The Following 1 User Says Thank You to Magniloquent For This Useful Post:
• Vipa
Posts: 573
Threads: 6
Joined: 6/Jan/2019
PR2 Name: Karlene
PR3R Name: Karlene
28th November 2020, 11:18 PM
I still like this idea.
The Following 1 User Says Thank You to Janelle For This Useful Post:
• Vipa
Posts: 238
Threads: 36
Joined: 14/Dec/2018
29th November 2020, 7:26 AM
All of the above
The Following 1 User Says Thank You to John m. For This Useful Post:
• Vipa
Posts: 277
Threads: 20
Joined: 27/Nov/2017
PR2 Name: Colind
30th November 2020, 8:53 PM
I like this idea a lot, great for any map that needs 'video only' & if you just want to store it and see it later.
1 thing that I want to see added when you do /reply is that maybe you can have an option to send it to a user so that way you don't have to post it on YouTube then send them the link and just send a reply of the map you did to them.
Great idea @ oxy
The Following 1 User Says Thank You to Colind For This Useful Post:
• Vipa
Posts: 28
Threads: 0
Joined: 14/Nov/2020
8th January 2021, 12:05 AM
maybe for the next update? @ bls1999
Posts: 117
Threads: 7
Joined: 26/Dec/2017
PR2 Name: MoonFiredk
8th January 2021, 6:59 AM
Great idea
|