If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Cookie Clicker/Dungeons

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Cookie Clicker.

This cactus is UNDER CONSTRUCTION
This article is a work in progress.
...Well, all the articles here are, in a way. But this one moreso, and the article may contain incomplete information and editor's notes.
This icon would appear on the default tab in the factory section after building 50 factories. Clicking on it would open the dungeon game window in the tab.

Dungeons are a feature from one of the game's early builds, which was scrapped before being made available in official versions. Prior to the release of version 1.04, it was possible to access dungeons by entering Game.Objects.Factory.unlockSpecial(); into the browser's console. However, dungeons were rendered inaccessible in the update following their original launch. The developer has mentioned re-introducing it at some point, but so far, nothing has been done about it. It is still possible to play a version with dungeons here, though it is running in an old state of the game.

Dungeons play as a rogue-like top-down adventure game, with random rooms, enemies, loot, storage units, rabbits, and more. This is somewhat comparable to the Mystery Dungeon series' gameplay. The player can break crates and doors to access more rooms, collect cookies from defeated enemies that add to your main-game bank, and move to other floors by defeating bosses. The player's character is also capable of exploring automatically when the game is left idle. As the player goes deeper, stronger enemies appear more often, but they drop larger amounts of cookies.

While this page could document everything about the mechanic, since it is a cut feature, this will only go into detail about the unused content within the dungeons themselves. Unused content within unused content!

Note: reliable documented information on dungeons is very limited, so this page is subject to having inaccuracies.

Unused Graphics

All the sprites used for characters and interactive objects.
Hmmm...
To do:
Document the other unused icons. Specifically, the treasure chests and cookie podiums.
All the sprites used for background tiles.

A relatively large amount of the dungeons' graphics are unused.

Mysterious Hero Head

Cookieclicker-placeholderhero.png

When the player enters a dungeon, they are randomly assigned one of four heroes (which, by the way, are girl scouts) to navigate the dungeons with. Each character has slightly different stats. In the dungeon window, the player's character appears as a small icon of their head, which is always in the center of the screen. The sheet also contains what appears to be a placeholder icon for the dungeon window icons, which is stored before the four character's head icons.

Chests

Cookieclicker-dungeonchests.png

The game has unused code for generating special entities, which involves the game placing a rare item or loot object in the "best spot" of random rooms. One of the unused parts of the entity generation code is for spawning treasure, and an unused chestLoot loot table object. The game also has three unused icons for different types of chests. These chests appear to come in three different varieties, and are meant to contain mid-tier loot.

Locked Doors

Cookieclicker-dungeondoors.png

The game generates dungeon floors using a separate algorithm before inserting all the interactive elements. One of these elements are breakable doors, which are placed on top of the background door tiles. The game also has three unused icons for different types of wall doors. These doors appear to have bronze, silver, and gold locks, and most likely require matching key items to be opened, though there doesn't appear to be any icons for keys of any kind.

Alternate Conveyor Belts

Cookieclicker-dungeonconveyors.png

The game sometimes generates dungeon rooms with decorative tiles. One of these decorative tiles are conveyor belts, which are solid, non-interactive single tiles that always face horizontally. The game also has two unused icons for a different type of conveyor belt. These conveyors appear to be able to connect with other conveyor tiles, and can face in multiple directions, though there doesn't appear to be any tiles for the conveyor ends. Based on the fact that these are stored in the tile sheet and not the interactive element sheet, these tiles will most likely behave the same way the current ones do.

Map Icons and Tiles

Cookieclicker-maptiles.png

Cookieclicker-mapicons.png

The game's website contains a number of image files for an unknown "map" of some sort. These are presumably related to dungeons, as the tile and icon sheets use 16x16 icons, like with the dungeon sheets. However, these icons are relatively crude and lack detail, unlike the graphics that are used. It's possible that these graphics were simply "slapped together" to be used for testing.

Map Background

Cookieclicker-mapbg.jpg

