Building a better RTS AI. The third map

posted in DreamLand editor
Published November 12, 2024
Advertisement

I have two state machines. They are pretty much the same. I have two AI players. One state machine for each player. The state machines are for base building.

I have three maps. One map for AI player 1 and one map for AI player 2.

Because the state machines are identical the base building takes place the same for both players. They evolve the same at the same time.

On the third map I have a third player.

Player 1 has advanced AI or emergent AI. Player 2 is scripted.

Player 3 doesn't see what the other two players are doing. It has a limited base building state machine. Player 3 is a limited sincronization with Player 2. Player 3 is what player 1 is seeing that player 2 is doing. When the player 1 sees player 2 units the units that are spotted are sincronized on the third map everything else on the third map is run by the third limited state machine.

Map 1 and map 2 is the same map. They`re more like viewports. Map 1 is for displaying what player 1 is doing and map 2 for displaying what player 2 is doing. Map 3 is the same map with map 1 and 2 but it doesn't have players 1 and 2 it has player three which is a partial sincronization with player 2. Map 3 helps player 1 understand what player 2 is doing.

Here`s an example. The game begins. Player 1 workers begin mining minerals, they are visible only in Viewport 1 or Map 1. Player 2 workers are also on Map 1 but they are not visible. Player 2 workers begin mining minerals too, they are visible only in Viewport 2 or Map 2 . Map 2 has also Player 1 workers but they are not visible. Player 3 workers begin mining minerals they are present only on Map 3. Map 3 doesn't have Player 1 or 2 units. Ok. All 3 players are mining minerals. Player 2 workers cease to mine minerals and move to the side. Player 1 and 3 keep mining minerals.

Player 1 sends a worker to scout the map. Player 1 discovers Player 2 base. Player 2 base becomes visible in Viewport 1. Player 1 scout worker observes that Player 2 workers are missing from the resource extraction site. Player 3 workers cease to extract minerals. If Player 1 scout worker notices where Player 2 workers have moved Player 3 workers are placed there, if not player 3 workers are placed at a random location on map 3 where Player 1 scout hasn't been yet ( it's not really a random location, you can apply some common sense rules: the workers are not scattered all over the map but rather located somewhere as one compact group, they are not siting doing nothing but rather have been moved to a spot with resources and are mining resources. )

When Player 1 attacks Player 2 with he will use as a reference Player 3 units. Player 3 units are visible to player 1 at all time.

Previous Entry Combat
0 likes 3 comments

Comments

Alex Wagner

In the creative AI space, tools like Ideogram AI and Leonardo AI are making waves with their artistic and visual capabilities. Comparison tool at https://cabina.ai/compare/ideogram-ai-vs-leonardo-ai offers insights into how these models differ, especially for users interested in visual content or digital art. Ideogram AI may excel in areas that require unique design elements, while Leonardo AI has strengths in interactive, customizable art creation. Cabina.ai’s resourceful comparisons help users make an informed decision about which AI tool aligns with their creative aspirations.

November 15, 2024 12:29 AM
NubDevice

Hey fren…I'm following your progress. Keep up the good work.
BTW, you probably don't want to click that. Just saying.

November 15, 2024 03:48 PM
Calin

Keep up the good work.

Thanks. If you allow me a joke. It's submarine technology. Subs beat the air fortress/UFOs

November 15, 2024 04:11 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement