Jump to content

[REL] Stage 1.5.0 - virtual actors and camera workshop


vovo4ka

Recommended Posts

It indeed does lag a lot less now. However, it could be better if you replace the timers with onClientPreRender. Should completely eliminate lag.

Omg! You're a genius! But.. If you set high fps limit you can get lags.

I'll try this method tomorrow.

Link to comment
But.. If you set high fps limit you can get lags.

Well of course, it will cost quite a bit more power:

MTA Stage recording FPS as of 1.0.2: 12.5 (~ 80ms / frame)

MTA Stage recording FPS as of 1.0.3: 20 (~ 50ms / frame)

MTA Stage recording FPS as of 1.0.x: 60 (~ 17ms / frame)

Assuming he sets up 60 FPS, of course, which is the max MTA's frame limiter can go. (without counting the possibility of disabling this)

However, there are 3 things specially made for this:

1. High Performance Hardware

2. Code optimization (I bet it could save quite a bit of load)

3. Adding the possibility to have frame skip (so it skips record / playback for 1 - 5 frames, depending on what the user needs)

Players can easily set the FPS limit lower (hint: add possibility to do this in stage) to enjoy less lag, and if frame skip is added, they can also play with that. Setting it to skipping a lot of frames when you don't need that much sync, and disabling frameskip when you do need pin-point playback.

Omg! You're a genius!

Quoted for truth.

:D

Link to comment

I want implement 2 modes:

constant "keyframerate" (with skip or without him)

and adaptive keyframerate(if object moves slowly or stand still - automatically decrease rate of keyframes)

Also I want not to apply interpolation for peds that are very far from the camera.

I need beta testers :oops: If someone interested - write me [email protected] (or icq 396101401)

Link to comment

First of all, Amazing work ! :)

Another great functionnality would be a subtitle editor so we could make like a movie :D

And i wanted to know if it's possible to integrate such videos into another resource.

This would be really cool so we could create missions videos in RP Server. (the player character would replace one in the recorded scene).

Thanks and keep up the good work ! :D

Link to comment
And i wanted to know if it's possible to integrate such videos into another resource.

This would be really cool so we could create missions videos in RP Server. (the player character would replace one in the recorded scene).

I think this would be a useful feature too - as I mentioned before. Provide a simple playback resource that other resources can use. I guess it'd have to manage the setup and cleanup of each playback neatly, so as not to leave mess in the world.
Link to comment

New version 1.4.0 avalaible!

features:

  • GUI Main menu (by F2).
  • Improved vehicle/peds movement quality (now avalaible few quality modes for memory save).
  • Implemented peds driveby (not correct aiming, but works ;).
  • Vehicle speed limiter assist.
  • Multiple players record.
  • Save/Load rec data (also in map-resources. needs ACL rights).
  • Camera menu fix (now buttons [c] (set as current) and as target/position works correctly)
  • Re-bindable controls.
  • Beep sounds on begin/stop rec/play.

Link to comment
New version 1.4.0 avalaible!

features:

  • GUI Main menu (by F2).
  • Improved vehicle/peds movement quality (now avalaible few quality modes for memory save).
  • Implemented peds driveby (not correct aiming, but works ;).
  • Vehicle speed limiter assist.
  • Multiple players record.
  • Save/Load rec data (also in map-resources. needs ACL rights).
  • Camera menu fix (now buttons [c] (set as current) and as target/position works correctly)
  • Re-bindable controls.
  • Beep sounds on begin/stop rec/play.

i think i'm gonna make some videos during the time i won't have internet at home ^^

You're doing a great job with this thanks and keep up :D

Link to comment

Thanks all!!!

I started an equal project a few months ago but lost interest in it, as it is some kind of complex

I also made a GUI and a few videos:

Maybe I could add something to your resource, when I got time...

Ped movement looks good. Which algorithm is used to store and play peds movement data?

Have you tried to shoot from weaps? or make an animated ped landing in cars? It's a huge problem. :|

Link to comment

