During our third year at Creajeux, we had to develop a little game in which we could implement all the things we learnt considering AI like pathfinding, behavior trees or steering in addition to diagnostic tools like console commands or pure programming component like threads. Our teacher wanted a wacraft 2 inspired game even though it wouldn’t be a game as it would only be composed of tools and not gameplay mechanics, we could add some but it wasn’t the point of the project.
I was helped by two other students for the development, we started with the diagnostic tools and the threading stuff which I took care of. The two others were on the units management and HUD / Camera. I was a lot in the core of the game, tweaking the engine (we took the little framework that I had at the time too start) and dealing with mostly intern things. I created the debug window which displays the commands and the units selected or informations about the application like the memory it uses or the framerate.
Later I dealt with the pathfinding which was a really big part of the project, I managed to do something nice and was quite happy about it. I used Astar with a simple Pythagore for the heuristic (I was using Manathan first but it was taking too much time to process). Working with that, I added the steering behaviors so I could use a path following to smooth the units’ movements when going on their targets, I also used string pulling to end up with a really nice path.
Finally came the behavior trees to make an illusion of AI for the enemies, I really enjoyed that part even if it was a little long to program.
A thing that was quite troublesome in the process is that with our cursus evolving we had to redo some parts of the game multiple times to adapt the code (to follow the objectives of the features to add) so it is a little hard to read here and there but we managed to keep it as clean as possible in spite of the circonstances.
I’m quite happy with what I’ve done with WarCreaft in the end, I have several steering behaviors like path following, arrival or seek, a nice pathfinding and some console commands to do multiple things like spawn units, kill units, selection, healing, hurting and so on.
I think it’s one of the things I enjoyed doing the most during the third year. It also allowed me to work more on my personnal framework (which has become FaZoN now, that I always develop to add more and more stuff) and I appreciate the fact that you have to predict what the user could want to do with it and develop with that in mind, it’s really interresting.
The game starts
The user manual will come later but the game is available for download already.