Spelunky is © 2008, 2009 Derek Yu and Mossmouth, LLC, and is used under the [Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt). spelunky.ai is an unofficial fan project, not affiliated with or endorsed by Mossmouth. The game and its assets may not be sold.

Music by George Buzinkai and Jonathan Perry; sound effects made in SFXR. From Spelunky Classic 1.1, © 2008, 2009 Derek Yu and Mossmouth, LLC.

# Water

From the spelunky.ai wiki: <https://spelunky.ai/wiki/water>.

*For the liquid that burns, see [Lava](https://spelunky.ai/wiki/lava).*

Water is terrain in Spelunky Classic, the pools and lakes of the Jungle, that the player swims in, slowing his falls and breaking any fall's damage.

![A block of dark green water, its surface a line of small waves](https://spelunky.ai/wiki/media/sprites/sWaterTop/frames/0%404x.png)

| Water        |                                                                                                                                                               |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Effect       | Slows falls; ends a fall's damage[^1]                                                                                                                         |
| Destroyed by | Drains out of a broken pool[^2]                                                                                                                               |
| Objects      | `oWater`, `oWaterSwim`, `oSplash`, `oBubble`                                                                                                                  |
| Found in     | [The Jungle](https://spelunky.ai/wiki/jungle), [Black Market](https://spelunky.ai/wiki/black-market), [Flooded level](https://spelunky.ai/wiki/flooded-level) |

Water fills pools in [the Jungle](https://spelunky.ai/wiki/jungle)'s rooms and [the Black Market](https://spelunky.ai/wiki/black-market)'s, and the lake of a
[flooded level](https://spelunky.ai/wiki/flooded-level). The player swims in it: it slows his falls, ends a fall without its damage, and
lets him kick up toward the surface. Some monsters change in it, and some only hunt a player who's in it.
[Lava](https://spelunky.ai/wiki/lava) is, to the code, a kind of water too, but what it does is its own page's.

## How it works

**Clip: Falling into water.** The player walks off a high ledge and falls into a pool, landing unhurt after a fall long enough to hurt him on dry ground; he walks along the bottom, breathing out bubbles, then kicks up to the surface and climbs out onto the bank. ([video](https://spelunky.ai/wiki/media/clips/water/swim/clip.mp4))

The clip shows a fall into a pool: the player walks off a ledge high above it, and has been falling for more
than the 16 steps that would hurt and stun him on landing, when he goes into the water unhurt. He walks along
the bottom, breathing out bubbles, then kicks up to the surface and climbs out[^3].

### Going in

When the middle of the player goes into water, it splashes, and from then on he's swimming[^4]. A [Cape](https://spelunky.ai/wiki/cape) closes in water[^5].

### Falling and sinking

While he's swimming, a fall doesn't count: the time he has been falling goes back to nothing each step, so a
fall into water never ends in a long drop's stun or lost hearts, however far he came[^6][^7]. Sinking, he
keeps only half his falling speed each step, where in the air he keeps all of it; otherwise, with his head
under, he keeps 0.9 of his speed up or down[^8]. He walks along the bottom as on any
floor. While he swims, he breathes out a bubble each time a timer of 20 steps runs out,
and the step it's set again on makes that one every 21 steps; a bubble rises until it leaves the water[^9][^10].

### Swimming up

The jump key kicks the player up whenever there's water just above his head, on the bottom or not: a jump's
push, as on the ground, and 3 pixels per step more speed upward besides[^11][^12][^13]. Without water above his head, the key works as on land:
a jump if he's standing on the bottom, no kick if he's afloat with his head out. So a player rises by kicking
from just under the surface, and the last kick carries him out onto a bank, as in the clip. Out of the water, he stops swimming[^14].

### Draining

Water stays where it is until a block around it is destroyed. Then, each step, every block of water that has
empty space, nothing solid and no water, to its left, to its right or below it goes, dripping, until none does: a pool whose
side or floor is blown open drains out through the hole[^15][^16][^17]. Water never
flows anywhere: it only goes.

## Locations

Level generation makes water from the [Jungle](https://spelunky.ai/wiki/jungle)'s room tiles:

| Tile                   | What it makes                                                                               |       |
| ---------------------- | ------------------------------------------------------------------------------------------- | ----- |
| Water                  | Water                                                                                       | [^18] |
| Water or earth         | Water or Jungle earth, even odds                                                            | [^19] |
| Chest in water         | Water, with a [Chest](https://spelunky.ai/wiki/chest) in it                                 | [^20] |
| A flooded level's lake | Water, under earth on some tiles, and the [Megamouth](https://spelunky.ai/wiki/megamouth)'s | [^21] |

[The Black Market](https://spelunky.ai/wiki/black-market)'s rooms have the same tiles[^22][^23]. In custom levels water is the
[level editor](https://spelunky.ai/wiki/level-editor)'s tile `w`[^24].

## Interactions

- **Fish.** Each block of water outside a block of earth gets a [Piranha](https://spelunky.ai/wiki/piranha) with a 1 in
  30 chance, or on a graveyard level a [Dead Fish](https://spelunky.ai/wiki/dead-fish)[^25]. Both go after a player who's swimming, and only then[^26][^27].
- **[Bats](https://spelunky.ai/wiki/bat)** don't wake for, or chase, a player who's swimming[^28].
- **Stomping.** The stomp check most monsters share needs a player who isn't swimming, so landing on a monster
  in water doesn't stomp it[^29].
- **Monsters in water** splash and fall at a third of their gravity, 0.2 rather than 0.6, in the code most
  monsters share[^30], and a [Fire Frog](https://spelunky.ai/wiki/fire-frog) that goes in turns into an ordinary [Frog](https://spelunky.ai/wiki/frog)[^31].
- **Rubble** slows in water, and a drip of water ends in it[^32].

## Tips

- A drop into water is safe from any height: a pool at the foot of a long shaft is a way down without losing
  hearts.
- Getting out takes a bank no higher than a jump from the surface; from the bottom, kicks bring the player up
  to it first.
- Swimming keeps [Bats](https://spelunky.ai/wiki/bat) off, but draws [Piranhas](https://spelunky.ai/wiki/piranha).

## Trivia

- Only water in the top 512 pixels of a level drains, except in a custom level, and none drains in
  [Olmec's Lair](https://spelunky.ai/wiki/olmecs-lair)[^33]. A safety count stops the draining
  after 100,000 blocks have been looked at[^34].
- Every block of water is set up with the type "Water", which the draining code reads to tell it from lava's[^35][^36].

## FAQ

### Does water break your fall in Spelunky Classic?

Yes. While the player is in water, his fall doesn't count, so landing in a pool from any height costs no hearts and doesn't stun him, and the water slows his fall as he sinks.

### How do you swim up in Spelunky Classic?

With the jump key, while there's water just above the player's head: each press kicks him up, standing on the bottom or not. With his head out, the key gives no kick, so he climbs out on a kick from just under the surface.

### Can you stomp monsters underwater in Spelunky Classic?

No. The stomp checks most monsters share don't count a player who's swimming, so landing on a monster in water doesn't hurt it.

### What lives in the water in Spelunky Classic?

[Piranhas](https://spelunky.ai/wiki/piranha), made in a block of water with a 1 in 30 chance, which attack only a swimming player; [Dead Fish](https://spelunky.ai/wiki/dead-fish) in their place on a graveyard level; and, in a flooded level's lake, the [Megamouth](https://spelunky.ai/wiki/megamouth).

## See also

- **Related:** [Piranha](https://spelunky.ai/wiki/piranha), [Dead Fish](https://spelunky.ai/wiki/dead-fish), [Megamouth](https://spelunky.ai/wiki/megamouth), [Lava](https://spelunky.ai/wiki/lava), [Flooded level](https://spelunky.ai/wiki/flooded-level)

## References

[^1]: [`objects/oPlayer1/step.gml:302-311`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L302-L311)

[^2]: [`objects/oGame/step.gml:88-94`](https://spelunky.ai/wiki/source/objects/oGame/step#L88-L94)

[^3]: Clip [water/swim](https://spelunky.ai/wiki/water#clip-water-swim)

[^4]: [`objects/oPlayer1/step.gml:177-186`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L177-L186)

[^5]: [`scripts/characterStepEvent.gml:750-752`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L750-L752)

[^6]: [`objects/oPlayer1/step.gml:302-304`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L302-L304)

[^7]: [`objects/oPlayer1/step.gml:268-289`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L268-L289)

[^8]: [`scripts/characterStepEvent.gml:750-771`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L750-L771)

[^9]: [`objects/oPlayer1/step.gml:305-310`](https://spelunky.ai/wiki/source/objects/oPlayer1/step#L305-L310)

[^10]: [`objects/oBubble/step.gml:1-6`](https://spelunky.ai/wiki/source/objects/oBubble/step#L1-L6)

[^11]: [`scripts/characterStepEvent.gml:308-319`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L308-L319)

[^12]: [`scripts/characterStepEvent.gml:338-342`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L338-L342)

[^13]: [`scripts/isCollisionWaterTop.gml:6-9`](https://spelunky.ai/wiki/source/scripts/isCollisionWaterTop#L6-L9)

[^14]: [`scripts/characterStepEvent.gml:767-771`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L767-L771)

[^15]: [`objects/oSolid/destroy.gml:35`](https://spelunky.ai/wiki/source/objects/oSolid/destroy#L35)

[^16]: [`objects/oGame/step.gml:49-104`](https://spelunky.ai/wiki/source/objects/oGame/step#L49-L104)

[^17]: [`objects/oWaterSwim/destroy.gml:1-4`](https://spelunky.ai/wiki/source/objects/oWaterSwim/destroy#L1-L4)

[^18]: [`scripts/scrRoomGen2.gml:376-379`](https://spelunky.ai/wiki/source/scripts/scrRoomGen2#L376-L379)

[^19]: [`scripts/scrRoomGen2.gml:344-348`](https://spelunky.ai/wiki/source/scripts/scrRoomGen2#L344-L348)

[^20]: [`scripts/scrRoomGen2.gml:371-375`](https://spelunky.ai/wiki/source/scripts/scrRoomGen2#L371-L375)

[^21]: [`scripts/scrRoomGen2.gml:380-394`](https://spelunky.ai/wiki/source/scripts/scrRoomGen2#L380-L394)

[^22]: [`scripts/scrRoomGenMarket.gml:257-260`](https://spelunky.ai/wiki/source/scripts/scrRoomGenMarket#L257-L260)

[^23]: [`scripts/scrRoomGenMarket.gml:285-294`](https://spelunky.ai/wiki/source/scripts/scrRoomGenMarket#L285-L294)

[^24]: [`scripts/scrCreateTileObj.gml:46-49`](https://spelunky.ai/wiki/source/scripts/scrCreateTileObj#L46-L49)

[^25]: [`scripts/scrEntityGen.gml:326-335`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L326-L335)

[^26]: [`objects/oPiranha/step.gml:32`](https://spelunky.ai/wiki/source/objects/oPiranha/step#L32)

[^27]: [`objects/oDeadFish/step.gml:52`](https://spelunky.ai/wiki/source/objects/oDeadFish/step#L52)

[^28]: [`objects/oBat/step.gml:23-36`](https://spelunky.ai/wiki/source/objects/oBat/step#L23-L36)

[^29]: [`objects/oEnemy/collision_oCharacter.gml:6`](https://spelunky.ai/wiki/source/objects/oEnemy/collision_oCharacter#L6)

[^30]: [`objects/oEnemy/create.gml:17-18`](https://spelunky.ai/wiki/source/objects/oEnemy/create#L17-L18)

[^31]: [`objects/oEnemy/step.gml:34-53`](https://spelunky.ai/wiki/source/objects/oEnemy/step#L34-L53)

[^32]: [`objects/oRubblePiece/step.gml:5-10`](https://spelunky.ai/wiki/source/objects/oRubblePiece/step#L5-L10)

[^33]: [`objects/oGame/step.gml:55-57`](https://spelunky.ai/wiki/source/objects/oGame/step#L55-L57)

[^34]: [`objects/oGame/step.gml:96-97`](https://spelunky.ai/wiki/source/objects/oGame/step#L96-L97)

[^35]: [`objects/oWater/create.gml:3`](https://spelunky.ai/wiki/source/objects/oWater/create#L3)

[^36]: [`objects/oGame/step.gml:62-66`](https://spelunky.ai/wiki/source/objects/oGame/step#L62-L66)

### Source code

- [`objects/oWater/create.gml`](https://spelunky.ai/wiki/source/objects/oWater/create)
- [`objects/oWaterSwim/destroy.gml`](https://spelunky.ai/wiki/source/objects/oWaterSwim/destroy)
- [`objects/oPlayer1/step.gml`](https://spelunky.ai/wiki/source/objects/oPlayer1/step)
- [`scripts/characterStepEvent.gml`](https://spelunky.ai/wiki/source/scripts/characterStepEvent)
- [`scripts/isCollisionWaterTop.gml`](https://spelunky.ai/wiki/source/scripts/isCollisionWaterTop)
- [`objects/oGame/step.gml`](https://spelunky.ai/wiki/source/objects/oGame/step)
- [`objects/oEnemy/step.gml`](https://spelunky.ai/wiki/source/objects/oEnemy/step)
- [`scripts/scrRoomGen2.gml`](https://spelunky.ai/wiki/source/scripts/scrRoomGen2)
- [`scripts/scrEntityGen.gml`](https://spelunky.ai/wiki/source/scripts/scrEntityGen)
