I’m looking around but I figure it would be a good idea to ask people about specific mechanics when it comes to RTS’ and base building generally. I can find information about skirmish AI when it comes to 2D and I even found out a youtuber awhile back who did it in 2D even demonstrating how he did building placement and so on.
The only problem is this is all 2D and I would like some example in 3D or just any kind of tutorial series to look through in regards to this. Can anyone give an explanation or links of how I would do building placement in particular on terrain as that’s something I’m starting to have a proper look at.
Some of the stuff I can do right which is rather basic but I don’t want to have the skirmish computer enemy I’m designing just randomly placing buildings if I can help it.
It’s the building placement I’m concerned about mainly, I’m not sure how to handle it, things like chaining buildings and so on like in Age of Empires for example and placing them automatically, I want it to have a form of logic rather than just being random which would be easy to do.
I also need to make it so that the computer can look for and pick up specific objects, I think I can handle that though, it’s mainly the building stuff I’m worried about.
Providing I understood you correctly, the easiest and more trivial approach, is to make AI action selection, based on current game state.
So for example, I have one farm, and two peasants. Now I nee another farm.
If I got two farms, I need barracks as priority.
If I got 1000 resources, I can upgrade castle, or build stables.
Utility AI can help with that as well, if you don’t want just put on/off decision switch.
Ahhhh! Okay, so you actually write out all the logic yourself through various things like if statements and so on, in that case I would need to make a list for each village I have and have the AI count the number of resources it has as well as the number of specific buildings it has.
Now that makes sense and then when the AI places a building I already have my building mechanics take care of everything generally, thanks, I think that helped me understood how I’m going to handle everything. I think what I will do with regards to the placement itself is I will use a radius, I just need to do a check and make sure the AI doesn’t place anything that will overlap with each other.
Thanks for that, I may be able to start implementing this now.