Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Thank you! I can definitely share how we did the minimap! I originally thought I was going to have to manually set up a node graph and then use A* to get a minimal path for the driver from their current position to their destination.  Thankfully though, as I was researching online, I came across unity's navmesh system, which was specifically designed to have npc agents walk through designated areas, using A* under the hood. The way you're supposed to use it is that you need to create a navmesh from all the meshes that can be walked on, then hook up a navmesh agent component to the npcs you want walking around your map. What I found though is that you can also just directly request a path from the navmesh, and as long as your source and destination vectors are close enough to the navmesh, it will give you a list of nodes to get you from point A to point B. After that it was pretty easy to draw a line way above the player on the minimap layer to overlay on top of the map!

One thing I did wish I had more time for was getting it working for the whole map, as it currently stands the navmesh was only generated for the roads. I tried making a navmesh for the entire map but it made the game way too laggy. That's why driving off the roads gives you the "recalculating" message 😂 

(+1)

Dude, when I saw it, I thought to myself, “Couldn’t you just use a NavMesh for that?” I had the same idea as for why it was ‘recalculating’. Still, I think making it stick to the roads added to realism as any other real-life map would do the same.
Great job on this one—I love a good programming challenge!