Jump to content

Pedstrains and traffic path nodes


Yurchik

Recommended Posts

Hello everyone. I looked around forum, found few similar topics but no answers were given or not exactly what i mean... so

As i know in gta sa peds and cars are following some special points, called "path nodes", i think you, Developers, know what is it and how its made.

For some reason they were removed from mta, exactly to prevent desync with traffic etc. I understand that making full traffic that will be same for each client is very hard and you got another things to do, but i wonder if it possible:

Path nodes are loaded, but no cars are spawned randomly. You can assign any created by script car to path, and then some client will handle it's physics (same as with car physics goes, closest client handle physics of cars, and if no clients around car goes freezed).

example:

 bool nodeAssign ( vehicle car , int nodeid ) -- puts car onto path, returns false or true, as usual 
int / table nodeGetNext ( vehicle car ) -- reads next available path node for specifed car. Returnd false if no car/car is not assigned 
int nodeGetClosest ( float x , float y , float z ) -- returns id of closest node 
float , float , float nodeGetPosition ( int id ) -- returns position of node with specified id 
bool nodeSetNext ( vehicle car , int nodeid ) -- sets next node for car on it if car is on... emm... how's that... juction 
int nodeGetCurrent ( vehicle car ) -- returnd current node of car (i guess getting car pos and then getting nearest node may be fail sometimes, as example on complicated junctions or bridges) 
-- userfull but harder to make ideas 
int nodeCreatePath ( table nodes ) -- crates 'path' as list of specifies nodes 
bool nodePathAssign ( vehicle car ) -- assigns car to  path , car will route between nodes in that path 
bool carDriveTo ( vehicle car , float x , float y , float z , float speed , bool thaffic_behaviour ) -- just like similar SCM opcodes, car drives and follows path nodes  

I hope it's enough understandable

sorry for my bad english)

Link to comment

Yes, i know, i can create ped that will drive car throw thousands of stored somewhere nodes, avoid obstacles using raycasting, make some way to handle it's physics by script to avoid its freezing when too far from player, or another way, i can record myself, store it to file, and then play ,but it will be a tank, extra-heavy vehicle that ignore everything and everyone. But why? Why if its already exist in gta sa, but just cutted off to avoid desynced cars? Of course i respect your job, you did a lot to make mta the best mp mode for gta, but this function could be very usefull as for freeroam servers, same for rp.

Link to comment
  • Discord Moderators

Take a look at arc_'s GPS resource which contains some of the functions you are looking for.

It would also be a strange turn for MTA to create functions that will move the vehicle around etc., as this should really be handled by script as all the functions are there and easy to use.

I do think however making the path data available via MTA is a good idea. The vehicle path data is just around 3MB, and it would be unnecessary to always transfer these by script if available in GTASA (and of course retrievable by MTA) but I'm not sure that's possible if SCM is disabled, as mentioned above.

Link to comment

If MTA used path data from GTA SA, then those files would need to be checked to avoid desync if the player with modified paths joins. I don't see a need to install path data with MTA either. Everything can be scripted. And it's not just possible, it's plausible.

First, unless modified, file only needs to be downloaded once from the server. It's not a big problem to wait a few minutes once if that results in better gameplay.

Second, it's not even necessary for the client to download the path data from the server. Better use element data to store the coordinates of nodes which the ped is going to follow, or think of another comfortable way to send only the data which is being used. Then only simple things will need to be done client-side.

Third, making all traffic system in the resource gives server owners more functionality. They can make their own custom paths. Data from GTA SA can be converted into format easier to read from scripts. Remaking all nodes may be even better. I once had put ped paths all over San Andreas, using my own simple path editor. This is how it all looked:

. It took me a little more than a week to make ped paths. Not so long. Car paths may take a bit longer to make, but it's still not a big problem. A big advantage was reduction of node count as I didn't put them on the straight path.

And finally, server owners just seem to be lazy. For example, the function to get ped joint positions has been in MTA for a long time. Yet, some people repeatedly asked to make a function for attaching objects to ped bones "because SA-MP can do that", instead of thinking a little bit and making such function themselves. Then I scripted it when I was making a gamemode and kept it in my resources for a few months, hoping that maybe somebody will make something like that too. That didn't happen, so I put the function into the separate resource, did some work to get it ready for usage from other resources and released it. And when people said "finally someone made this", I felt disappointed about them, as they wanted it, but didn't make it themselves. Is the same going to happen with NPC traffic? Maybe yes, but it won't be me who will make it.

