RTS Tower AI

This topic is 2020 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hey,

A few months ago we discussed on this forum the way I intended to calibrate game levels (i.e. balance between enemies and defender towers)  and it was a great help.

I tried to find article in the forum for Tower targeting AI did not find any so, I decided to open a thread for tower AI target prioritisation and let you guys know my take on it which myth help you or  give you ideas on your AI development.

I’m currently in the final stage of my RTS Tower game development and I have tested the towers AI under different scenarios.

- Single target in range of single tower. (just shoot the sucker  )

- Single target in range of multiple towers.

- Multiple targets in range of single tower.

- Multiple targets in range of multiple towers.

- Multiple targets of various threat level in range of single tower.

- Multiple targets of various threat level in range of multiple towers.

Here is the approach I came up with for my game.

For all target(s) in range of a tower

Check if target is already targeted by other tower(s) prevent overkill.

Check for target nearest to range limit for maximum damage.

Check for threat level of target which elevates potential for selection.

Check tower power compared to remaining life of target lower target potential for selection.

Hope it help

G

Edited by GiroKa

Share on other sites

For all target(s) in range of a tower

Check if target is already targeted by other tower(s) prevent overkill.

Check for target nearest to range limit for maximum damage.

Check for threat level of target which elevates potential for selection.

Check tower power compared to remaining life of target lower target potential for selection.

At top of this I often use a weighted rating system to always choose the hightest rated object. Taking your example I would choose the following normalized rating values:

1. Check if target is already targeted by other tower(s) prevent overkill.
=> v1 = 1.0 / (1.0 + #targetByOtherTowers)

2. Check for target nearest to range limit for maximum damage.
=> v2 = max(0.0, 1.0 - distance/maxDistance )

3. Check for threat level of target which elevates potential for selection.
=> v3 = normalized thread level (0...1)

4. Check tower power compared to remaining life of target lower target potential for selection.
=> v4 = ...


Then choose a normalized weight (sums up to 1.0), e.g. w = {0.25,0.25,0.25,0.25} and calculate the rating value by using the dot-product:

rating = dot(v,w) = v1*w1+...+v4*w4

Using different w-vectors will help you to switch the behavior in a fast and easy way.

Edited by Ashaman73

1. 1
2. 2
Rutin
21
3. 3
A4L
15
4. 4
5. 5

• 13
• 26
• 10
• 11
• 44
• Forum Statistics

• Total Topics
633742
• Total Posts
3013625
×