People know me as a big fan of the old-school shooter genre! Games like Duke Nukem, Doom, Quake, Serious Sam… Wow this list can get quite big! But when Doom 2016 came out… I was sold! (Really! Best shooter ever! Even better than Doom Eternal in my opinion)!
At this time, I was busy with creating a C++ game that I can show for the intake at Breda University of Applied Sciences. But I wanted to show more than that, so I created like hundred times before… Another Fast-Paced shooter game in Unity… I really wanted to show them my AI-skills at the time. Unfortunately, when I wanted to show it during the intake… I got cut off because they just wanted to see my C++ skills… Well, was it for nothing than? No! Because in this project, I created an AI I never did before at the time! And I learned some important lessons later on.
My older enemies in other games were just able to follow you and shoot you. I had a lot of trouble with visualizing good solutions back then on how to make a not over-engineered version where the enemies had way more freedom in moving around the scene. When I played the Doom reboot for the first time… I noticed something that I have never seen in other shooter games before: the enemies walk around, search for new positions, climb on walls, run away from you, jump over gaps and the list goes on… It was so dynamic, and it forced you as the player to not stand still. So, when I started on this project, I wanted to at least implement that the enemies could walk to a different point on the map, follow you, shoot at your direction while moving away and jump on other obstacles to get on the higher grounds.
Great when things work! But there is always something evil waiting for you...
Everything worked decently and then I left the project in the dust for a while. One year later, I picked it up for a school assignment to show that I already got some experience with AI Then I was shocked! I have not only noticed that the way how I code my games has been improved since I follow my new education at Breda University of Applied Sciences (like, really not good organized! (if statement in if statement...)), but what do you think about efficiency?
Creating a working AI is one thing, but making it level designer friendly is a different story… At the time, I created enemies with help of the Unity Navigation component. The enemies chose randomly which waypoint-object they are going to target or if they are going to target the player. I realized that placing enemies in the level is not very easy. It required some extra work. I needed to bake the navigation info on every object that can be walked at if there are new areas added in the level, I needed to create different waypoint for in the level so that the enemy can choose randomly which waypoint he/she can walk to, for jumping I needed to set up an even stranger navigation way per jump gap (which I can better not describe because even I don’t understand it anymore) and the most annoying thing is, you have to put in the info for every enemy by hand which objects he/she can interact with. (Which is still okay if you got 10 waypoints in the level… But it gets worser and worser quickly)…
This is very inefficient. But I have definitely learned from this. My goal is for the very next project with AI to improve on this so that if I am ever going to work together with a level designer that he/she does not need extra info on how to add them in the level. They just need to put the enemy anywhere they want and bake the navigation if there are parts in the game that misses navigation. Learning from my own mistakes is key in game development. No one is perfect and everyone will face some kind of challenge with the stuff they create. But it is very important to take notes of these mistakes and make it better next time!
In 2021, I revisited this game. For my year 3 assignment of Breda University of Applied Sciences, I am working on a triple-AAA team project that is an arcade shooter. In our concept phase, I decided to do some research on the enemy AI of Doom 2016 for our game. I mostly took a deep look at how the token system is implemented in Doom 2016. Thanks to the token system, the enemies can communicate with each other by giving the enemies priority on who needs to attack the player based on the game its difficulty. To better visualize this system, I modded this game within 2 hours to support a simplified version of the token system. Click on this link to view that project.