I added my A* pathfinding algorithm to my enemies. This system is based on my waypoint system that I created in the previous updates of my project. I had issues with the correct pathfinding due to a small error in my script which overwrote my original path, but once that was corrected the script ran just like it is designed to.
Presented here is a small part of the pathfinding algorithm method, this is the method that will keep going through all the waypoints until the goal is found OR there are no waypoints left to use.
To know about this part of code:
Since I already had my project started before creating a website, I will put the current updates in one post.
I made a small tool that will generate a grid based on the waypoints in the level, first I wanted to use the A* algorithm to find all the waypoints that could connect. But after a small test I found out that this is not the best way to start making the grid. After some research I found that a distance based algorithm would be the fastest way to start creating this grid, which will make a good base to work out the grid even more with A*.
Currently working on a waypoint grid system. At this point it raycasts 360° on the Y-axis to collect all the “visible” waypoints. Using A* with unlimited raycast length takes too long to find all the paths the enemy can take over the grid. Having issues with the SetDirty(object) method due to not firing correctly in the tool. Using SetDirty should enable Unity serialization and saving so that the waypoint grid will be cooked/baked into the level so that I don’t have to set them all manually. The waypoints become invisible and untouchable when the game is started, so they won’t be having an effect to the gameplay.
Created a simple level (part 1 out of 5) to run around in which has multiple dead spots and bottlenecks. This will influence the gameplay, the game is a survival game so the player should be able to get into a tight fit when playing the level.
Updated the recoil for the base weapon, created the base for the gametype, added visual feedback for the weapons, life, time and game info.
Created a base weapon which makes it possible to make and change weapons quickly. Added weapon inventory system and RPG assets for upgrades. Changed the camera type from third person to first person.
Start of the project. Thinking out what kind of game it needs to be, what the current goal of the project is.
Set up a scene with a simple playercontroller which has movement and aiming. Started on making a script for the base weapon.