the cutting room mirror

Unused Code

This is a sub-page of Angry Birds.

To do:

  • Everything.
    • prototyping folder scripts:
      • Mud
      • TNTBird
      • WheelOfFortune
    • Unused blocks listed in blocks.lua.
      • Also document unused sticky block and plasma ball block scripts.

Legacy Localization Format Support#

Later revisions of the KA3D/Fusion engine read a newer named binary chunk format, but the logic remains to load content using the legacy headerless format, simply downgrading the newer format to it will still load in the game. It's likely here to aid localizers for porting text from primitive releases. The only real differences of it aside from the lack of block headers are the beginning starting with a byte, amount of languages being read as a byte instead of a short and a list of integer offsets to text groups per language with them coming afterwards.

Bundle Index Loading#

Versions v1.0.0 to v2.2.0 have code for loading a file in the data path called bundleIndex.idx. The code is always executed on booting up those releases but never used as no file was present, which causes an alternative boot sequence to load raw content that was the standard for all releases and eventually ensured for later releases. The game would load the index file and use it to locate files in a given binary file per entry. The format of a file entry is listed below. This format was used in Bounce Boing Battle so it was probably carried from that.

*.bin,filelocation,offset,size\n

Endless KA3D Binary Chunk Parsing Behavior#

The KA3D/Fusion engine is programmed to read as many binary data base chunks ("TEXT", "SPRT", "COMP" or "FONT") in a file past the KA3D binary header until the end of it is reached according to the header.

Data files normally contain only one of those base chunks, so this was never used normally yet can be used with little effort, suggesting the format might've originally consisted of multiple chunks or a strange programming choice was made to make chunks readable multiple times. This is really only useful for composites as text only gets inserted per single chunk.

CompoSprite V2 Reference Points#

Sprites in version 2 of the CompoSprite binary format supports reference points but all files set it to 0 in each sprite entry and no code actually references what is being read. They consist of the following format but has no effect as the game never actually uses these values.

UTFString
Short
Short

Angry Birds Seasons Leftovers#

Due to Classic and Seasons using the same engine base, there is a sizeable amount of leftover code and native functions from Angry Birds Seasons. Some notable leftovers include several effects used in the level backgrounds of the Haunted Hogs and Winter Wonderham episodes, code for the firework blocks in Year of the Dragon as well as the portals seen in Abra-Ca-Bacon, and much more.

Bird Particle Trails#

Leftover code for feather particle trails that the birds would emit while flying remains in multiple files, specifically blocks.lua and particles.lua. Version 1.6.3's gamelogic file contains some commented out code in the "trajectory" section in function updateGame(dt, time) that would spawn these particles while the bird is flying.

-- if getObjectDefinition(flyingBird.name).particlesTrail ~= nil then
    -- addParticles(flyingBird.name, getObjectDefinition(flyingBird.name).particlesTrail, 1)
-- end

facebookBoomerangMode#

Normal Boomerang Ability

With facebookBoomerangMode Enabled

AngryBirds_BoomerangAbility_Normal.mp4
AngryBirds_BoomerangAbility_facebookBoomerangMode.mp4

A togglable variable that alters the physics of the boomerang ability to function like how it does in webgames such as Chrome and the Flash version of Friends (hence the name of the variable). Despite being undefined in Hal's code in blocks.lua by default, simply adding the variable to his code and setting it to true will activate this behavior.

animations.lua#

To do:

  • Find a way to import this into the game.

Present in versions 1.0 - 1.6.3 is a completely unused file called animations.lua, which seems to contain an early intro cutscene. Judging by the code in the introAnimation table, it seems it would've involved the birds getting angry at a pig who sneezed on one of them. This theory is confirmed by Jaakko Iisalo.

introAnimation = {
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_1"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_2"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_1"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_2"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_1"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_2"}},

    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_1", "BIRD_FLYING_1"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_2", "BIRD_FLYING_2"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_1", "BIRD_FLYING_3"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_2", "BIRD_FLYING_4"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_1", "BIRD_FLYING_5"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SLEEP_2", "BIRD_FLYING_6"}},

    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_OK", "BIRD_NORMAL_1"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZE_1", "BIRD_NORMAL_1"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZE_2", "BIRD_FLIP_1"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZE_2", "BIRD_FLIP_2"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZED_1", "BIRD_FLIP_3"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZED_1", "BIRD_FLIP_4"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZED_1", "BIRD_FLIP_5"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZED_1", "BIRD_GROUND"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZED_1", "BIRD_GROUND", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_1", "PIGLETTE_SNEEZED_1", "BIRD_NORMAL_2"}},

    {time = 0.33, sprites = { "BEGINNING_BG_2", "PIGLETTE_SNEEZED_2", "BIRD_NORMAL_3"}},
    {time = 0.33, sprites = { "BEGINNING_BG_3", "BIRD_NORMAL_4", "CUTSCENE_YELLOW_BIRD_2"}},

    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_1"}},

    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_GROUND_TALK", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_1"}, "SWEARING"},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_GROUND_TALK", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},

    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_TALK", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_TALK", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_TALK", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_TALK", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_TALK", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_TALK", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_TALK", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_TALK", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_TALK", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_TALK", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_TALK", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_TALK", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_TALK", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_TALK", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_TALK", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_TALK", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_TALK", "CUTSCENE_BLACK_BIRD_1", "CUTSCENE_RED_BIRD_TALK", "CUTSCENE_GREEN_BIRD_1", "SWEARING"}},
    {time = 0.33, sprites = { "BEGINNING_BG_4", "BIRD_NORMAL_5", "CUTSCENE_YELLOW_BIRD_1", "CUTSCENE_BLACK_BIRD_TALK", "CUTSCENE_RED_BIRD_1", "CUTSCENE_GREEN_BIRD_TALK", "SWEARING"}},
}