In conclusion, MTA doesn't need to change. Community does. Only a small part of MTA potential is used by many servers, so we need to use more of it before we ask to increase it. What I like the most is people making great scripts and using them in their own servers rather than releasing them - that's what makes the servers original. Players are attracted by variety and originality, so MTA can hardly become more popular if every server uses the same resources. People don't get annoyed because they need to wait for download to finish before playing. They get annoyed because they need to wait for download to finish just to find out that the server has the same stuff, nothing exceptional. I'd rather wait 20 minutes to join an original server with unique gameplay than 1 minute to see that it's not even worth playing.

Link to comment
If MTA used path data from GTA SA, then those files would need to be checked to avoid desync if the player with modified paths joins. I don't see a need to install path data with MTA either. Everything can be scripted. And it's not just possible, it's plausible.

First, unless modified, file only needs to be downloaded once from the server. It's not a big problem to wait a few minutes once if that results in better gameplay.

Second, it's not even necessary for the client to download the path data from the server. Better use element data to store the coordinates of nodes which the ped is going to follow, or think of another comfortable way to send only the data which is being used. Then only simple things will need to be done client-side.

Third, making all traffic system in the resource gives server owners more functionality. They can make their own custom paths. Data from GTA SA can be converted into format easier to read from scripts. Remaking all nodes may be even better. I once had put ped paths all over San Andreas, using my own simple path editor. This is how it all looked:

. It took me a little more than a week to make ped paths. Not so long. Car paths may take a bit longer to make, but it's still not a big problem. A big advantage was reduction of node count as I didn't put them on the straight path.

And finally, server owners just seem to be lazy. For example, the function to get ped joint positions has been in MTA for a long time. Yet, some people repeatedly asked to make a function for attaching objects to ped bones "because SA-MP can do that", instead of thinking a little bit and making such function themselves. Then I scripted it when I was making a gamemode and kept it in my resources for a few months, hoping that maybe somebody will make something like that too. That didn't happen, so I put the function into the separate resource, did some work to get it ready for usage from other resources and released it. And when people said "finally someone made this", I felt disappointed about them, as they wanted it, but didn't make it themselves. Is the same going to happen with NPC traffic? Maybe yes, but it won't be me who will make it.

In conclusion, MTA doesn't need to change. Community does. Only a small part of MTA potential is used by many servers, so we need to use more of it before we ask to increase it. What I like the most is people making great scripts and using them in their own servers rather than releasing them - that's what makes the servers original. Players are attracted by variety and originality, so MTA can hardly become more popular if every server uses the same resources. People don't get annoyed because they need to wait for download to finish before playing. They get annoyed because they need to wait for download to finish just to find out that the server has the same stuff, nothing exceptional. I'd rather wait 20 minutes to join an original server with unique gameplay than 1 minute to see that it's not even worth playing.

now that's a wall of text!

I agree with you.

Link to comment
  • 1 month later...

It would be good if peds waste players' internet resources. I mean, when you spawn, 10 peds are spawned in your current zone at least, wasting your internet resource like a normal player but in nodes paths/positions. Like GTA 4 Multiplayer. I think it doesn't waste a lot of server bandwidth like a server-side ped.

Link to comment
Peds can have control states. They use less BW, but IMHO using clientside peds synced manually would yield better results.

I once created a plane and a driver in it using runcode and made the ped accelerate, but another player was the syncer and that produced the results showing that control states aren't synced: I saw the plane moving out of starting position, but it kept quickly returning back, what means the syncer saw it not accelerating. In such case, if control states were synced, I would have seen accelerate control state getting synced back to false, but this didn't happen.

Link to comment

The plane and the ped were visible to both me and another player, I saw the ped accelerating and another player didn't. That's enough to prove the control state isn't synced. But if you say otherwise... Then I'm glad we have a good way to save bandwidth with no negative impact on gameplay: doing everything wrong.

Link to comment

just tested it myself, and even if my friend was a syncer vehicles where driving like they should...

vehicle and controlling ped must be server side, vehicle must be in syncer range (140 m radius) control state script must by runing on the syncer computer (if you are not the syncer and run a script on youre computer, this will not be synced...)

Link to comment
  • Recently Browsing   0 members

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