like "the settler 3 or 4"

I want to programm a game similar the settler 3 or 4, a strategy game. I need Help:
I want that “settlers” (bots) go independent to the buildings an go than to a other building. simultaneous they get the ressources, but only the nearlyst setttlers go to the building.
I doesnt find a solution.
pleas helt

PS: sorry for the bad english

What kind of games have you made before? A realtime strategy game like settlers is pretty advanced. I would suggest to start very small with something like a Pac Man clone or even smaller. And then grow your project sizes up to your kings class strategy game here.

Point is, developing your Pac Man clone will teach you the basics about path finding and AI, which is your question here :slight_smile:

And if you want to go into games of such complexity, I strongly suggest that you learn C# and to use Visual Studio for your programming.

I make little games like Pac Man but i see that the “king class strategygame” is very complex. But the main functons of my game run only this complex system makes me problems.

:lol: Ich hoffe du verstehst das Englisch

Passt schon. Your english isn`t that bad. Forgive me when i stay in english so that other users here can also follow :slight_smile:

The problem with your case is, you ask for too much at once. Nobody will create your AI or your game for you. Thats your job. And so im a bit lost with further advice. People will most of the times just be able to answer you detail questions, never how to make a complete AI. Or even a complete game.

In general, the AI in a strategy game is really not this different from a AI in Pac Man. follow, attack, escape. Invade, do something, leave. No real difference. That`s the basics. But in our strategy case the “enemie” is not Pac Man, it is a a ressource like a tree. Or a building.

Remember how you created your Pac Man. You started with a naked level and two or three meshes or sprites.

So i would suggest to create a little test level with one of your settler characters, a building and a flat terrain. Now think what you want your character to do. The different modes you need. Like walking, stopped, do something, do something else. Best is to write it all down.

Then grab ONE thing of it. Best is to start with one of the basic steps. How you can make him “invade” a building for example. Do so. In case you are not able to achieve your goal, then chances are big that you haven`t divided the problem deep enough. How to let your character move to the house is not the problem. The problem starts with a stop animation. So first step is to start movement. You need a condition to do so. Like pressing a button. Or setting a value or a flag to 1. Second step is to set speed and direction, and so on. Start to think in values and movement and colliders instead in heroes and settlers.

Once your character is able to walk to the house you can start extending your AI. With a mode for idle for example. Think of a way to switch between walking and idle. When done add a mode for doing something in the house, a mode for walking out of the house for example. Step by step. Toughest chapter is probably path finding. Because at one point you may want to add a second settler. And that`s where the trouble really starts. Good luck :wink:

Anyways. Now, when you get stuck at one of the above points, is the time to ask for help. Because now you can ask specific questions with a specific example in your hands. Hey look, i have this value to do that and it doesn`t work. Asking for how to make your AI is simply a too general question :slight_smile:

Hope that helps a bit :slight_smile:

1 Like