Sinistar Unleashed Game AI

into the jump gate
into the jump gate
incoming tick squadron
incoming tick squadron
scratch two bogeys
scratch two bogeys
huge death monster
huge death monster
distilled evil onslaught
distilled evil onslaught
the final sinistar
the final sinistar

Sinistar: Unleashed has a devilishly clever and versatile AI that runs the enemy. To evaluate the full AI in action, you must play at the Sinistar level of difficulty! The AI is progressively hobbled at the lower levels of difficulty. For example, at Easy difficulty the AI is deliberately disabled in many areas, including:

  • Enemies do not try to avoid being shot at. They fly into your prime killing zone (the volume of space in your crosshairs). At Sinistar difficulty, they are aware this is your most effective firing zone and try to avoid it.
  • They turn more slowly than the physics system would normally allow. This makes it harder for them to dogfight you and to avoid crashing into things. A tactic at Easy (but not Sinistar!) is to maneuver at high speeds near the jumpgate, and some pursuing enemies may smack into it in their eagerness to catch you.
  • They are lousy shots at Easy but crack shots at Sinistar.
  • They simply won't try certain advanced maneuvers, like flying backwards.
  • Even on Sinistar level of difficulty only a few warriors, like the Fury (above left), Avenging Fury (above right), and Torturer use the full range of AIs available to the enemy. These guys will dodge individual shots; they avoid getting in front of you, they can fly backwards and sideways when they need to. They can "clutch" (disengage their engines and coast in one direction while turning sideways or backwards to shoot at you-just like what you can do with the clutch). At they same time, they are avoiding obstacles, and grouping together to make mass attacks, and attempting to accomplish their high-level goal (such as following the player, running away, delivering crystals, etc.) They do this by prioritizing their goals and by having higher priority motion commands (like obstacle avoidance) override lower priority commands (like grouping).

    And they do all this without cheating. They fly their ships and fire their weapons in the same way you fly your ship. Each ship type has its own motion parameters, so that large, massive ships take longer to accelerate or turn than do small, light ships. These motion parameters are used in the same flight model your ship uses. The AIs are literally sending inputs into a virtual joystick, so they don't cheat while flying. They can't stay on your tail or avoid a crash by executing impossible turns. ( The avoidance AI uses a Craig Reynolds-style reactive control obstacle avoidance. The AIs do not do any explicit path planning.)

    As you play the game, you'll notice enemy ships do not fly "canned patterns" like some other space games. This means you cannot predict exactly what the enemy will do. The AIs are trying to achieve various goals using a set of maneuvers that they know how to execute. The AIs are constantly evaluating the situation, and they may change their mind about how to achieve their goal, such as aborting one maneuver and starting something else. This makes them much more lifelike than the usual enemies in flying games.

    These AI principles apply to everything in the game. Watch what happens when you fire a guided missile at an enemy (Long-Range Missiles are usually best to watch, as they last longer than Short-Range Missiles). Unlike many games, the game system does not just decide if a missile should hit and then simply interpolate its position onto the target to "guarantee" a hit. Missiles earn every kill:

  • When a missile is fired, the enemy ship (at Sinistar difficulty, remember) first detects the missile when it comes within sensor range and then maneuvers to avoid the missile. Meanwhile, the missile homes in on its target, trying to hit it. This results in a cool scissoring dance between the missile and the target-sometimes the missile wins, sometimes the target wins.
  • If the missile determines that it cannot hit its target, it retargets, selecting another similar target within striking range.
  • If the target successfully evades the missile and there are no other targets around for the missile to latch onto, the missile will make another pass at the original target.
  • The missile can even determine that it's best to break out of the scissoring pattern and to fly away from the target for a bit to make another run at it.
  • When you fire a volley of Short-Range Missiles, the missiles are launched sequentially at very short time intervals (you may not notice it), so that one missile will be ahead of the others. If the lead missile destroys its target, the other missiles homing on that target will instantly select new targets. You can see this best when a Sporg Attack Carrier launches its Squadron Warriors against you. Fire Short-Range Missiles at one of the warriors. Once the target warrior is destroyed, all the other missiles peel out in new directions and destroy other targets. Similarly, fire Short-Range Missiles while being chased and watch the Long-Range Radar (use its tactical display)-see how they fan out in all directions and converge on the thing that's following you.

    Many enemy ships have articulated skeletons. Notice how they can writhe in pain when you wallop them good.

    Also notice the flee behavior of enemy warriors. When badly injured, they will bolt and run. Some will duck for cover in nearby asteroids if they can. All will concentrate on using emergency evasive maneuvers, such as flying in an irregular pattern.

    So much for movement. Guess what? Our AI's also don't cheat when shooting at you. Their shots do not adjust their course mid flight to hit you. The AIs calculate correctly calculate how to lead their shots and aim to shoot at the point they think you will be when the shot passes through that point. This means that if you fly in a straight line at a constant speed the enemy can snipe at you from a great distance (so if you have been doing this, now you know why you've been getting shot up like mad). If you change course frequently as you fly, they will hit you much less often.

    Almost every special effect in the game is done with complex physics modeling. Examples:

  • The player's Orbital Defense special is not on a "track;" it is actually orbiting the ship. If it hits something, it will deflect it from its orbit and then correct itself, using a propulsive force to smoothly drift back to its intended orbit.
  • A tractor beam (various Sinistar have them; see the Sinistar on Level 6 for example) actually applies a force to its target; it does not just change the position of the target. The force drops off over distance, and this gives the tractor beam a satisfying stretchiness that you can fight-you can even escape from the beam.
  • The majority of the skeletal animations are done with physics simulation. Take a look at:
  • The arms of the Sporg Attack Carrier.
  • The legs of the Distilled Evil Torturer.
  • The spikes on the Level 1 Sinistar.
  • The tail on the Sporg Heavy Fighter.
  • The arms on the Sporg Strike Warrior.
  • All of these react to the motion of the ship. They are rocked by collisions. Forces propagate through the skeleton when the "root" object has a force applied to it.
  • There are numerous special purpose physical modeling systems on the Sinistar. For just a few examples, notice the ring of orbitals around the Level 24 Sinistar, check out how the Level 6 Sinistar mines asteroids using tractor beams; see how the Level 2 Sinistar will try to beat you with articulated tentacles. All of this is modeled in real time.
  • Shoot at (or ram) inert objects like asteroids and pieces of wreckage. Notice how the objects are deflected by the force for your shots. Notice that they spin. We calculate inertia tensors for them. The objects spin correctly. Rotations decay to spin perpendicular to their object's major axis. Other space shooters don't do spinning objects at all.
  • Notice how the Lightning Gun arcs. The gun's spanning tree adjusts itself to be optimal. As the affected objects move, the lightning bolts track them, and typically arc using the shortest paths.
  • What's the performance cost of all this? With each enemy having a complex flight model, a skeletal animation, obstacle avoidance, firing at you, etc., we can field 100 enemies simultaneously. And, even with all these AIs and physics modeling, in the last profile the AI and physics together account for only 3% of processor load.