Enemies And More Movement
Stop Da Spy » Devlog
Adding AI
After Getting the Model for the enemy the next step was to go code AI. The enemy AI could be simple, all it needed to do was walk towards the player then stop at a certain distance to shoot. Thankfully i had a bit of experience with AI in my last project so i wasn't going in completely blind. I knew i had to use a mesh agent, so i added one to the enemy. Next i made a script to make the agent move to the player if they are far enough away and stop after it gets too close. That was the easy part. Unsurprisingly it didn't work on the first try and i didn't know why. Turns out i had to bake a nav mesh. That should be simple right? It took longer than I want to admit to even find out how to do that and then even longer to stop enemies from climbing on the walls. Thankfully now i have enemy that approaches the player. He doesn't shoot but that should be(It wont) easy to implement. Next on my list of things to do is moving platforms then finally the time stop.
Adding Animation
Our new enemy model has some animations that it came with. I worked to set them up so now they run when moving and idle when standing still. There was a bit of trouble with the animations but it was much easier and quicker than the AI.
Brand new movement
Im kind of addicted to adding movement and tweaking it. My newest addition is wall running and it is fun. How it works the player has a state system to decide how physics should affect them and what they can do. These are the states.
public enum State { Idle Walking, InAir, Wallrunning, }
If the player is InAir and moving downwards i use two invisible circles on the players sides to check if they are touching a wall and on what side. If they are touching a wall i set their state to Wall-running which just lowers gravity and gives them their jumps back. Then, once the trigger circles stop touching a wall its right back to the InAir state. It's a very simple implementation and it can definitely be exploited but its fun and it works.
Extras
---You now kick down all doors cause its funny(not because it was mistake)¯\_(ツ)_/¯
---Menu brings you to level 1 instead of my testing grounds
Stop Da Spy
Status | Released |
Authors | ThatOneRandom2, Maskjam, SumRandomPerson |
More posts
- MovingStairs script , beta Time Stop & Update21 days ago
- Continuation of level 2 and Ievel 2 design & ideas35 days ago
- Disk Projectile35 days ago
- levels43 days ago
- Making MovementNov 04, 2024
Leave a comment
Log in with itch.io to leave a comment.