In a previous entry I was saying that you should start from the end when building your RTS AI. First you (when I say you I mean your AI player) try to kill the enemy workers that's your goal number 1. If there are enemy marines near the workers that`s an obstacle to reaching goal number 1. You must…
A couple days ago I felt lost. And I still do. I had no idea where to start. Eventually I came up with this code. I`m creating an additional vector that points in the opposite direction of where the obstacle is. If I move using this vector I can make some room between the unit and the obstacle, whi…
Up to this point I have been using a unique code snippet for each direction of movement. These days I managed to switch to using vectors for movement. I have the same code for all directions now
float VectorX = NextNodeX - UpixPosX;
float VectorY = NextNodeY - UpixPosY;
float VecLength = sqrt(Vector…
This is a continuation of the Building a better RTS AI series from codeproject.com . I want to add an image and you can't add images on codeproject so I`m posting here.
To get a good RTS AI player the fog of war needs to be disabled for him, or in other words he needs to be able to see what his enem…