async function start() {
  await sleep(2_000)
  clearText()
  
  addText("FIRST Robotics is a", {
    x: 1,
    y: 10,
    color: color`0`
  })
  addText("youth STEM org that", {
    x: 1,
    y: 11,
    color: color`0`
  })
  addText("inspires children", {
    x: 1,
    y: 12,
    color: color`0`
  })
  addText("of all ages to", {
    x: 1,
    y: 13,
    color: color`0`
  })
  addText("build and program", {
    x: 1,
    y: 14,
    color: color`0`
  })
  addText("ROBOTS!", {
    x: 1,
    y: 15,
    color: color`7`
  });

  await sleep(8_000)
  clearText()

  addText("FRC is a divison of", {
    x: 1,
    y: 10,
    color: color`0`
  })
  addText("High Schoolers, and", {
    x: 1,
    y: 11,
    color: color`0`
  })
  addText("has more complex", {
    x: 1,
    y: 12,
    color: color`0`
  })
  addText("game mechanics.", {
    x: 1,
    y: 13,
    color: color`0`
  })

  await sleep(4_000)
  clearText()

  addText("Now, let's begin!", {
    x: 2,
    y: 12,
    color: color`5`
  })

  await sleep(1_000)
  getFirst(npc[1]).y += 1
  getFirst(npc[2]).y -= 1
  getFirst(npc[0]).y += 1
  await sleep(250)
  getFirst(npc[1]).y -= 1
  getFirst(npc[2]).y += 1
  getFirst(npc[0]).y -= 1
  await sleep(250)
  getFirst(npc[1]).y -= 1
  getFirst(npc[2]).y += 1
  getFirst(npc[0]).y -= 1
  await sleep(250)
  getFirst(npc[1]).y += 1
  getFirst(npc[2]).y -= 1
  getFirst(npc[0]).y += 1

  playTune(tune`
400: A5^400,
400: A5^400,
400: A5^400,
11600`)
  await sleep(500)
  clearText()
  setMap(maps.introduceKilroy)

  addText("Who's here?", {
    x: 5,
    y: 10,
    color: color`9`
  })
  await sleep(1000)
  clearText()
  addText("KILROY IS HERE!!!", {
    x: 2,
    y: 10,
    color: color`9`
  })
  getFirst(player[0]).y -= 1
  getFirst(player[1]).y -= 1
  getFirst(player[2]).y -= 1
  getFirst(player[3]).y -= 1
  await sleep(250)
  getFirst(player[2]).y += 1
  getFirst(player[3]).y += 1
  getFirst(player[0]).y += 1
  getFirst(player[1]).y += 1
  await sleep(250)
  getFirst(player[0]).y -= 1
  getFirst(player[1]).y -= 1
  getFirst(player[2]).y -= 1
  getFirst(player[3]).y -= 1
  await sleep(250)
  getFirst(player[2]).y += 1
  getFirst(player[3]).y += 1
  getFirst(player[0]).y += 1
  getFirst(player[1]).y += 1
  
  await sleep(1_000)
  clearText()
  setMap(maps.movingRobotIn)

  addText("Student 1:", {
    x: 1,
    y: 1
  })
  addText("Are you guys ready?", {
    x: 1,
    y: 2
  })
  await sleep(750)
  getFirst(robot).x -= 1
  getFirst(npc[2]).x -= 1
  getFirst(npc[1]).x -= 1
  getFirst(npc[0]).x -= 1
  getFirst(player[0]).x -= 1
  getFirst(player[2]).x -= 1
  getFirst(player[1]).x -= 1
  getFirst(player[3]).x -= 1

  await sleep(750)
  getFirst(robot).x -= 1
  getFirst(npc[2]).x -= 1
  getFirst(npc[1]).x -= 1
  getFirst(npc[0]).x -= 1
  getFirst(player[0]).x -= 1
  getFirst(player[2]).x -= 1
  getFirst(player[1]).x -= 1
  getFirst(player[3]).x -= 1

  clearText()
  addText("Student 2:", {
    x: 1,
    y: 1
  })
  addText("Heck yeah!", {
    x: 1,
    y: 2
  })

  await sleep(750)
  getFirst(robot).x -= 1
  getFirst(npc[2]).x -= 1
  getFirst(npc[1]).x -= 1
  getFirst(npc[0]).x -= 1
  getFirst(player[0]).x -= 1
  getFirst(player[2]).x -= 1
  getFirst(player[1]).x -= 1
  getFirst(player[3]).x -= 1

  await sleep(750)
  getFirst(robot).x -= 1
  getFirst(npc[2]).x -= 1
  getFirst(npc[1]).x -= 1
  getFirst(npc[0]).x -= 1
  getFirst(player[0]).x -= 1
  getFirst(player[2]).x -= 1
  getFirst(player[1]).x -= 1
  getFirst(player[3]).x -= 1

  // Some horrible tune
  playTune(tune`
61.224489795918366,
61.224489795918366: E4/61.224489795918366 + F4/61.224489795918366 + G4/61.224489795918366 + A4/61.224489795918366 + D4~61.224489795918366,
61.224489795918366: A4/61.224489795918366 + B4/61.224489795918366 + G4/61.224489795918366 + F4/61.224489795918366 + E4/61.224489795918366,
61.224489795918366: E4/61.224489795918366 + F4/61.224489795918366 + G4/61.224489795918366 + A4/61.224489795918366 + B4/61.224489795918366,
61.224489795918366: G4/61.224489795918366 + A4/61.224489795918366 + B4/61.224489795918366 + C5/61.224489795918366 + D4~61.224489795918366,
61.224489795918366: B4/61.224489795918366 + A4/61.224489795918366 + C5/61.224489795918366 + D5/61.224489795918366 + E5/61.224489795918366,
61.224489795918366: E5/61.224489795918366 + F5/61.224489795918366 + D5/61.224489795918366 + F4~61.224489795918366 + G4~61.224489795918366,
61.224489795918366: E5/61.224489795918366 + D5/61.224489795918366 + C5/61.224489795918366 + F5/61.224489795918366 + G5/61.224489795918366,
1469.3877551020407`)
  getFirst(robot).type = brokenRobot
  phase = "II"
  await sleep(1000)

  clearText()
  addText("...", {
    x: 1,
    y: 1
  })

  await sleep(2_000)

  clearText()
  addText("Student 3:", {
    x: 1,
    y: 1
  })
  addText("What was that...", {
    x: 1,
    y: 2
  })

  await sleep(2_000)

  clearText()
  addText("Student 2:", {
    x: 1,
    y: 1
  })
  addText("A bolt fell off!", {
    x: 1,
    y: 2
  })

  await sleep(2_000)

  clearText()
  addText("Student 3:", {
    x: 1,
    y: 1
  })
  addText("Uh oh....what now??", {
    x: 1,
    y: 2
  })

  await sleep(2_750)

  clearText()
  addText("Student 1:", {
    x: 1,
    y: 1
  })
  addText("We need to get a", {
    x: 1,
    y: 2
  })
  await sleep(1_000)
  clearText()
  addText("new bolt. AND FAST!", {
    x: 1,
    y: 1
  })

  await sleep(2_000)
  clearText()
  addText("Kilroy:", {
    x: 1,
    y: 1
  })
  addText("I'm on it!", {
    x: 1,
    y: 2
  })

  await sleep(1_000)
  getFirst(player[1]).x += 1
  getFirst(player[3]).x += 1
  getFirst(player[0]).x += 1
  getFirst(player[2]).x += 1

  await sleep(500)
  getFirst(player[1]).x += 1
  getFirst(player[3]).x += 1
  getFirst(player[0]).x += 1
  getFirst(player[2]).x += 1

  await sleep(500)
  getFirst(player[1]).x += 1
  getFirst(player[3]).x += 1
  getFirst(player[0]).x += 1
  getFirst(player[2]).x += 1

  await sleep(500)
  getFirst(player[1]).x += 1
  getFirst(player[3]).x += 1
  getFirst(player[0]).x += 1
  getFirst(player[2]).x += 1

  await sleep(500)
  clearTile(getFirst(player[1]).x, getFirst(player[1]).y)
  clearTile(getFirst(player[3]).x, getFirst(player[3]).y)
  getFirst(player[0]).x += 1
  getFirst(player[2]).x += 1

  await sleep(500)
  clearTile(getFirst(player[0]).x, getFirst(player[0]).y)
  clearTile(getFirst(player[2]).x, getFirst(player[2]).y)

  await sleep(750)
  clearText()
  setMap(maps.blankIntermission)
  addText("30 seconds and one", {
    x: 1,
    y: 5,
    color: color`2`
  })
  addText("count of being told", {
    x: 1,
    y: 6,
    color: color`2`
  })
  addText("\"UNSAFE\" as you run", {
    x: 1,
    y: 7,
    color: color`2`
  })
  addText("in the pits later", {
    x: 1,
    y: 8,
    color: color`2`
  })

  await sleep(3_000)
  clearText()
  setMap(maps.pickADrawer)
  phase = "III"
  addText("Look for the right", {
    x: 1,
    y: 13,
    color: color`0`
  })
  addText("drawer and press K", {
    x: 1,
    y: 14,
    color: color`0`
  })
}
@title: Kilroy Saves the Game!
@description: "Kilroy Saves the Game!" is a puzzle adventure game where the player assists Kilroy in retrieving a replacement bolt to fix a broken robot. As part of a high school robotics team, the challenge involves navigating through various puzzles and tasks to locate the correct drawer with the bolt.
@author: Jacob Fisher
@tags: []
@addedOn: 2024-07-08