RolandasV

ragemp NPC sync

Recommended Posts

Hey guys, I just wanted to share a quick video of the NPC sync system that i made, in my opinion it syncs NPC better than the palyer.

Has anyone ever done this before?

Edit - Some people thought i was synchronizing tasks, that is not correct, I'm synchronizing  position and rotation of the ped.

 

Edited by RolandasV
  • Like 1

Share this post


Link to post
Share on other sites

Well, it looks like the ped is just driving to a point. If you tell all players at the same time, that's not hard to beat.
But players have inputs all the time, you have to sync it each x milliseconds to the server or starts to lagg or teleport the position.
Also you can't compare local tasks with synced tasks. Syncing players is a hard job. You also have to compare different latency to make it smooth.

Edited by MrCarter
  • Sad 1

Share this post


Link to post
Share on other sites
13 minutes ago, MrCarter said:

Well, it looks like the ped is just driving to a point. If you tell all players at the same time, that's not hard to beat.
But players have inputs all the time, you have to sync it each x milliseconds to the server or starts to lagg or teleport the position.
Also you can't compare local tasks with synced tasks. Syncing players is a hard job. You also have to compare different latency to make it smooth.

That's correct PED is drviing to a point, but if you watch the video again, you will see that on one client the ped is already in the car it spawns while on the other client the ped is entering the car. And only one client knows where the ped is driving.

And if you slow down the video you can clearly see that on the left side car wheels are not turning when the car turns, meaning that the ped AI is not controlling the car.

Edited by RolandasV

Share this post


Link to post
Share on other sites

Interesting, though I noted that the bot's vehicle doesn't go any smooth - when you get near to the bot you can see that it jitters all the time (regarding your conclusion made). RAGE's sync also looks kinda weird there probably due to network connectivity issues/fps or something since it doesn't look like that at other user-made videos:

1 hour ago, RolandasV said:

wheels are not turning when the car turns

18 hours ago, RolandasV said:

in my opinion it syncs NPC better than the palyer.

 

^

 

1 hour ago, RolandasV said:

And only one client knows where the ped is driving.

I guess he meant not that but that ped driving paths are pretty trivial comparing to all of those overtakes made by a player and such.

Share this post


Link to post
Share on other sites
12 minutes ago, ragempdev said:

Interesting, though I noted that the vehicle doesn't go any smooth - when you get near to the bot you can see that it jitters all the time (regarding your conclusion made). RAGE's sync also looks kinda weird there probably due to network connectivity issues/fps or something since it doesn't look like that at other user-made videos:

 

^

 

I guess he meant not that but that ped driving paths are pretty trivial comparing to all of those overtakes made by a player and such.

Yes, you are right. All that weird stuff is probably due to latency, since the client on the left was physically far away from the server which increases latency. And about what he said, as I understood he thought I was telling all the clients to create a ped and set it to drive to that point. But that is not how it works. The client on the left is actually receiving the data from the server about position/rotation of the ped. Regarding what i meant it syncs ped better than the player, I was talking about the position, because not every little thing is synced yet.

Share this post


Link to post
Share on other sites

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.