Caveman
Verified against the spelunky.ai port v0.1.8 on .
The Caveman is a monster in Spelunky Classic that wanders the ground, charges when it sees the player, and is stunned rather than killed by most single hits.
Level generation puts Cavemen on the ground in the Mines, where they're rare, and in the Jungle and the Temple. A Caveman wanders until it sees the player, then charges in a straight line. With 3 hit points, it survives most single hits, which stun it instead: a stunned or dead Caveman can be picked up, thrown at other monsters, or sacrificed to Kali.
Behaviour
#A Caveman sets off walking in a random direction as soon as it's made, turning around at walls [5] [6] [7]. Its code sets its speed to 1.5 pixels per step, but it covers 4 pixels every 3 steps (40 per second): friction takes 0.1 off before it moves, and the game moves it in whole pixels, 1 a step and 1 more every third step [8] [9]. It stops to stand for 20–50 steps (0.67–1.67 seconds), and then sets off again in a random direction, with a 1 in 100 chance each step and when it reaches the edge of a ledge [10]. At a ledge, though, it keeps its walking speed for that step and slows down over the next few, so it slides about 10 pixels on, over the edge but not yet off it; the next time it sets off that way it stops at once and slides again, off the edge this time [8] [11]. Standing beside a wall, it hops [12].
The clip shows a Caveman stopping at the end of a platform and sliding over the edge, then stopping there again, sliding off and dropping to the floor below.
Every 6 steps while it stands or walks, a Caveman sends an invisible sight check flying ahead of it at 10 pixels per step, which stops at the first block in its way [13] [14] [15]. When one reaches the player, every Caveman within 100 pixels of him that isn't stunned starts charging, whichever Caveman sent it and whichever way it faces [16]. The clip shows a Caveman spotting the player across the cave and charging into him.
A charging Caveman runs at 3 pixels per step (90 per second) the way it faces, turning only at walls: it doesn't turn toward a player behind it, doesn't stop at ledges, and keeps charging until something stuns it [17].
A Caveman only acts while it's on screen or just off it [18] [19].
Damage
#When the player touches a Caveman that isn't stunned, without stomping it, he loses 1 heart, is knocked away from it (and upward, if he's above it), and blinks, invincible, for 30 steps (1 second) [20]. A stunned or dead Caveman does nothing to him.
Defeating
#Most hits stun a Caveman as well as hurting it: it's knocked back and lies on the ground for 200 steps (6.67 seconds), counted down while it's on the ground or carried, and then gets up if it has hit points left [21]. The clip shows the Whip stunning a charging Caveman, which gets up about eight seconds later and charges again. The Whip, a stomp and thrown items can't hurt a Caveman that's already stunned:
| Way | Damage | |
|---|---|---|
| Whip | 1 hit point, and stuns it; nothing while it's stunned | [22] |
| Machete | 2 hit points, and stuns it, even while it's stunned | [22] |
| Stomp (landing on it) | 1, plus 1 for every 16 steps of falling, three times that with Spike Shoes, and stuns it; nothing while it's stunned | [23] |
| A thrown item moving faster than 2 pixels per step, such as a Rock | 1, and stuns it; nothing while it's stunned | [24] |
| A stunned monster thrown into it | 1, and stuns it | [25] |
| A Shotgun or Pistol bullet | 4 hit points | [26] |
| A Bomb's explosion | 30 hit points | [27] |
| A Spear Trap's spears | 2, and stuns it | [28] |
| A Piranha's bite, while it's swimming | 1, at most once every 10 steps, and sets it charging | [29] |
| Falling onto Spikes | Kills it | [30] |
| Standing in Lava | Kills it | [31] |
| Ending up inside solid ground | Removes it | [32] |
When its hit points run out, a Caveman dies and leaves its body, which, like a stunned Caveman, can be picked up and thrown [33] [34] [35]. Cavemen killed count toward the player's kills, and the screen between levels draws a Caveman icon for each [36] [37]. One that Spikes, Lava or a Spear Trap killed doesn't count [38] [39] [40].
A stunned or dead Caveman left lying still on Kali's altar for 20 steps is sacrificed to her, adding 2 to her favour if it's stunned and half that if it's dead, unless her favour is already −8 or less [41].
Locations
#Level generation makes Cavemen on top of blocks with open space above them, outside the starting room and shops:
- The Mines: a 1 in 800 chance for each such block, once the 1 in 60 roll for a Snake has failed [42].
- The Jungle: a 1 in 60 chance for each, once the roll for a Mantrap has failed, but not on water or on a graveyard level [43].
- The Temple: a 1 in 40 chance for each, once the roll for a Tomb Lord has failed [44].
Cavemen also come from:
- The Ice Caves' frozen cavemen. Breaking the ice around one frees a stunned Caveman [45].
- Olmec's Lair. The Cavemen bowing to Olmec get up and charge when he starts to move [46] [47].
- Custom levels, as the level editor's tile
h[48].
Tips
#- A charging Caveman only turns at walls, so getting behind it, or over it, leaves it running the other way.
- One Caveman seeing the player sets off every Caveman within 100 pixels of him, even those facing away.
- The Whip can't hurt a stunned Caveman, so with the Whip alone it takes three hits, each after it gets back up. One bullet kills it.
- A stunned Caveman can be carried and thrown at another monster, or sacrificed for twice a dead one's favour.
Trivia
#-
The same sight check sets off the Temple's Hawkmen, by the same rule [49].
-
The Caveman's touch event replaces the one most monsters share, whose first line names it:
// jumped on - oCaveman, oManTrap replaces this script with its ownobjects/oEnemy/collision_oCharacter.gml:1, fromspelunky.gmk, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC (Spelunky User License v1.1b).
FAQ
#- How much damage does a Caveman do in Spelunky Classic?
1 heart per touch. A Caveman that isn't stunned costs the player 1 heart when he touches it, knocks him back and makes him invincible for 30 steps (1 second); a stunned one is harmless.
- How do you kill a Caveman in Spelunky Classic?
It has 3 hit points. A Whip hit, a stomp or a thrown item takes 1 and stuns it, but can't hurt it again until it gets up, so the Whip takes three rounds. A Machete keeps cutting while it's stunned, and one bullet or a Bomb kills it outright.
- Why does a Caveman suddenly run at the player in Spelunky Classic?
It has seen him. Every 6 steps a Caveman sends an invisible sight check ahead of it, and when one reaches the player, every Caveman within 100 pixels of him charges, whichever sent it.
- How long does a stunned Caveman stay down in Spelunky Classic?
200 steps (6.67 seconds), counted while it lies on the ground or is carried. Then it gets up and wanders again.
- Where do Cavemen appear in Spelunky Classic?
Level generation puts them on the ground in the Mines (rarely), the Jungle and the Temple. In the Ice Caves they're frozen in ice, and in Olmec's Lair they bow to Olmec until he moves.
See also
#References
#objects/oCaveman/create.gml:11objects/oCaveman/collision_oCharacter.gml:40objects/oCaveman/step.gml:135objects/oCaveman/step.gml:46-137objects/oCaveman/create.gml:24objects/oCaveman/step.gml:63-68objects/oCaveman/step.gml:80-107objects/oCaveman/step.gml:198-200scripts/moveTo.gml:20-31objects/oCaveman/step.gml:88-114- Clip caveman/ledge
objects/oCaveman/step.gml:49-56objects/oCaveman/step.gml:69-78objects/oCaveman/step.gml:116-125objects/oEnemySight/collision_oSolid.gml:1objects/oEnemySight/collision_oCharacter.gml:1-8objects/oCaveman/step.gml:127-137objects/oEnemy/step.gml:7-11objects/oCaveman/step.gml:3objects/oCaveman/collision_oCharacter.gml:24-44objects/oCaveman/step.gml:138-171objects/oCaveman/collision_oWhip.gml:1-17objects/oCaveman/collision_oCharacter.gml:6-22objects/oItem/step.gml:270-288objects/oEnemy/step.gml:169-199objects/oBullet/collision_oEnemy.gml:16-25objects/oExplosion/collision_oEnemy.gml:14objects/oEnemy/step.gml:76-97objects/oPiranha/step.gml:77-121objects/oEnemy/step.gml:108-124objects/oEnemy/step.gml:65-74objects/oCaveman/step.gml:19-36objects/oCaveman/step.gml:38-41objects/oCaveman/step.gml:172-196objects/oPlayer1/step.gml:1300-1303objects/oCaveman/step.gml:174-184objects/oTransition/alarm_0.gml:221-225objects/oEnemy/step.gml:68objects/oEnemy/step.gml:87objects/oEnemy/step.gml:120objects/oEnemy/step.gml:130-167scripts/scrEntityGen.gml:67-71scripts/scrEntityGen.gml:276-290scripts/scrEntityGen.gml:452-465objects/oFrozenCaveman/destroy.gml:1-7objects/oOlmec/alarm_4.gml:1-5objects/oOlmec/alarm_6.gml:1-7scripts/scrCreateTileObj.gml:147-150objects/oEnemySight/collision_oCharacter.gml:10-17objects/oEnemy/step.gml:63-74
Source code
objects/oCaveman/create.gmlobjects/oCaveman/step.gmlobjects/oCaveman/collision_oCharacter.gmlobjects/oCaveman/collision_oWhip.gmlobjects/oEnemySight/collision_oCharacter.gmlobjects/oEnemy/create.gmlobjects/oEnemy/step.gmlscripts/scrEntityGen.gmlobjects/oFrozenCaveman/destroy.gmlobjects/oOlmec/alarm_6.gml