Modern Warfare Mod brings World in Conflict from the Cold War into the Modern Age. It also ups the ante on realism and authenticity in every role – Infantry, Armor, Support and Air, while trying our best to keep everything relatively balanced for fun and interesting gameplay.
Script showing the programming routine behind Patriot Heavy SAM's AI system in game.
*still reading*
LOL
damn.....I'm so glad that there is a computer to do all this stuff
& finished reading.
How long did the team took to finish scripting this ?
A few weeks from design to finish.
In a normal domination match, the SAMs sucked so badly at detecting, tracking and engaging a ballistic missile (because it was busy trying to kill choppers), so that is the result of the new software version you're seeing in the flowchart.
To defeat fast ballistic missile threats while engaging helicopters and cruise missiles simultaneously, we needed a software that truly multi-tasks and can detect and engage several threats at once simultaneously.
Does this script support more than one thread? If so is there a significant increase in performance?
Great mod you have here. It was at least 75% of the reason I bought the game.
Yes, the script is multi-threaded.
In WiC, each thread is actually run by a shooter python object owned by a game unit entity (known as WICO).
To support multi-threading, we separate Sector Scan and Engagement_Initiate() and related tracking and missile guidance functions onto radar units. This means if all radars are dead, SAM site is dead too. Missile launch control and inventory management functions are done on the missile launch station (TEL) units, and missiles themselves are also units as well.
All of these different threads run by each wico object entity share the same database to exchange information and data between each other. The database, such as the TWS_Queue that contains list of targets being tracked by radar, is protected by primitive semaphores and object oriented scripting to prevent race conditions.
So for example, normally, when a unit acquires a target and is about to fire a projectile at it, it has to calculate the target's position and compensate (lead) for its movement in advance (aka generate fire solution). In this software, the missile launch stations do not do that at all -- instead, when software commands them to open fire, they just blindly launch missiles in general direction. Once missiles are spawned, they follow the last recorded target intercept location calculated by radar units during routine TWS update that occurs every often. This significantly improves performance and also makes the system behave closer to real-life SAM systems.
good job
ummm... WTF!?