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.

# Tree

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

A Tree is terrain in Spelunky Classic, a trunk with branches and leaves in the Jungle and the Temple, which the player can hang from without Climbing Gloves.

![The leafy green crown of a tree, its leaves hanging in clusters](https://spelunky.ai/wiki/media/sprites/sTreeTop/frames/0%404x.png)

| Tree         |                                                                                                                                                     |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Effect       | Hung from and climbed; its branches stood on[^1]                                                                                                    |
| Destroyed by | Breaking the block under it                                                                                                                         |
| Objects      | `oTree`, `oLeaves`, `oTreeBranch`, `oTreeTile`, `oLeavesTile`, `oTreeBranchTile`                                                                    |
| Found in     | [The Jungle](https://spelunky.ai/wiki/jungle), [The Temple](https://spelunky.ai/wiki/temple), [Black Market](https://spelunky.ai/wiki/black-market) |

Trees grow from the floor of [the Jungle](https://spelunky.ai/wiki/jungle)'s rooms, [the Black Market](https://spelunky.ai/wiki/black-market)'s and
[the Temple](https://spelunky.ai/wiki/temple)'s: a trunk a few blocks tall, branches off its sides and two leaves beside its top. The
trunk is solid; the branches and leaves are platforms. A tree stands only as long as what's under it does.

## How it works

**Clip: Climbing a tree.** The player walks to a tree and jumps at its trunk, catching hold of its side without Climbing Gloves; each jump from there takes him a block higher up the trunk, until he hangs just under its leaves. ([video](https://spelunky.ai/wiki/media/clips/tree/climb/clip.mp4))

### The trunk

A trunk block is solid, as rock is[^2]. A player jumping or falling past
its side, pressing toward it, catches hold of it and hangs there, at any height and without
[Climbing Gloves](https://spelunky.ai/wiki/climbing-gloves): unlike a ledge, the trunk doesn't need open space above the spot he
catches[^1][^3].
Each jump from the hang takes him up the trunk by a block, and he catches hold again. The clip shows it: the
player jumps at a trunk, catches it, and climbs it a block at a jump, to just under its leaves[^4].

### Branches and leaves

Branches and leaves are platforms: the player stands on them, jumps up through them from below, and drops
through them by pressing down[^5]. A branch with leaves right
above it is removed as the level is set up[^6].

### Falling

Each step a tree is in the view, a trunk block with nothing solid under it is destroyed, so breaking the block a
tree stands on, or its lowest trunk block, brings the trunk down, a block or more a step: in the second clip
four trunk blocks go in two steps. A branch with no trunk beside it goes, and so do leaves with nothing to hold
them[^7][^8][^9]. The second clip shows a [Bomb](https://spelunky.ai/wiki/bomb) at a tree's foot taking the
whole tree[^10].

**Clip: Felling a tree.** On a graveyard level of the Jungle, the player throws a bomb up to the foot of a dead tree and walks away. The blast breaks the earth and the trunk's lowest block, and the rest of the tree, its branches and its dead leaves go with it. ([video](https://spelunky.ai/wiki/media/clips/tree/felled/clip.mp4))

A trunk block breaks into rubble, and living leaves and branches into falling
leaves[^11][^12][^13].

## Locations

A room template's tree tile grows a tree: a trunk block on the tile and up to five more above it, the first
three always, the fourth unless a 1 in 4 roll stops it and the fifth unless a 2 in 5 one does, growth stopping
under anything solid. The second to the fifth trunk blocks have a 3 in 5 chance of a branch on each side, never
on the same side as the block below's, and the top block gets leaves on both sides[^14].

| Where                                                     |                |       |
| --------------------------------------------------------- | -------------- | ----- |
| [The Jungle](https://spelunky.ai/wiki/jungle)             | Its tree tiles | [^14] |
| [The Black Market](https://spelunky.ai/wiki/black-market) | As the Jungle  | [^15] |
| [The Temple](https://spelunky.ai/wiki/temple)             | As the Jungle  | [^16] |

On a [graveyard level](https://spelunky.ai/wiki/restless-dead), the leaves and branches are dead, and the top of the trunk with
them[^17][^18][^19]. In custom levels a tree is built by hand from the
[level editor](https://spelunky.ai/wiki/level-editor)'s tiles: `|` a trunk block, `x` its top, `)` leaves and `q` a branch[^20].

## Interactions

- **No traps in trees.** As a Jungle level is made, the roll that turns a block into a
  [Spear Trap](https://spelunky.ai/wiki/spear-trap), or stands a [Tiki Torch](https://spelunky.ai/wiki/tiki-torch) on it, skips trunk blocks[^21].
- **[Climbing Gloves](https://spelunky.ai/wiki/climbing-gloves)** add nothing here: with them, a falling player catches any wall, a
  trunk among them, and rising he still catches a trunk by its own rule[^22].

## Tips

- A trunk is a way up without a rope: catch its side and jump, a block at a time.
- A Bomb at a tree's foot clears the whole tree, branches, leaves and all.

## Trivia

- A trunk block is set up with a `burning` flag that nothing reads[^23].
- The level editor draws its trees with objects of their own, which do nothing but look like a tree; the
  code that would have let them fall is commented out[^24][^25].

## FAQ

### Can you climb trees in Spelunky Classic?

Yes. The player can catch hold of a tree's trunk from the side at any height, without [Climbing Gloves](https://spelunky.ai/wiki/climbing-gloves), and each jump from there takes him a block higher. Its branches and leaves are platforms to stand on.

### How do you cut down a tree in Spelunky Classic?

By breaking the block it stands on, or its lowest trunk block: a trunk block with nothing solid under it is destroyed, so the whole tree goes within a step or two, its branches and leaves with it.

### Why are the trees dead in some Jungle levels?

On a [graveyard level](https://spelunky.ai/wiki/restless-dead), the trees' leaves and branches are drawn dead. Nothing else about them changes.

## See also

- **Related:** [Climbing Gloves](https://spelunky.ai/wiki/climbing-gloves), [Vine](https://spelunky.ai/wiki/vine), [Graveyard level](https://spelunky.ai/wiki/restless-dead)

## References

[^1]: [`scripts/characterStepEvent.gml:423-440`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L423-L440)

[^2]: [`objects/oTree/create.gml:1-3`](https://spelunky.ai/wiki/source/objects/oTree/create#L1-L3)

[^3]: [`scripts/characterStepEvent.gml:441-460`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L441-L460)

[^4]: Clip [tree/climb](https://spelunky.ai/wiki/tree#clip-tree-climb)

[^5]: [`scripts/characterStepEvent.gml:546-575`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L546-L575)

[^6]: [`scripts/scrSetupWalls.gml:493-508`](https://spelunky.ai/wiki/source/scripts/scrSetupWalls#L493-L508)

[^7]: [`objects/oTree/step.gml:1-8`](https://spelunky.ai/wiki/source/objects/oTree/step#L1-L8)

[^8]: [`objects/oTreeBranch/step.gml:1-8`](https://spelunky.ai/wiki/source/objects/oTreeBranch/step#L1-L8)

[^9]: [`objects/oLeaves/step.gml:10-35`](https://spelunky.ai/wiki/source/objects/oLeaves/step#L10-L35)

[^10]: Clip [tree/felled](https://spelunky.ai/wiki/tree#clip-tree-felled)

[^11]: [`objects/oTree/destroy.gml:3-8`](https://spelunky.ai/wiki/source/objects/oTree/destroy#L3-L8)

[^12]: [`objects/oLeaves/destroy.gml:1-5`](https://spelunky.ai/wiki/source/objects/oLeaves/destroy#L1-L5)

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

[^14]: [`scripts/scrRoomGen2.gml:495-541`](https://spelunky.ai/wiki/source/scripts/scrRoomGen2#L495-L541)

[^15]: [`scripts/scrRoomGenMarket.gml:378-424`](https://spelunky.ai/wiki/source/scripts/scrRoomGenMarket#L378-L424)

[^16]: [`scripts/scrRoomGen4.gml:513-557`](https://spelunky.ai/wiki/source/scripts/scrRoomGen4#L513-L557)

[^17]: [`objects/oLeaves/create.gml:1-7`](https://spelunky.ai/wiki/source/objects/oLeaves/create#L1-L7)

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

[^19]: [`scripts/scrSetupWalls.gml:485-490`](https://spelunky.ai/wiki/source/scripts/scrSetupWalls#L485-L490)

[^20]: [`scripts/scrCreateTileObj.gml:89-105`](https://spelunky.ai/wiki/source/scripts/scrCreateTileObj#L89-L105)

[^21]: [`scripts/scrEntityGen.gml:226-252`](https://spelunky.ai/wiki/source/scripts/scrEntityGen#L226-L252)

[^22]: [`scripts/characterStepEvent.gml:400-440`](https://spelunky.ai/wiki/source/scripts/characterStepEvent#L400-L440)

[^23]: [`objects/oTree/create.gml:4`](https://spelunky.ai/wiki/source/objects/oTree/create#L4)

[^24]: [`objects/oLeavesTile/step.gml:1-10`](https://spelunky.ai/wiki/source/objects/oLeavesTile/step#L1-L10)

[^25]: [`objects/oTreeBranchTile/step.gml:1-10`](https://spelunky.ai/wiki/source/objects/oTreeBranchTile/step#L1-L10)

### Source code

- [`objects/oTree/create.gml`](https://spelunky.ai/wiki/source/objects/oTree/create)
- [`objects/oTree/step.gml`](https://spelunky.ai/wiki/source/objects/oTree/step)
- [`objects/oLeaves/create.gml`](https://spelunky.ai/wiki/source/objects/oLeaves/create)
- [`objects/oLeaves/step.gml`](https://spelunky.ai/wiki/source/objects/oLeaves/step)
- [`objects/oTreeBranch/step.gml`](https://spelunky.ai/wiki/source/objects/oTreeBranch/step)
- [`scripts/characterStepEvent.gml`](https://spelunky.ai/wiki/source/scripts/characterStepEvent)
- [`scripts/scrRoomGen2.gml`](https://spelunky.ai/wiki/source/scripts/scrRoomGen2)
- [`scripts/scrSetupWalls.gml`](https://spelunky.ai/wiki/source/scripts/scrSetupWalls)
