Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Thank you! I’m happy to hear the game was fun and that you had some funny moments!

In regards to the enemy AI, what is actually happening is the following: If the enemy sees player within its line of vision wait for 2 seconds then find random position. Once reached (or failed) to reach position, rotate enemy to face the player’s last known location and wait for 2 seconds before firing. Repeat process if alive.

The reason why I did this is because instead of using projectiles, I was using raycasting or line-tracing as it is known in Unreal Engine. It is not uncommon for games to use line-tracing for enemies but it can be hit or miss depending on how it is implemented. So instead of having the enemy aim at the player’s direct location, instead it would get the last known location and aim and fire that way, that way it can give the player enough time to dodge, since the player only method of attack was melee. I was thinking about adding abilities but there was not enough time and would quickly over scope the project, so I decided to keep it simple. It may not be the most elegant solution, but it did worked, even if there was some bugs. I erred more on the side of being a bit easy on the balance side, especially because the enemies would become much more of a threat if there was a large group of them.

Anywho, the 2 second delay time before firing is more than likely the reason why being able to wiggle with A and D led to the enemy to miss consistently. I could adjust to be shorter but would need to find the ideal wait time cause too short would make the later waves, hell to get through.

For next time around, I do want to try and use Unreal’s behavior tree system as it seems to allow more fine-tune AI control along with being a bit more performant.

I will say it is funny to have an image of making the player character wiggle with A and D and the enemy just missing every time.

Thank you for playing my game again, I appreicate a ton and happy to hear you enjoy it!

(+1)

You're welcome, hahaha. Yeah, those were definitely some funny moments, and not bad at all. Thank you for explaining how it works, i like to get to know that kind of stuff. Good luck! :D