Help with creating a GPS-System

Hello! I’m at the moment working on a truck simulator game that already has a decent GPS-System, using beams to guide the player to its delivery location, but I want to make my GPS-System more efficient than the one I already have. I saw this post in my seek for tips for making this GPS-System and I ran into this post GPS System with Minimap to show visuals. The GPS-System @KinqAndi showed us in his post is pretty familiar to the one I’m want to create. The question is now how should I create the guiding beam. Should I use pathfindingservice and create lots of parts to form a guiding beam or is there another even more efficient way to do it? All support is appreciated.

7 Likes

He uses whats called a node based gps system. Basically you have points throughout the map (this is like traffic intersections) then you give each “line” to each other node a weight, this describes how hard it is to get there (the distance). When you got this model you then want to apply this algorithm to it

You are basically for looping all the nodes in a smart way so that you dont need to for loop all of them to find the shortest path

6 Likes

Ok, I tried using Roblox guide on Dijkstra’s Algorithm to create the algorithm, but it did not help me to find out a way to calculate the shortest route. My other question is then I return an instance to create the waypoint route how am I going to create a waypoint route as @KinqAndi shown us in his GPS-System. What I’m asking is should I create the waypoint route as a UI or as a part of which I will scale or is there some other more efficient way to do it?

In Dijikstras the output is a ordered queue / list in a sense on which nodes to go in order to get the shortest route

If you are interested on how to create a ui align to 2 points/ 2 other ui I think you should make another devforum post regarding just that

1 Like

Hey! Got it to work now I just need to find a way to create the waypoint route. The route is returned ordered as a table containing all the nodes the path uses to get to its destination. Thank u man!

Hey there! I keep trying to open the link but it keeps saying “Oops! We can’t find the page you’re looking for.”. Also have you had any luck with creating a GPS System yet? I’m trying to make a car that drives by itself (which is working), but I need a GPS System so it doesn’t just drive around the map and actually heads to a destination.

1 Like

Question. How do you establish relationships between connected paths and independent paths?

For example,
( > means “Connected with”)
A > B and B > A
A > C and C > A
but not C > B and not B > C

How do you really keep count of which nodes are connected to a given node? I could have a table for each node containing the nodes its connected to, but is there a better way?

Hey I found a video which is exactly about the current topic and its open sourced:
Roblox Dijkstra’s Algorithm - YouTube

1 Like