Driggero Posted November 3, 2013 Share Posted November 3, 2013 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 Link to comment
Spajk Posted November 3, 2013 Share Posted November 3, 2013 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 ). Link to comment
.:HyPeX:. Posted November 3, 2013 Share Posted November 3, 2013 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. (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. Link to comment
Moderators IIYAMA Posted November 3, 2013 Moderators Share Posted November 3, 2013 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. Link to comment
xTravax Posted November 3, 2013 Share Posted November 3, 2013 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 Link to comment
Moderators IIYAMA Posted November 3, 2013 Moderators Share Posted November 3, 2013 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. Link to comment
DiSaMe Posted November 3, 2013 Share Posted November 3, 2013 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 Link to comment
Driggero Posted November 4, 2013 Author Share Posted November 4, 2013 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. Link to comment
.:HyPeX:. Posted November 4, 2013 Share Posted November 4, 2013 There's a similar one about Vehicles if you want thought. https://community.multitheftauto.com/in ... ls&id=3585 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now