Overview
Game:
G.I. Joe: The Rise of Cobra

Platform:
Nintendo DS

Developer:
Backbone Entertainment

Tools used:
Character behaviors were written in XML, level design elements all edited in Maya

Time taken:
This battle took 3 days to design and implement and another 3 days to test and tune

Firefly is the game's second boss but he was actually the last one to be made and also the last major bit of character scripting that I did for the game. As a result, not only did I have more experience to bring to bear but I also had a fuller range of scripting tools at my disposal. I planned the battle, scripted the actors, wrote the dialog, and implemented the level scripting.
I actually had no idea what I was going to do with this character when I sat down to build the fight, he was a late addition to the project. I just started building and testing, keeping the elements I found fun, until I had something I was happy with.
Battle mechanics
The Firefly battle is a multi-stage fight through 3 distinct sequences. The 1st stage is a simple intro fight. During the 2nd stage Firefly uses a teleporter to toy with the player. In the 3rd stage he sticks with the teleportation gimmick but switches to a full-on attack, repeatedly teleporting behind the player to blindside them. Throughout the battle the player has to be wary of landmines hidden all over the level.

     Stage 1
  • Approaches the player until within firing range
    • Attack the player with a continuous burst of gunfire
  • If damaged, dodge away from player and attack
    • Teleport away when defeated
      • Arm a group of timed explosives in the central area

     Stage 2
  • Teleport to one of the cardinal points of the map and taunt the player into following
    • Fire at the player as they approach
    • When player gets within range, teleport away
      • Arm a group of timed explosives in the area
      • Repeat behavior until all cardinal points have been visited

     Stage 3
  • Reappear where the 1st stage was defeated
  • Teleport behind the player
    • Attack the player with a long or short burst of gunfire
    • Or, if the player is less than 1m away, drop a timed mine and dodge away
      • After attacking, repeat teleport behavior
Gimmicks
The gameplay elements of this boss fight are built around two major gimmicks, teleportation and land mines. The goal is to make the environment itself be part of the fight. First, by making the players travel through the heavily booby-trapped level. Then, by making the final stage of the boss very aggressive in order to force panic moves by the player that get them to stumble into a replenished wave of proximity mines.

Teleportation
The main goal of having the boss teleport around the level was originally to lure the player into traps set with explosives, and the 2nd stage carries this on nicely. My decision to use teleporting for the 3rd stage was born out of frustration. When a test of an early random teleport behavior was going poorly, I unloaded into the test actor and inadvertently caused him to teleport directly behind me.

     Stage 2 teleport
  • This is actually a bit of stagecraft, Firefly doesn't move at all, those are all separate actors hiding until they are called
    • The order of the stage 2 sequence is randomly determined

     Stage 3 teleport
  • Emit a flash particle and turn invisible to teleport away
    • Turn to face the player, then run straight through them very quickly
      • Emit a flash particle and reappear behind them

The designer I asked to test my initial stage 3 behavior figured out that he could stand against a wall to defeat it. That's why the final version drops a landmine at the player's feet if he reappears too close to them.

Hidden mines
Firefly is a saboteur, so, as I was planning the fight, using hidden explosives around the level seemed like a natural hook. In order to make certain the player would still be coming across mines at the end of the fight, and also to maintain a balance about how often they came across them, the mines were activated in waves.
  • There are a total of 14 hidden mines on the map, 8 are active at the start
    • Each mine that detonates sends a signal so that it will be counted
      • When 5 of the first wave have gone off, a second wave of 6 are armed
Player start point Boss actors Hidden mines (1st wave)
Timed mines Camera nodes Hidden mines (2nd wave)