Finding a Path

This week in uni we talked a bit about path finding, mostly A*, and were given  the task to update our bots from the tournament to be able to navigate a maze while still performing the functionality necessary to defeat the other bots. Deciding to cut my losses with the bot and try something else, I decided to create a path finding script using C# in Unity.

 

To this, I would start by creating a small, maze like, map with invisible nodes all over it. Then using a cube as the “player character”, create a script with a public array of game objects for the invisible “nodes” that would be iterated over comparing the distance from each node to the player and then from those closest nodes check which one is the closest to the target position.

 

Before even starting, I’m pretty sure I’m over simplifying it. With this current method, the script doesn’t have any idea where the walls are, or how to react if a wall is in the way. More research will have to be done before I am able to complete this project, so that I am able to learn how to sever a connection between two nodes, so that the player will never be able to attempt to travel through walls.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s