Jump to content

A replay of the last death


Driggero

Recommended Posts

Posted

Hey guys. Recently a friend and I thought it would be a good idea to make a death replay mode, essentially showing a short replay of how you died. This would be for the Race gamemode and using a kill script I created.

My question is simply can it be done? GTA SA had a replay feature built in: http://gta.wikia.com/Replay so I can't see it as being impossible. But whether MTA has any functions that take advantage of that I don't know.

Any information you can give me on this would be appreciated :)

Posted

I'd say it's impossible. First, you need a way to detect when player is about to die and then start recording. Both of them are hard ( if not impossible ).

Posted

A probably way is to kept the server recording (as shooter games do) and delete all recordings every 1min.. if a player dies, then send him the replay... but still, very hard.

eg: every half a second, save player ped's pos and rot, and make a table. timer to delete the last object every 0.5 seconds. :idea: (this makes possible the recording part)

Now, the hard part comes to the graphic show, you would need to set a camera matrix in another dimension (supposing you will need to have the objects loaded) on the Player Ped, aiming to the attacker (getrotation, aim, etc) and then display it creating a ped with movement.

All this in a loop, wich will be EXTREMLY hard, but amazing if done.

  • Moderators
Posted

you also can do just 1 frame, recording will request a lot of power from the server.

Just 1 frame, Rotation, position and the aim direction to the target.

Posted

this thing has been already done in one server,but not exactly the same.

in neon carball server when you score a goal,it records 10 seconds of last gameplay till the time you scored a goal and shows it to you.so it's possible obviously

  • Moderators
Posted

Recording client side, yes but that would mean constant rendering player locations and save them of the last 10 second.

Sample:

60 alive players.

Max 60 frames per sec.

600 = 60 x 10 sec

Data: 600 x positions, 600 x rotations, 600 x aim positions.

This data x 60.

I would say wastage of the performance, but yes it is possible.

Posted

Recording 60 frames per second? What the hell are you going to do with that much?

My estimates:

10 players in range

Recording at 10 FPS

12 frequently updated values for position, position velocity, rotation, rotation velocity (race gamemode)

10 players x 10 FPS x 12 values = 1200 values per second to write

1200 x 10 s = 12000 values in RAM to store

Posted

Thanks everyone for the replies. A good friend of mine linked me this resource: https://community.multitheftauto.com/in ... ls&id=7790 Which is everything I needed to make it for my own uses.

As CrystalMV said it records the player's pos/rot/vel and stores them in tables. (I don't know what rotation velocity is, this resource doesn't use it and it seems accurate enough). Also it stores the locations every frame, which on my team's server would mean 50 a second. I'll try it out with 10 saves a second and see how fluid the motion is.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...