birdAnimations = {
    blueBird = {
        time = 0.5,
        delayToNextAnimation = 4,
        frames = {},
    },
}filename="animations.lua"

Strangely, while this script was eventually removed in v2.0.0, it would somehow manage to make its way into the files of later entries to the franchise, such as Seasons, Rio, and Space.

Leftover "kingOfTheHill" and "train" Text#

The init function for OverlayPage.lua, a script used by the level editor when applying a joint to two selected blocks, contains some leftover text for "kingOfTheHill" and "train", which were two unused minigames that were found in Angry Birds Rio's code.

function OverlayPage:init()
  self:insertItem("shade", RectItem:new({alpha = 0}))
  self:insertItem("kingText", TextItem:new({
    default = "Pigs popped: ",
    text = "Pigs popped: ",
    x = screenWidth / 2,
    y = screenHeight / 2,
    visible = false
  }))
  self:insertItem("trainText", TextItem:new({
    default = "Carts wrecked: ",
    text = "Carts Wrecked: ",
    x = screenWidth / 2,
    y = screenHeight / 2,
    visible = false
  }))
  self:insertItem("again", TextItem:new({
    text = "Try again",
    x = screenWidth / 2,
    y = screenHeight / 2 + 0.15625 * screenHeight,
    visible = false,
    action = {
      [function(x)
        sm:changeScene(x)
      end] = "kingOfTheHill"
    }
  }))
  self:insertItem("quit", TextItem:new({
    text = "Quit",
    x = screenWidth / 2,
    y = screenHeight / 2 + 0.25 * screenHeight,
    visible = false,
    action = {
      [function(x)
        sm:changeScene(x)
      end] = "mainMenu"
    }
  }))
end

"prototyping" Folder#

This needs some investigation.
Discuss ideas and findings on the talk page.
Specifically: It's possible that the reason why PigFeeder and StellaRescue crash is because it's trying to call the addScore function, which is not present in either script's code. Try copying over the addScore function from BubblesAndBalloons.lua to both of these scripts and see if it fixes the crashes.

Starting from version 4.1.0, a folder labelled prototyping was added to the scripts/subsystems directory in the game's files. This folder contains multiple scripts for what appear to be different minigames and test mechanics, each with their own unique functionality.

BubblesAndBalloons#

AngryBirds_iOS_BubblesAndBalloons_Minigame.mp4

A short minigame where you control a deflating Bubbles in the air, while Pigs and blocks attached to balloons descend from the top of the screen. Due to being unfinished, the game crashes once Bubbles has fully deflated.

ChuckSpeed#

A variant of Chuck's ability which would made him move in a straight line while leaving a long particle trail behind, instead of simply increasing his velocity.

Demolisher#

A minigame set in the levels of the "Mine and Dine" episode, where you place 5 TNT blocks in a level. After the player finishes placing the TNT blocks, they explode.

KnockBox#

A script for an unused block that was likely a port of the punching glove box from Bad Piggies. Since this script calls for EggDefenderUtils.lua to be loaded in, it's possible that this was intended to be used in Red's Mighty Feathers levels.

LevelTransition#

A strange-looking transition between Mine and Dine levels which has the blocks flying offscreen and back. This script was most likely intended for testing purposes.

PigFeeder#

AngryBirds_iOS_PigFeeder_Minigame.mp4

Another minigame where you control a Minion Pig trying to collect food and avoid TNT blocks. With the more food you collect, the bigger the pig will get and be harder to control. Normally, the game crashes if the pig touches any of the objects, mainly due to the fact that the addScore function is not present in the minigame's code despite having calls for it.

Raycast#

An strange script which only contains a call to add an update function called raycastUpdate. When this function is triggered, the cursor becomes an amber or ruby particle. It's unknown what this would've been intended for.

StellaRescue#

To do:
Add footage for this, if possible.

Yet another short minigame, this time centered around Stella. According to the code, this minigame would've had you trying to save birds that fly across the screen by trapping them in bubbles, while also trying to avoid pigs that fly across the screen as well. If you tap a pig, you'll lose a life (lives are represented by one of Shockwave Bomb's unused sprites, which is most likely a placeholder).

Wind#

A duplicate of the PigFeeder script with the only notable difference being a call for a native function named _G.native.UniformBSplineManager.drawWind in the function startWind(). It's possible that this could've been intended as a harder difficulty to PigFeeder.

(Source: Original TCRF research)