of     1   

MrHistory
#111327299Wednesday, August 28, 2013 5:03 AM GMT

Alright so I've been playing GTA a lot and thinking about ways that the GPS feature may have been made. Plus, I might be using a GPS in and upcoming game Anyways, lets say there is a node at every intersection of completely linear roads. When the player uses the GPS, it firstly finds the closest node to the player as a starting point and the closest node to their destination as an ending point. A function is run through this line between 2 nodes that goes to the middle of the line and finds the closest node to that point. The start then connects to this middle node and the middle node connects to then end, forming 2 different lines. That function is then executed on these 2 lines and repeated until all of the lines match a road. This is just an untested idea, so it's probably bound to fail, but what do you think of it?
Avus
#111328908Wednesday, August 28, 2013 5:33 AM GMT

could work for sure
MrHistory
#111329180Wednesday, August 28, 2013 5:40 AM GMT

It may be able to get you from A to B, but what I'm really looking for is the shortest route
Avus
#111329437Wednesday, August 28, 2013 5:46 AM GMT

Yeah just use dijkstra!
Nikilis
#111331640Wednesday, August 28, 2013 6:37 AM GMT

Couldn't you just get the distance between the paths to create the shortest route? Compare them with each other.
booing
#111344498Wednesday, August 28, 2013 12:22 PM GMT

if ur gona plai an terible game wit only shoting then just shoot through walls 2 make a path......
cntkillme
#111351994Wednesday, August 28, 2013 2:55 PM GMT

wut hee sayd
boo_t
#111355145Wednesday, August 28, 2013 3:52 PM GMT

Depending on the use and game type you could take it a step farther and have Fast Travel that teleports you to the node that is your destination if you have visited it already (BoolValue) .
MrHistory
#111359068Wednesday, August 28, 2013 4:51 PM GMT

@Nik How would you know which paths to compare? @boo What?
jobro13
#111359543Wednesday, August 28, 2013 4:57 PM GMT

That's pathfinding buddy. There are a lot of usable algorithms out there to use. But y'know what's the most fun? To make one yourself :)
Nikilis
#111363863Wednesday, August 28, 2013 6:04 PM GMT

Draw a line from your location to the destination and compare the streets close to it
magnalite
#111363999Wednesday, August 28, 2013 6:06 PM GMT

Just use A*.
FusiaOS
#111365115Wednesday, August 28, 2013 6:24 PM GMT

Just google A* Algorithm and utilize it. You can even tweak it to your likings for optimizations.

    of     1