Radar
Unlike Melee, there are only 2 enemies that you need to get the positions of. This means that it is almost always more effective to turn the radar back than to continue to rotate the radar for a full circle until you scan an enemy. There are several ways of making optimal radars:
- Last-scan based: this style of radar should be effective in all twin-duel settings, although a special case will be needed for when there is only 1 enemy
- Turn the radar back if the radar turned less than PI radians (180 degrees) since scanning the last bot
- Turn the radar back if the last bot was scanned less than 4 'ticks' ago
- Enemy collection priority based:
- Turn the radar in the direction of the enemy that is determined to have the greatest need of being scanned. This is usually the enemy that has gone the longest without being scanned. Be careful to only consider enemies that are still alive, otherwise you may end up scanning empty space! Also be aware that your radar only extends 1200 away from you. This radar has the advantage of being easily ported to Melee.
Additionally, and similar to Melee, it is helpful to scan your target for several consecutive scans prior to firing at them, to let the gun adjust to a good angle. This can be done by switching to a 1v1 style radar if you have a low GunHeat.
Because you have a teammate, for 2v2 situations it may be beneficial for each bot to scan a different enemy using a standard 1v1 radar lock, and send the data back and forth using the messaging system. However, because TwinDuel is codesize restricted, this may not be feasible, or worth the codesize.
Choosing a target
There are many ways of deciding which target should be chosen, each with its advantages and disadvantages:
- Both bots attack the leader:
- This strategy is used to good effect by GrauwuarG
- It's main advantage is that once the leader is killed, the other bot loses 30 life. This should either disable it, or at least make it very easy to kill.
- The disadvantage of this method is that the leader starts with 200 energy, so is harder to kill than its teammate. Also, the leader may be in a position that is harder to hit than its teammate (eg. further away), so hardcoding to attack the leader may be a bad idea.
- This method should be coupled with an aggressive movement, so that the leader is easy to hit. The aggressive movement may also expose flaws in the enemy's movement.
- Both bots attack the non-leader:
- This strategy's advantage is that it is easier to kill the other bot due to it only having 100 energy to start, and thus get a 2v1 advantage. This helps because the remaining bot (the leader) will find it difficult to move perpendicular to both of your bots, making it easy for at least one of your bots to hit it.
- The disadvantage is that the non-leader may be further away or moving perpendicular, making it harder to hit, and thus regain energy, than the leader.
- Like attacking the leader, this targeting method should be coupled with an aggressive movement to ensure that the non-leader is killed before they can pick off your bots.
- Each bot attacks the closest enemy:
- This strategy has the advantage of keeping your bots alive as long as possible. It focuses on prolonging your own bots' life, rather than killing the enemy as quickly as possible. By shooting closer enemies you have a better chance of hitting them, and so get the HitBonus? more often. In fact, if you have a hit rate greater than 33%, your energy can actually increase.
- The disadvantage is that each of your bots can focus on a different bot, and one of your bots then gets killed before you kill either of the enemy bots. This would leave you in a 1v2 situation, where you can't move perpendicularly to either enemy bot, making it much easier for them to hit you.
The best method is all dependent on what style of bot you want. Aggressive bots should both focus on a single bot, either the leader or the non-leader. Passive bots should shoot at the closest bot to avoid missing too often. Other factors, such as which bot has more energy, or which bot is at a less perpendicular angle, can also help you build a 'targetability' factor for a bot.
Another issue is 'thrashing' between the 2 targets. This should be avoided, for 2 reasons:
- Your gun may not be able to turn in time, and you end up shooting into empty space
- You don't focus on killing one bot, and instead inflict a bit of damage to each. This prolongs the time it takes to kill one of the enemy bots, and potentially leaves you in a 1v2 situation.
To avoid thrashing you should only change targets if your enemy's 'targetability' is a certain amount higher than the current target's is.
Movement
Targeting
Comments/Discussion?
If you want to clarify or add anything guys, feel free to chop and change! Kawigi's MeleeStrategy inspired me to write this, BTW. Credit where it's due =). -- Skilgannon
Nicely done! Still reading, but so far it all looks really good. One thing about the sharing radar, where each bot scans one enemy - I have fit this into a TwinDuel team and in fact, I think I could even fit it into the current LuminariousDuo. But, to my surprise, I didn't find it performing any better than my current radar, and it is about 100 bytes bigger. So I would say: feasible = definitely; worth the size = haven't found it to be yet. -- Voidious