Jump to content

GTA:SA foot/car traffic paths as JSON (pathdebug)


Fierelier

Recommended Posts

I've ported the single player's paths to MTA, using the useful documentation here: https://gta.fandom.com/wiki/Paths_(GTA_SA)

I was planning to use this to implement traffic but I got busy and burnt out with other projects. There was an application I made to generate this list, it's kinda shoddy, but I will dig it up and upload its source soon.

This list maintains the game's regular 750x750 zones, the zones are once more divided into car and foot paths.

Here is an example resource that draws the path points inworld, that also contains the JSON: pathdebug.zip
- It shows you how the nodes connect, for the most part.
- It also shows you how you could make selective lists to loop, look at refreshNearbyNodes().


Preview Image

If you're making something out of this, please keep optimization in mind. Not everyone has an Atomripper 99999X. It's really easy to make this slow.

An idea for optimization: Try to make the code progressively do things, not EVERYTHING has to get done in one frame. Measure how much time you've used with getTickCount, and if it's too much, continue whatever you're doing on the next frame. I've used this technique to make peds walk on the footpaths in another resource, and it worked great.

This project is licensed under MIT. But I would much prefer you make something open source out of this.

Enjoy!

Edited by Tut
removed sus links
Link to comment
  • Moderators

Hi, please provide better links to your example resource and preview images.
Maybe add your project to GitHub so it's easier for everyone to access it without any doubts regarding the links' safety.

As of right now, we received some heads-up about some AVs that detect those links as being sus. So, in the interest of safety, we have to take them down until you provide a better alternative. If you're unable to edit the post, let me know in PMs and I'll edit it for you with the new links.

Link to comment
  • Administrators

We prefer Github or Community Resources for hosting files and code as suggested above, and Imgur or any other well-trusted image host - it's really just to ensure that our users aren't led off to strange or dangerous websites.

I have closed this thread so that you can create a new one if you'd like @Fierelier

p.s. you can also attach files directly to your post and use that to host the image.

Edited by Tut
Link to comment
  • Tut locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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