UFO
Verified against the spelunky.ai port v0.1.10 on .
The UFO is a flying monster of the Ice Caves in Spelunky Classic that hovers above the player and fires a laser down at him for 3 hearts.
Level generation scatters UFOs over the Ice Caves. A UFO flies to a height above the player and patrols there until it's right over him, then fires a laser straight down, which takes 3 hearts whether or not he's invincible. It has 1 hit point, so any hit destroys it, but how matters: a thrown item blows it up at once and may knock an Alien out of it, and anything else brings it down as a burning wreck that explodes where it lands.
Behaviour
#A UFO flies up or down at 2 pixels per step (60 per second) to reach 48 pixels above the player, drifting back and forth sideways at 1 pixel per step (30 per second) as it goes [5]. Once it has reached that height, it holds it and patrols, 64 pixels to each side, turning at walls [6]. It goes back to following him up or down when he rises above it or drops more than 96 pixels below it [7]. It makes a sound the first time the player comes within 160 pixels of it [8].
When its middle passes within 8 pixels of the player's, a patrolling UFO stops and charges its gun with a sound, and up to 32 steps (about a second) later, as its animation reaches the shot, it fires a laser downward, then patrols again: if he's still under it, it charges again at once [9] [10] [11]. The clip shows a UFO coming down over the player and firing at him: the first shot takes three hearts, and the second, 40 steps later, kills him, and it goes on firing at his body [12].
The laser falls, gathering speed in surges, until it hits something. It destroys the block it hits, unless the block can't be destroyed [13]; it hurts any other monster it hits, but not a UFO, for 3 hit points [14].
A UFO only acts while it's on screen or just off it [15].
Damage
#| Way | Damage | |
|---|---|---|
| Its laser | 3 hearts, even while the player is invincible; knocks him back and stuns him for 20 steps, without making him invincible | [16] |
| Touching it, without landing on it | 1 heart, and he's knocked away and invincible for 30 steps (1 second), as with most monsters | [17] |
| Its wreck's explosion | 10, as from a Bomb's explosion, and he's thrown and stunned | [18] [19] |
Defeating
#A UFO has 1 hit point, so any of these destroys it:
| Way | What happens | |
|---|---|---|
| Whip or Machete | It becomes a falling wreck | [20] |
| Stomp (landing on it, or rising into it from below far enough) | It becomes a falling wreck | [21] |
| A thrown item moving faster than 2 pixels per step, such as a Rock | It explodes on the spot; a 1 in 3 chance of an Alien | [22] |
| A stunned monster thrown into it | It explodes on the spot; a 1 in 3 chance of an Alien | [23] |
| A Shotgun or Pistol bullet | It becomes a falling wreck | [24] |
| A Bomb's explosion | It becomes a falling wreck | [25] |
A UFO whose hit points run out turns into a wreck that falls, trailing flames, and explodes with a Bomb's explosion when it hits the ground or a monster [26] [27] [18] [28]. The clip shows the player, bounced up by a spring trap, rising into a UFO, which the game counts as landing on it; the wreck falls and blows up the spring trap below.
A thrown item or monster doesn't take its hit points: it blows the UFO up where it is, with a Bomb's explosion, and 1 time in 3 an Alien ejects from it and parachutes down [22]. The clip shows a Rock thrown up at a UFO, and the Alien that ejects.
UFOs destroyed count toward the player's kills, and the screen between levels draws a UFO icon for each [29] [30]. A UFO's step doesn't run the one most monsters share, so Spikes, Lava, Spear Traps and water don't affect it [31].
Locations
#Level generation makes UFOs only in the Ice Caves. Each block outside the starting room and the shops, with open space above it and solid ground or water in one of the two blocks below it (or in the level's bottom 64 pixels), has a 1 in 30 chance of a UFO above it, or 1 in 90 in the Yeti lair [32].
In custom levels, it's the level editor's tile U
[33].
Tips
#- A UFO fires only when it's right above the player, and its laser drops straight down, so moving sideways while it charges dodges the shot.
- Invincibility doesn't help against the laser, and a stunned player under a UFO is shot again 40 steps later.
- Bringing a UFO down any way but by throwing makes a wreck that explodes where it lands, so it's safer not to be under it.
- Only a thrown item or monster gets an Alien out of a UFO.
Trivia
#- The laser speeds up as it falls, but whenever its speed passes 4 pixels per step the code sets it back to 0, so it falls in surges [34] [35].
- A UFO destroyed by a stunned monster, thrown or knocked into it, is left out of the lifetime tally of UFOs killed, which a thrown item's hit adds it to [23] [36] [35].
FAQ
#- How much damage does a UFO's laser do in Spelunky Classic?
3 hearts. A laser shot takes 3 hearts even while the player is invincible, knocks him back and stuns him for 20 steps, and the UFO goes on firing while it's above him. Touching a UFO costs 1 heart.
- How do you kill a UFO in Spelunky Classic?
Hit it once: it has 1 hit point. A thrown item or monster blows it up on the spot; anything else, such as the Whip, a stomp or a bullet, turns it into a wreck that falls and explodes where it lands, which hurts the player like a Bomb if he's caught in it.
- Do UFOs drop aliens in Spelunky Classic?
Sometimes. A UFO destroyed by a thrown item or a thrown monster has a 1 in 3 chance of ejecting an Alien, which parachutes down. One destroyed any other way ejects none.
- Where do UFOs appear in Spelunky Classic?
In the Ice Caves, levels 9–12, the only area whose level generation makes them; the Yeti lair has fewer than the other levels.
See also
#- Related
References
#objects/oUFO/create.gml:14objects/oUFO/step.gml:40objects/oUFO/step.gml:108objects/oUFO/step.gml:26-130objects/oUFO/step.gml:81-130objects/oUFO/step.gml:26-60objects/oUFO/step.gml:68objects/oUFO/step.gml:18-24objects/oUFO/step.gml:62-66objects/oUFO/step.gml:70-80objects/oUFO/other_animation_end.gml:1-5- Clip ufo/laser
objects/oLaser/collision_oSolid.gml:1-24objects/oLaser/collision_oEnemy.gml:1-10objects/oUFO/step.gml:1-3objects/oPlayer1/step.gml:1567-1592objects/oEnemy/collision_oCharacter.gml:14-27objects/oUFOCrash/collision_oSolid.gml:1-3objects/oPlayer1/step.gml:1614-1625objects/oEnemy/collision_oWhip.gml:1objects/oEnemy/collision_oCharacter.gml:6-13objects/oItem/step.gml:331-340objects/oEnemy/step.gml:243-251objects/oBullet/collision_oEnemy.gml:16objects/oExplosion/collision_oEnemy.gml:12-19objects/oUFO/step.gml:6-16objects/oUFOCrash/step.gml:1-3objects/oUFOCrash/collision_oEnemy.gml:1-3objects/oUFO/step.gml:9-14objects/oTransition/alarm_0.gml:203-207objects/oEnemy/step.gml:34-128scripts/scrEntityGen.gml:338-360scripts/scrCreateTileObj.gml:209-212objects/oLaser/step.gml:1-3- Quirk 1 (docs/quirks.md)
objects/oItem/step.gml:336
Source code
objects/oUFO/create.gmlobjects/oUFO/step.gmlobjects/oUFO/other_animation_end.gmlobjects/oLaser/step.gmlobjects/oLaser/collision_oSolid.gmlobjects/oLaser/collision_oEnemy.gmlobjects/oUFOCrash/step.gmlobjects/oUFOCrash/collision_oSolid.gmlobjects/oUFOCrash/collision_oEnemy.gmlobjects/oEnemy/create.gmlobjects/oEnemy/collision_oCharacter.gmlobjects/oEnemy/collision_oWhip.gmlobjects/oPlayer1/step.gmlscripts/scrEntityGen.gml