This gray texture appears to be some sort of background for the map.

Mysterious Combatants

Cookie Clicker Placeholder Grandma.pngCookieclicker-mysteriousopponent.png

When the player's character faces an enemy, that character's face portrait is replaced with a full-body portrait of the character wielding a sword, and the opposing enemy's portrait appears on the opposite side. Interestingly, the game contains two unused images, known as mysteriousHero.png and mysteriousOpponent.png, which appear to be placeholder portraits.

Unused Code

Hmmm...
To do:
There's a LOT more to cover.

Dungeons were left very unfinished, with a lot of unused code. The game uses two separate scripts for dungeons:

  • DungeonGen.js, also known as Orteil's crappy dungeon generation library, contains the script for generating dungeon floor layouts. The dungeon-gen script can be found here, and a separate demonstration of the code can be found here.
  • dungeons.js, also known as Orteil's sloppy Cookie Clicker dungeons, contains the script for creating and spawning enemies, heroes, loot, bosses, etc. The dungeon script can be found here.

Loot

The dungeon code for enemy loot table objects contain a few interesting unused things.

var basicLoot={cookies:{min:1,max:5,prob:0.5}};
var goodLoot={cookies:{min:3,max:8,prob:1},gear:{prob:0.05}};
var bossLoot={gear:{prob:1}};
var chestLoot={cookies:{min:2,max:20,prob:1},gear:{prob:0.1}};
var bossLoot={cookies:{min:10,max:50,prob:1},gear:{prob:0.2}};
  • The loot tables contain a property known as gear. This property causes tougher enemies to sometimes drop gear with the usual cookie drops. However, gear has not been implemented yet, and the code for dropping gear currently does not exist. As such, if the game chooses the scenario in which it should drop gear, it does absolutely nothing.
    • The thing is, all the loot tables that use gear are set to have enemies drop cookies 100% of the time. As such, whether or not the game drops nonexistent gear is irrelevant, because it will always drop cookies after that scenario passes anyways.
  • The loot table chestLoot is not used by any entity. The game has references to treasure chests, but they currently do not exist.
  • The loot table bossLoot is declared twice. The first declaration makes bosses only ever drop gear, which is effectively nothing in the game's current state. The second declaration makes bosses drop a relatively large quantity of cookies, in addition to the fruitless 20% chance of dropping gear. Because of the way JavaScript works, the second declaration of BossLoot overwrites the first declaration's data, leaving the former table unused.

Dungeon Entity Generation

Hmmm...
To do:
Figure out what these things do. We know they're unused, but we don't know what they're supposed to do.

The dungeon code for spawning entities in rooms contain some unused code.

Treasure

//spawn treasure
/*
for (var i in M.rooms)
{
	if (M.rooms[i].freeTiles>1)
	{
		for (var ii=0;ii<Math.ceil(Math.sqrt(M.rooms[i].freeTiles*(M.rooms[i].gen*0.25+0.1))/2);ii++)
		{
			if (Math.random()<0.95 && M.rooms[i].freeTiles>1)
			{
				var spot=M.getBestSpotInRoom(M.rooms[i]);
				M.data[spot.x][spot.y][0]=0;
				spot.score=0;
				M.rooms[i].freeTiles--;
			}
		}
	}
}*/

Relics

//place relics
/*
var tile=this.map.getBestSpotInRoom(this.map.getRoom(this.map.exit[0],this.map.exit[1]));
var entity=this.AddEntity('special','upgrade',tile.x,tile.y);
entity.value='Dungeon cookie upgrade';
this.map.removeFreeTile(tile.x,tile.y);
for (var i=0;i<Math.floor(Math.pow(Math.random(),2)*3);i++)
{
	var room=choose(this.map.rooms);
	if (room.freeTiles.length>10)
	{
		var tile=this.map.getBestSpotInRoom(room);
		var entity=this.AddEntity('special','upgrade',tile.x,tile.y);
		entity.value='Dungeon cookie upgrade';
		this.map.removeFreeTile(tile.x,tile.y);
	}
}*/

