Welcome to the Pathfinding with A* video series! Note that this project appends onto the project created in the Behavior Systems video.
Continuing with the Behavior Systems video, We begin with some scene management on the original code.
Continuing with our pathfinding example, we perform some basic project setup to bring in additional assets that we will use.
We now create the Style class, which allows us to handle all of the visual information for our actors in one location.
This video focuses on the topic of drawing lines. We will use these lines to illustrate the connections between nodes.
Here we create a keyboard input class, translating the state class provided by XNA and use it to in an event-based system.
Now we add on the MouseInput class. This class will send out events based on certain actions that come from the mouse.
In this video we begin work on the Scene Editor. This translates user input into something that can actually manipulate our scene.
It is now time to look at Actor Selections. This gives us the necessary funcationality to select and deselect Actors with the Mouse.
We now bring in some Actor editing code, which allows us to make changes to individual Actors at runtime, rather than having them coded in prior to launch.
This video introduces the Node class. This allows nodes to be connected to one another, forming a graphed network of connected nodes.
At this point we add in the node editing code, which allows us to interactively create and edit our nodes in the Scene Editor.
In this video, we create a NodeBuilder utility class. This allows us to procedurally create a few node networks for testing purposes.
We are now ready to begin work on the A* algorithm. We begin with the node-by-node state information stored throughout the algorithm's progress.
Now we create the "heart" of our graph search algorithm. We will build this in 2 ways, one that solves the graph all at once, and another that can step through the network a node at a time.
We can finally start creating paths. Using the information demonstrated in the previous video, we create a routine that generates the final path from start to goal.
In this video we explore some different methods that we can employ to streamline our search and make our algorithm more efficient.
The final part of the A* system is the Heuristic calculation, which is represented by HScore. This allows us to add the concept of advantage into the algorithm.
Currently, we have built our system as a step-by-step search, allowing us to see each part of the search. We now alter it to run in a single call.
With A* fully functional, we now revisit the behavior system, adding in a new behavior that utilizes the A* navigation behavior.
Here we deploy the new behavior class for our A* navigation behavior, allowing our actors to utilize the network to move around.
We now begin work on the saving and loading code for our node networks. We begin by creating a NodeIO class to handle input and output of the files.
Now that we can save, we need the ability to load in the files that we have saved. Here, we do this by creating a new method called LoadNodes.
To make the saving and loading systems more user-friendly, we now create dialogs for opening and saving node network files.
With saving and loading of node networks complete, we now combine everything together as we begin work on a game demo using all concepts covered so far.
Our project is set up and the next step is to create the path node network that will be used by the AI enemy to navigate throughout the level.
Our path node network is now in place, and so we move our attention to the game itself. We will need to set up the player, enemy, and health classes.
We continue the game demo by implementing the Player class. This gives us the ability to add in gamepad control that includes speed and direction.
Moving on with the game demo project, we now add in the Enemy class, including the sight radius that controls what the enemy can and cannot see.
The Enemy is now essentially ready, but we need to set up its behavior. Here, we establish the system that allows it to use the node network as a means to navigate to an actor.
We now add in the state-based portion of the enemy's behavior, causing it to switch over to a "player seeking" behavior if the player moves within the enemy's sight radius.
In this final video in the series, we place our newly state-based enemy and give him the ability to seek out a health powerup. This video concludes the A* series.