Ped movement looks good. Which algorithm is used to store and play peds movement data?

Have you tried to shoot from weaps? or make an animated ped landing in cars? It's a huge problem. :|

Well as I stated here: http://bugs.mtasa.com/view.php?id=5113 I also got the setPedControlState Bug and didn't make any solutions to this, as it is difficult...

My movement algorithm isn't very efficient I think, as it stores every camera movement of the player, it also saves several positions (every 2 seconds) to ensure that the ped is still on the correct way, as GTA SA isn't very exact...

I haven't tried aiming yet, but shouldn't be to difficult with "getPedTargetEnd" and "setPedAimTarget" I think

Link to comment
Well as I stated here: http://bugs.mtasa.com/view.php?id=5113 I also got the setPedControlState Bug and didn't make any solutions to this, as it is difficult...

My movement algorithm isn't very efficient I think, as it stores every camera movement of the player, it also saves several positions (every 2 seconds) to ensure that the ped is still on the correct way, as GTA SA isn't very exact...

I'm using both methods. With complex handling. I'm saving ped camera rotation too. All ped functions are totaly bugged. This is sad. :x

difficult with "getPedTargetEnd" and "setPedAimTarget" I think

These functions works very strange :D

Link to comment

according all the panic every1 makes from server hacking this function definitely isn't save:

function callServerfunction(funcname, ...)
local arg = { ... }
if (arg[1]) then
for key, value in next, arg do
if (type(value) == "number") then arg[key] = tostring(value) end
end
end
-- If the serverside event handler is not in the same resource, replace 'resourceRoot' with the appropriate element
triggerServerEvent("onClientCallsServerFunction", getLocalPlayer() , funcname, unpack(arg))
end

PS:dont get me wrong, im not critic, your work is great, im just trying to help

Link to comment
according all the panic every1 makes from server hacking this function definitely isn't save:
function callServerfunction(funcname, ...)
local arg = { ... }
if (arg[1]) then
for key, value in next, arg do
if (type(value) == "number") then arg[key] = tostring(value) end
end
end
-- If the serverside event handler is not in the same resource, replace 'resourceRoot' with the appropriate element
triggerServerEvent("onClientCallsServerFunction", getLocalPlayer() , funcname, unpack(arg))
end

PS:dont get me wrong, im not critic, your work is great, im just trying to help

This is true. You need a list of functions serverside that are allowed to use this method, for safety.

Link to comment

Oh sorry. This functions an't used in my project. They only implemented(in pre-release version and i forgot about this). I'm using events for every client-server tasks. You can delete it from source without any stability oproblems :)

Thx for report 8)

Link to comment

this might fail because not all skins from 0 to 288 is valid

function syncQuality()
--triggerClientEvent ( source, "onSetQuality", getRootElement(), skip_mode,skip_fi,par1,par2,par3,par4,par5)
spawnPlayer (source, 1430, -973, 58, 0, math.random (0,288)) -- spawns player with random skin
fadeCamera (source, true)
setCameraTarget (source, source)	
end
addEventHandler ( "onPlayerJoin", getRootElement(), syncQuality )

use

repeat until spawnPlayer (source, 1430, -973, 58, 0, math.random (0,288))

--------

im interested what is clientside function "correct", its some rotation fix?

Link to comment

karlis, thx! It will be fixed in next version.

Empirically, I discovered the following dependence (source - a, output corrected angle - ca. In degrees):

function correct(a)
local ca = 0
if (a>=20) and (a<=90) then
ca = a+238
elseif (a>90) and (a<152) then
ca = a-39
elseif (a>=194) and (a<216) then
ca = a-118
elseif (a>=216) and (a<270) then
ca = a-135
elseif (a>=270) and (a<336) then
ca = a-38
else
ca = a
end
 
return ca
end

Ped rotation returned by getElementRotation while player aiming. But there are special points. I was not looking a solution for them. Therefore there are rotation lags in them.

Link to comment
  • 2 weeks later...

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...