-
Notifications
You must be signed in to change notification settings - Fork 11
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
Replay Bot: Considerations and roadblocks #87
Comments
I would save the replay of every new map record and we can have a script clean up the records that get beaten after a week, or whatever time is enough to verify the record wasn't cheated. The main issue I see is do we save records for every style? It might be worth looking into various compression methods to see if you can cut the blob size down. As for the stuttering issue I'm not sure. I'd have to see a video of what's actually happening I think since I've never experienced it. |
Update: @hlstriker Here are videos demonstrating the slight stuttering of the bot. It appears as if the bot is just being teleported repeatedly at a very fast rate (which of course is what my plugin is actually doing, but isn't the desired effect). It probably won't be noticeable in the web players, you'll have to download the files and watch locally to see the full bitrate and framerate. This is the source for GOKZ, which has replays which appear as smooth as if you were spectating a real player. This gist contains the relevant code, and some comments. |
The stuttering issue is now fixed. I found what I overlooked in the GOKZ code: |
I started and mostly finished the replay bots project a long time ago. It's been neglected since then, but some players have been asking me about it again. I'll just summarize the main issues that have impeded me from finishing this up.
Storage of replay files
I'd like to store/address the replays by a unique ID, this way each speedrun record can potentially point to it's own replay and be watched. This allows us a few nice features:
Issues
50 bytes per tick * 100 tick/s * 60 s/min * 30 min of replay/map * 1000 maps = 9 GB
General lag / instability of replays
I've looked at multiple other timers, written and re-written the replays API core as closely as possible trying to apply all the same things. Despite this, in all my testing, replay playback is always has a bit of stutter. On other timers, you'll notice this stuttering when applying playback on yourself (due to client prediction issues I assume). In my testing though, I notice this stuttering when spectating players and bots who are the puppet of the replay.
The main mechanism is as follows:
Record client's input states and player position/velocity per tick in OnPlayerRunCmd
Replay by setting client's input states and player position/velocity per tick in OnPlayerRunCmd
I'm not sure where the issue lies, maybe something to do with my test server specifically.
@hlstriker , I'm posting this here to see if you have any input and let you know the actual specifics of things, I can probably figure this all out but I'd just like your input before pushing something that has potentially big considerations and effects on the back end
The text was updated successfully, but these errors were encountered: