Author Topic: Replays  (Read 10046 times)

0 Members and 1 Guest are viewing this topic.

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Replays
« on: December 14, 2009, 09:41:03 pm »
Here's my proposal for replays. I know it'd be quite a big project but having a recording of every race would be extremely useful in so many ways.




Recording
5 seconds before everyone starts racing, start a new bot recording for each of them. as soon as they've finished, stop the recording. assign every recording an ID and display it after a race finishes like this:
mooman finished 11th (+4.22) (RID: 000F4E)
(i suggest using letters and numbers for the ID since they use less space)

once the recordings made i'm pretty sure pod could make a plugin that moves 000F4E.rec to the right folder.


For sorting the recordings i think we should have a mysql database, the fields being:
  • RID: already mentioned this
  • Player: who raced the race
  • IP of player: might seem a bit pointless but not everyone registers an account so this'd help us ban IPs when we play back the recording and see them speedhacking
  • Time in seconds: this should be obvious
  • Name of race: this too
  • Skin ID of player: probably the most pointless but if you're going to replay a race, might as well make it as realistic as possible
  • Car colour IDs: also pointless but i don't see why not
  • Date: Date and time of the race
If you can think of any more, just add them here.


Searching
So we've got our recordings, but what good is that if you can't find the one you want? That's where the website comes in. I can easily make a search like this:



Playback
There'll be 10 slots reserved for "playback bots". If you want to watch a recording just do /replay (ID). One of the 10 bots will start the race. I don't see any reason why in spectating mode (which the viewer will be in, watching the bot) there can't be all the racing stuff like checkpoints that disappear when the bot goes through them, a timer and all the race info at the top.


That's my idea, I hope you all like it  :)
will read and answer your forum PMs when I'm less busy!

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Replays
« Reply #1 on: December 14, 2009, 09:55:13 pm »
For how long are the replays saved on the mysql database? Or what's the maximum of records that could be stored?

And about the search, how to replay them? You gonna stream the replays on the server only or are they also possible to play on the forum("the internet")?

And I need to say this sounds like the best idea in many many months.
« Last Edit: December 14, 2009, 09:57:04 pm by [FSR]Ush »

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Replays
« Reply #2 on: December 14, 2009, 10:00:19 pm »
The MySQL database would use very little space. The actual recordings would use a lot more so I'm not too sure what we could do about them. Maybe have them in zip files and temporarily extract them to watch them? this'd need another plugin of course

And about the search, how to replay them? You gonna stream the replays on the server only or are they also possible to play on the forum("the internet")?
Unfortunately, they can only be played back on the server. It's not all bad though. Didn't record a race the first time? Play it back on the server with fraps on.
And I need to say this sounds like the best idea in many many months.
thanks :)
« Last Edit: December 14, 2009, 10:02:08 pm by mooman »
will read and answer your forum PMs when I'm less busy!

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Replays
« Reply #3 on: December 14, 2009, 10:02:44 pm »
In oneworld the 10 bots wouldn't be a problem, neither would it be a problem in normal racing. But what about TT, you can only record 10 people? And in normal and one world races, it's only able to focus on 10 players? While sometimes there are 30 players online?

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Replays
« Reply #4 on: December 14, 2009, 10:06:35 pm »
no, there's no limit on recording (if there is, i'm not aware of it). but bots use 1 slot each. when playing back a race you'd only be able to see one person. so if me and you raced, you can watch both of us but not at the same time.

If someone accuses someone of ramming, I'm guessing it would be possible to have a double replay which shows 2 people's recordings at the same time but that'd use 2 player slots so it'd have to be used sparingly
will read and answer your forum PMs when I'm less busy!

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Replays
« Reply #5 on: December 14, 2009, 10:09:39 pm »
I think I just fell in love with this idea. It's great!

Too bad I'm not talented enough to help you in anyway with the server except performing as an admin and player :L

Offline ﱡ קּﻰﺢ Love

  • Admin
  • Posts: 1,936
  • Elements of life: Air, Water, Oil, Fuel
    • View Profile
    • LSR Forum
Re: Replays
« Reply #6 on: December 14, 2009, 10:41:47 pm »
Greatly thought idea. Sure can be improved.

We will be like some magicians who can put extreme sitations in order. ^^
Sign-A-True

Offline pod

  • Scripter
  • Posts: 417
    • View Profile
  • In-game name: pod
Re: Replays
« Reply #7 on: December 15, 2009, 12:41:49 am »
Code: [Select]
pod@gaz ~/.irssi/logs/GTANet $ grep -c '^--- Day changed ' \#adrenalinex.echo.log
169
pod@gaz ~/.irssi/logs/GTANet $ grep -c ' by .*      .* by ' \#adrenalinex.echo.log
54558
pod@gaz ~/.irssi/logs/GTANet $ calc
; 54558 / 169
        ~322.82840236686390532544
; 322 * 5 * 500 / 1024
        786.1328125
; 322 * 10 * 500 / 1024
        1572.265625
; 322 * 15 * 500 / 1024
        2358.3984375
; 322 * 20 * 500 / 1024
        3144.53125

500KB = size of Snoopy's cityslicker recording

~322 avg races per day, 5 players per race = 786MB per day
10 = 1.5GB
15 = 2.3GB
20 = 3.0GB

probably too much data for it to be feasible to record everyone :(

Offline [LSR]Jalicno

  • Admin
  • Posts: 12,384
    • View Profile
Re: Replays
« Reply #8 on: December 15, 2009, 01:09:46 am »
Huge numbers  :(

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Replays
« Reply #9 on: December 15, 2009, 02:13:14 am »
But you could auto-delete the files after like one or two weeks to gain new free space ;)

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Replays
« Reply #10 on: December 15, 2009, 02:17:34 am »
wow, i knew it was a lot but never thought it'd be so much. if you were to rar them up when not in use, you could turn that 516kb into 277kb

our host's limit is 7GB so maybe we could delete anything older than 7 days every day and that'd be good enough?
will read and answer your forum PMs when I'm less busy!

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #11 on: December 15, 2009, 09:36:43 am »
Quote
If you can think of any more, just add them here.

Nitro in race: Yes/No
XNitro in race: Yes/No


Quote

A link to download the recording could prove to be useful, so people who have the AX source can set it up and watch it locally on their computer.


Quote
our host's limit is 7GB so maybe we could delete anything older than 7 days every day and that'd be good enough?

It's tight (I suggest around 5 days), we might need the extra buffer to keep site/server running smoothly but that's up to you. ;)

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Replays
« Reply #12 on: December 15, 2009, 03:11:41 pm »
Quote
A link to download the recording could prove to be useful, so people who have the AX source can set it up and watch it locally on their computer.
or we could release a simple gamemode that can only replay. actually, since there wouldn't be any slot limits so you could theoretically download all 40 replays, start the mini server and replay them all back in one world.

to make this easier the mysql database would have to have another field called Race ID (this is nothing to do with Replay ID) so you could search for the RaceID and see every other replay from that particular race, then download them all in one handy zip.
will read and answer your forum PMs when I'm less busy!

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #13 on: December 15, 2009, 09:00:12 pm »
 ;D

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #14 on: December 18, 2009, 03:19:03 pm »
Rac3r when will you comment on this lol

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Replays
« Reply #15 on: December 18, 2009, 08:16:59 pm »
Uber cool plan mooman.  mooman has suggested this previously but not on this scale, also Pyro suggested something similar, although it was geared towards a Ghost Mode SA-MP Update.  (We're been told, that won't be happening anytime soon.)

I think this is a great idea. A one world replay, that would be awesome.

As pod posted though, the data usage might be a bit too extreme, that's the only problem*. pods bot system could also be used to easily load the replays. As mooman found out, adding bots to server is very easy thanks to the bot systems config files.

*Another problem could be 40 players recording paths, we've probably tried it with about three players recording without any problems.  As with any update (especially mine lol), we won't know till we try.

Rac3r when will you comment on this lol
Does help if I'm on online. :P

Offline ǝǝǝoſ[sXɐ]

  • Admin
  • Posts: 2,112
    • View Profile
  • In-game name: Joeee
Re: Replays
« Reply #16 on: December 18, 2009, 09:39:39 pm »
Didn't record a race the first time? Play it back on the server with fraps on.
Does this mean being able to record races without it being hard because of the lag from fraps?

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Replays
« Reply #17 on: December 18, 2009, 10:34:30 pm »
Didn't record a race the first time? Play it back on the server with fraps on.
Does this mean being able to record races without it being hard because of the lag from fraps?
yesh
will read and answer your forum PMs when I'm less busy!

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #18 on: December 19, 2009, 02:11:05 am »
I've talked with moo about how I can donate an FTP server with an 80GB hdd to archive (I did the math ;)) around 40,000 bot recordings for a year. Now you're probably thinking of the bandwidth, I did the math on that too. Moo suggested that I only download bot recordings of players which broke highscores. That's around 200MB (estimate, compressed) a day. That's equivalent to 6GB of bandwidth a month which is safe.

Surely, 1 year is enough for admins to find a suspicious record, download the recording from the archive, and investigate. ;)

Offline [MAF]PyroFox

  • Leader
  • Posts: 1,426
  • ¯\(°_o)/¯
    • View Profile
Re: Replays
« Reply #19 on: December 19, 2009, 04:26:58 pm »
If recording everyone at the same time doesn't work, ( I honestly think it probably won't, too much resources used) I have another idea for it. Lets say we suspect some1 of hacking, instead of watching them all the time and giving us no time to race, you can have the server record them with a command like /record ID and let it constantly record them every time they join the server. This way, we can play back the recordings later on and investigate them instead of constantly watching them. Much more convenient and uses less resources. Of course there are a few problems, the person who is recorded could get rammed and it might look weird but idk, you can still tell if they are blatantly hacking or not.
« Last Edit: December 19, 2009, 04:29:21 pm by PyroFox »

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Replays
« Reply #20 on: December 19, 2009, 06:33:04 pm »
Niceone Falcon, just hope the uploads from AX to your FTP don't kill our bandwidth.

Yes Pyro, there would be no way to beat the system then.  I was going to code it for the tournament, but never did.
We'll test it out Monday I reckon, see if the lag causes any problems.  /Record ID on account would be handy and with the way the current bot saving is handling, we know it will work.

Gonna restrict /bot being used which in racemode, we'll test run the auto record Monday I reckon.  See if it's worth the bandwidth.
« Last Edit: December 20, 2009, 11:10:35 pm by [UK]Rac3r »

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Replays
« Reply #21 on: December 22, 2009, 08:29:25 pm »
Partially setup.
Still need to sort out the ID system, but with a 30+ server, no lag or other niggly issues.

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #22 on: December 23, 2009, 12:05:07 am »
Partially setup.
Still need to sort out the ID system, but with a 30+ server, no lag or other niggly issues.

Yipee! ;D

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Replays
« Reply #23 on: December 23, 2009, 08:32:22 am »
Also gonna add it to registered players only, because a 256kb recording for good racers, is 1.5mb for bad racers. Waste of bloody space :P

Screenshot!  (Date was just for a 1 race test)





Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Replays
« Reply #24 on: December 23, 2009, 08:44:51 am »
maybe keep unregistered players for a day so we can watch them and see if they're hacking? especially now they can tell when we're speccing them :(
will read and answer your forum PMs when I'm less busy!

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #25 on: December 23, 2009, 09:27:12 am »
maybe keep unregistered players for a day so we can watch them and see if they're hacking? especially now they can tell when we're speccing them :(

yea 1 day so i can archive their records as well? :L

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #26 on: January 02, 2010, 03:56:20 pm »

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Replays
« Reply #27 on: January 02, 2010, 04:21:02 pm »
woo :D
will read and answer your forum PMs when I'm less busy!

Offline [2F2F]SNiKeRiS

  • Admin
  • Posts: 3,892
    • View Profile
    • 2F2F website
Re: Replays
« Reply #28 on: January 02, 2010, 06:02:13 pm »
The project has begun!  :D

Offline [MAF]Rac3r

  • Leader
  • Posts: 2,807
  • Well, this is embarrassing.
    • View Profile
Re: Replays
« Reply #29 on: January 02, 2010, 06:08:00 pm »
 8)

Offline [MAF]falky

  • Admin
  • Posts: 2,750
    • View Profile
Re: Replays
« Reply #30 on: January 04, 2010, 01:10:48 pm »
new entry posted! (not much :L)

http://falky.tumblr.com/