Placeholder Character

All the hero characters in the game are programmed using instances of Game.Hero, an object constructor function. Interestingly, this function contains code for its own properties, which are overwritten when a new character instance is set. This "placeholder" character has its own stats and dialogue, though it does not have a name, portrait, or icon (though it's possible that the unused head icon is related to this).

Stats

This placeholder character contains its own stats, which appear to be well-rounded relative to other character. These stats are similar to the character Chip, albeit with less HP.

  • HP: 25. This sets the amount of health the character has upon first entering the dungeon.
  • HPM: 25. This sets the maximum amount of health the character can possibly have.
  • Might: 5. This affects how much damage is dealt by the character's attack to an enemy.
  • Guard: 5. This affects how much damage is taken by an enemy's attack to the character.
  • Speed: 5. This determines who attacks first in a turn, as well as how fast the character auto-explores when idle.

Unlike other characters, this does not contain stats for dodge or luck.

Dialogue

This placeholder character contains its own dialogue, which appears to be generic and emotionless. (Note: for all characters, some dialogue types have multiple entries, which the game chooses randomly.)

  • Greeting: Oh hey. Sup. This text is meant to display once a character is determined for the first level of the dungeon.
  • Entrance: Here we go. So exciting. This text is also meant to display once a character is determined for the first level of the dungeon.
  • Completion: That was easy. All done here. This text is meant to display upon entering the next level of the dungeon.
  • Defeat: Welp. Better luck next time. This displays when the character falls in battle.

Unlike other characters, this property does not contain dialogue for intro, win, win against Sentient Furnace, or win against Ascended Baking Pod.

Unused Dungeon Types

Currently, the only dungeon type that was ever in a playable state was the factory dungeon. However, the dungeon source code listed four types of dungeons, of which only the factory dungeons were ever used. These dungeon listings had their own type names and unique name generation code.

Additionally, the source code appears to have classified certain monsters based on their appearance. Some enemies, such as the Doughling, were classified as "general monsters", implying that they would appear in other dungeon types. Other enemies, such as the Chirpy, were classified as "factory monsters", implying that they would appear only in factory dungeons.

Mine Dungeon

This dungeon type appears to be based on the Mine building. The randomly-generated names of these dungeons use the normal sets of "secret", "ruined", and "magical" themed primary names, unique "chocolate", "white chocolate", "sugar", and "cacao" secondary names, and "mine", "mines", "pit", "pits", "quarry", "excavation", "tunnel", "shaft", "lode", "trench", "mountain", "vein", "cliff", "peak", "dome", "crater", "abyss", "chasm", "hole", and "burrow" tertiary names.

As of the Legacy Update, the Mine and Factory buildings were reversed, meaning Mines are now unlocked before Factories. This code was left untouched during the transition, hence why it is programmed after the factory dungeons in the code.

Portal Dungeon

This dungeon type appears to be based on the Portal building. The randomly-generated names of these dungeons use the normal sets of "secret", "ruined", and "magical" themed primary names, and unique "portal", "gate", "dimension", "warpgate", and "door" secondary names.

The description for the Portal building states that the buildings lead to the "Cookieverse". Some of the news reports from the ticker state that "unsettling creatures" exist inside this dimension, and that the buildings have the power to "corrupt" people nearby. Additionally, the Portal building upgrades use the number "6" a lot, likely referring to the number "666". This seems to suggest that the dungeons will have an extraterrestrial/hellish theme.

Secret Zebra Level

This dungeon appears to be... a secret dungeon based on... zebras. The names of these dungeons are technically randomly-generated, though it always chooses the name "secret zebra level". The purpose of this dungeon is unknown.

Mysterious Dungeon

While not technically a dungeon, the object constructor function for dungeons contains its own name data, which sets the name to "Mysterious dungeon". This is likely placeholder text, in case the name data is not overwritten when a new dungeon is constructed using the function.