1989 · Monarch Software

Gameplay

This minisite was contributed by unorig. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/a-nightmare-on-elm-street with me to Gold.

Choose a Dream Warrior, find Freddy's house in Springwood, then climb down through ten levels of his dream to rescue your friends and fight him at midnight.

01 · The Dream Warriors

Five who can be chosen, and Joey who cannot

The game starts with six portraits. Five of the Dream Warriors can be chosen, each with a special power. Joey's portrait is there, but fire does nothing on it: his ability reads "NONE (VICTIM)".

The character select: six portraits in two rows of three, one framed
The character select. The stick moves the flashing frame and fire chooses.

select_loop moves the frame round the two rows of three and prints each one's name and ability from the list at $23A9. Fire on Joey's place, the fifth, is ignored, and the sixth place gives Taryn. The rest of the game knows only five characters, numbered 0 to 4.

Each character has a different body and a different spirit. The most health each can have is in health_tops, the most power in power_tops, and what their special power costs in power_costs.

CharacterSpecial powerMost healthMost powerPower per use
KincaidPower punch70505
KristenKarate kick60605
WillLightning50805
NancyFreeze time705030
TarynMagic knives50905

The pictures each character is drawn with are on the Graphics tab.

02 · Springwood

Find Freddy's house before he finds you

The game opens on the streets of Springwood: "ENTERING SPRINGWOOD, USA!" and then "FIND FREDDY'S HOUSE BEFORE HE FINDS YOU!" A giant Freddy walks the streets after you, and his house is somewhere else every game.

Springwood seen from above: houses, trees, and the player on the road, with the panel on the right
Springwood. The panel on the right has the player's box, with the name, level, power, and soul, above four empty boxes.

street_new_game puts you at cell 57, 42 of the 64 by 64 street map and builds Freddy's house at one of nine places, picked at random from the tables at $3882 and $388B. The nine places are marked on the Maps tab.

Freddy is the only monster in the street. street_monsters_init starts him at cell 38, 25, and street_freddy walks him straight at you, turning round walls one step at a time. When he reaches you, freddy_attacks_street rolls a number: 40 times in 256 his claw lands and takes 5 health. With no way to fight him in the street, the only answer is to keep walking.

Walking into the house runs freddys_house_touch, which prints a long speech: "YOU HAVE DONE WELL IN FINDING FREDDY'S HOUSE, BUT YOUR BATTLE HAS JUST BEGUN. YOU MUST SEEK OUT YOUR FRIENDS, FOR ONLY WITH THEIR HELP DO YOU STAND A CHANCE AGAINST FREDDY." Then street_to_house passes the character, the health, and the sound switch to the house part, MAIN, and loads it from side 2.

03 · Inside the house

Ten levels, joined by ladders

Inside, the dream goes down. Each level is a maze of 64 by 64 cells, seen from above, and ladders join each level to the one below. The way to Freddy is at the bottom, on level 10.

Level 2 of the house: walls, a ladder, and the player, with the five characters' boxes in the panel
Level 2. The panel shows the player's box at the top and the four friends' boxes below it.

Stepping onto a ladder runs ladder_touch. A ladder down is cell $1C and a ladder up is $1D. change_level asks "DO YOU WISH TO USE THE LADDER?", warns that the game will be saved, and puts you at the new level's arrival place from the tables at $77C3 going down and $77D9 going up. Every ladder and arrival place is drawn on the Maps tab.

Each level has a script in its file SCn.DAT. Stepping on certain cells runs run_trigger, which steps through a list of operations. They print texts, move you about, open walls, give and take items, place monsters, turn off the lights, and test what you carry or which way you face. The scripts set each level's puzzle. Level 6 is "LET'S MAKE A DEAL", with three curtains and two buttons that decide where each curtain sends you. Level 7 has a Room of Four Seasons, and level 9 has tests of fire, electricity, and pits.

Levels in darkness show only a round patch around you when you carry the LANTERN (lantern_shows). The MAP item draws the whole level at once, two dots to a cell (use_map).

04 · The friends

Four friends, and Freddy draining their souls

The other four Dream Warriors are hidden in the house. Freddy visits them while you search, and each visit takes some of a friend's soul. A friend whose soul runs out is lost.

When a game starts, init_party gives each friend one of ten hiding places at random. The places are spread over levels 2, 4, and 6 to 9, and the Maps tab marks each one. A friend appears in the map when you reach their level. Walking into them runs rescue_friend: "CONGRATULATIONS!! YOU'VE SAVED " and the friend's name, and their box in the panel reads "RESCUED".

Freddy keeps his own timer, counted down by the game_clock. The clock takes 23 from a byte each pass of the main loop and ticks each time the byte wraps, about once in 11 passes, and Freddy's timer runs 240 ticks, about 2,670 passes. When it runs out, freddy_attacks_friend picks one of the four friends at random. A friend who is still hidden loses 11 to 20 points of soul, and you read "YOU HEAR" and their name "SCREAMING IN AGONY IN THE DISTANCE!" At zero the box reads "R.I.P." and the hiding place stays empty. When the friend is on your level, Freddy himself appears at their hiding place. Beat that Freddy and he only flees: "ARRGGHH! MAYBE I'LL VISIT ONE OF YOUR FRIENDS!", with his timer set so that his next visit comes at once (damage_monster). When the pick falls on a friend already rescued or lost, nothing happens.

Rescued friends matter at the end. One or two of them fight beside you in the final fight.

05 · Health and power

The soul and power meters

The panel shows two meters for you: health, which the game calls your soul, and power, which pays for the special power. When health reaches zero you die.

Every change of health goes through change_health. It flashes the meter, stops a gain at the top and a loss at zero, and at zero calls player_died. Monsters, floors, haunted items, and some scripts take health. COFFEE gives 20 and a random amount more (use_coffee), and HYPNOCIL gives 40 and 15 power (use_hypnocil).

Power starts at nothing and comes back slowly: power_regain adds 2 points every 16 passes of the main loop. spend_power takes the cost of each special power, and without enough you read "YOU DON'T HAVE ENOUGH POWER". Amanda Krueger, Freddy's mother, speaks on some levels and raises the top of a meter: the script operations op_more_health and op_more_power each add to it, up to 99.

06 · Special powers

Punch, kick, lightning, freeze, and knives

The special power sits in the first slot of the inventory, and every character's works differently.

special_power takes the character's cost from the power meter and then:

The damage of the two strikes is in power_damage, and the two shots' in shot_damage.

07 · Monsters

Five kinds of monster, and each has a weakness

Monsters walk at you and strike when they reach you. Some kinds take far more damage from one weapon, and the level texts give the hints: "THE DAGGER WORKS BEST ON SLIME", "THE BAT WORKS BEST ON SKELETONS", "THE PICK WORKS BEST ON ROACHES", and "THE AXE WORKS BEST ON WHEELCHAIRS".

spawn_monsters brings a new monster in at one of the level's spawn points when the level's timer runs out, as long as fewer are about than the level allows. move_monsters walks each one towards you, and some shoot when they have a clear line. damage_monster looks up the kind's weakness in kind_weakness: the right weapon does 28 to a roach (the PICK otherwise does 6), 50 to a slime (the DAGGER otherwise does 4), and 19 to a wheelchair (the AXE otherwise does 12). The skeleton's weapon, the BASEBALL BAT, does 19 to it, the same as to anything else, so that hint changes nothing (Discoveries). The winged kind, which flies through walls, has no weakness. When a monster dies, one time in four it leaves COINS behind.

Each kind's hit points, damage, speed, and chance to hit are in a table on the Graphics tab, beside its pictures.

08 · Items

Weapons, tools, and seven slots to carry them

Items lie about the levels. Walking onto one picks it up, into the first free slot of seven. BULLETS, BATTERIES, and COINS are counted instead, up to 999 of each.

pick_up adds 10 bullets, 20 batteries, or 2 to 7 coins, and puts any other item in a slot. With every slot full you read "YOU CAN'T CARRY ANY MORE ITEMS." Fire with the stick still uses the item in hand (use_item). With nothing in hand, or the MAGNET, auto_select picks the best weapon you carry, in the order of weapon_order.

WeaponHow it worksDamageCosts
DAGGERstrikes in front4, 50 on a slime
BASEBALL BATstrikes in front19
AXEstrikes in front12, 19 on a wheelchair
PICKstrikes, or digs a tunnel6, 28 on a roachbreaks one time in about 21
CHAIN SAWstrikes, or cuts a tunnel151 battery; breaks one time in about 21
PISTOLshoots201 bullet
SHOTGUNshoots352 bullets
ICE GUNshoots, and turns some moving cells into floor452 batteries
TASERshoots, and its bolt cuts a tunnel where it meets a wall554 batteries
GRENADEthrown; bursts8 each pass the burst touchesused up
HOLY WATERthrown; bursts6 each pass, and heals you 1 insteadused up

Strikes go through strike, which hits the first monster within three steps in the direction you face. Guns go through fire_gun, which waits until the last shot of the same kind has gone. Thrown items go through throw_item. A grenade's burst also hurts you if you stand in it, as a level text warns: "DON'T GET CAUGHT IN YOUR GRENADE'S EXPLOSION."

The instruction guide lists 13 of the 26 items, under its own names for some of them: its gun is the PISTOL, its rifle the SHOTGUN, its ammo the BULLETS, and its rope the JUMP ROPE.6 "Some of them are listed here, but many are not," it warns, and the weapons it leaves out are the DAGGER, the BASEBALL BAT, the AXE, and the ICE GUN. The guide calls the rope "a one way ticket down" at pits and holes, and in the game carrying it halves the damage the pit floors do (Floors).

Other items have uses of their own. The KEY opens a door in front of you, facing up or left (use_key). The LANTERN lights dark levels by being carried. The JUMP ROPE and the CRUCIFIX work by being carried too, against floors and haunted items. The MAGIC SHIELD does nothing at all, as Discoveries explains.

09 · The vending machine

Coins buy nine things

Some levels have a vending machine. Walk into it and it asks "DO YOU WISH TO BUY SOMETHING?", then shows its own picture with nine items and their prices.

vending_machine lets you move a cursor round the 3 by 3 grid and buy with fire. vend_buy needs a free slot for anything but bullets and batteries, then takes the price from your coins. The items are in vend_items and the prices, in tens of coins, in vend_prices.

ItemCoinsItemCoinsItemCoins
BULLETS (10)20PICK40GRENADE100
BATTERIES (20)30KEY50CHAIN SAW200
COFFEE30HYPNOCIL50MAP500

The machine also has texts for a theft and a lucky win that nothing ever prints (Discoveries).

10 · Chests

Treasure, or a trap

"SOME CHESTS CONTAIN TREASURE. SOME CHESTS HAVE TRAPS." Walking into a chest opens it, and the deeper the level, the worse the odds.

open_chest prints "THE CHEST OPENS, REVEALING " and rolls a number below 100. When the number is more than five times the level, the chest holds COFFEE, HYPNOCIL, BULLETS, BATTERIES, or COINS. On level 1 that is 94 chests in a hundred, and on level 10 only 49. Otherwise one of six things happens: the chest is empty, holds a MAGNET, lets out a slime, a skeleton, or Freddy himself, or bursts in "SHRAPNEL!!"

11 · Floors

Floors that hurt, and one that holds you

Some floor cells hurt you each time you step on them, and one kind holds you still. The JUMP ROPE halves the damage of two kinds: "ROPE REDUCES DAMAGE WHEN USED CROSSING PITS!"

Each floor that does something belongs to one of seven groups, and each level type switches some groups on (type_groups). hurt_floor takes the group's damage from floor_damage: 5 for group 0, then 10, 2, 20, 10, and 20 for groups 2 to 6, halved for groups 4 and 6, the pits, while you carry the rope. Group 1 is the floor that holds you. sticky_floor holds you for two passes each time you move onto it. A floor that kills plays its own death animation.

12 · Tunnels

Cutting through walls

The PICK, the CHAIN SAW, the TASER, and Kincaid's power punch can cut a way through a wall. Most levels do not allow it: "YOU CAN'T TUNNEL ON THIS LEVEL".

All four end in add_room, which tries to fit a piece of map 4 cells by 4 beyond the wall. When none fits you read "YOU CAN'T TUNNEL HERE, FREDDY'S RULES!" use_pick digs on every second use ("DIGGING WITH A PICK IS HARD WORK."), use_chain_saw on every use, and bolt_tunnel wherever a TASER bolt meets a wall. The PICK and the CHAIN SAW break one time in about 21, with "YOU BROKE IT".

Level 1 grows. Each door you open there, with a KEY or a tunnel, adds a room beyond it, picked from 34 pieces at room_pieces, so no two games' level 1 look the same. A level's script can switch tunnelling on or off (op_growth).

13 · Freddy's things

The hat, the glove, the magnet, and the crucifix

Some items are cursed. FREDDY'S HAT and FREDDY'S GLOVE attack whoever carries them, and the MAGNET swaps itself for something you carry. The CRUCIFIX protects you from the hat and the glove.

haunted_items counts a timer for the hat and one for the glove while you carry them. Every 16 passes the message reads "FREDDY'S HAT IS ATTACKING YOU!" or "FREDDY'S GLOVE IS ATTACKING YOU!" and you lose 25 health. Carrying the CRUCIFIX stops both. Recovering it on level 8 brings the text "YOU NOW HAVE THE POWER TO TOUCH EVIL ITEMS WITHOUT TAKING DAMAGE!"

The MAGNET lies in the map like any item, but walking into it runs magnet_touch: a random item you carry is dropped where the magnet was, and the magnet takes its slot. "MAGNETS ARE CURSED ITEMS. DROP THEM AS SOON AS POSSIBLE."

On level 10 all three come together. A text tells you to rid yourself of them before Freddy appears at midnight: "TAKE THE CLAW TO THE EAST, THE HAT TO THE SOUTH AND THE CRUCIFIX TO THE WEST!"

14 · The manual question

Copy protection on the way to level 4

The first time down to level 4, the game asks a question about the manual, with four answers to choose from. Answer wrong and it asks again. Answer wrong a second time and the game stops for good.

manual_question loads the file COPY and asks one of its ten questions at random. The right answers are at $5B7A, one number from 0 to 3 for each question. A second wrong answer sends the game into a loop at $5B65 that never ends, with nothing on screen to say so (Discoveries).

Every answer the game expects is in the instruction guide, page for page, so the guide below is the one the disk was made for.6 The pages count from the story, page 1, to the credits on the back, page 7. Two questions ask which item a page leaves out: the SKATEBOARD, which is nowhere in the game, and the BATTERIES, which the guide lists on page 5.

#Question, as the game prints itThe four answersRightWhere the guide has it
1THE FIRST WORD IN PARAGRAPH 3, PAGE 4 ISEXCITEMENT, BEWARE, AMANDA, INDICATESINDICATESthe paragraph under “On Level”
2SHAREDATA'S TECHNICAL SUPPORT NUMBER IS(602)961-4022, (602)961-2042, (603)983-4023, (714)999-4565(602)961-4022Technical Support, page 6
3THE FIRST WORD IN PARAGRAPH 4, PAGE 4 ISDISPLAYED, AMANDA, YOU, THEDISPLAYEDthe paragraph under “Items and Special Power”
4THE HEADING AT THE TOP OF PAGE 1 ISFREDDY'S NIGHTMARES, DEADLY DREAMS, FREDDY KRUEGER, NEVER SLEEPDEADLY DREAMSthe story that opens the guide
5THE LAST WORD IN PARAGRAPH 2, PAGE 3 ISCONTROLS, INCLUDED, YOU, POWERYOU“…he can change them at anytime without telling you!”
6NOT LISTED AMONG THE ITEMS ON PAGE 4 ISGUN, TASER, KEY, BATTERIESBATTERIESbatteries are on page 5
7THE LAST WORD OF PARAGRAPH 3, PAGE 4 ISFREDDY, THEM, GUN, ITSELFTHEM“…before Freddy kills them.”
8NOT LISTED AMONG THE ITEMS ON PAGE 5 ISBATTERIES, MAP, SKATEBOARD, PICKSKATEBOARDno skateboard anywhere in the game
9THE THIRD BOLD HEADING ON PAGE 5 ISABOUT FREDDY, TECHNICAL SUPPORT, DON'T DREAM, SPECIAL POWERSTECHNICAL SUPPORTafter “Hints from Amanda Krueger” and “About Freddy”
10THE FIRST WORD OF PARAGRAPH 1 PAGE 1 ISFREDDY, NIGHTMARE, ELM, YOUYOU“You run… it's dark…”

15 · Midnight

The final fight with Freddy

On level 10 a clock runs. Every so often you read "IT'S NOW n O'CLOCK", and at 12 Freddy comes for you, whether or not you are ready. The fight also starts when you reach him first.

game_clock counts an hour as 120 of its ticks, about 1,336 passes of the main loop. At 12 o'clock it calls final_fight, the routine behind the script operation $DD, which a level's script can also start. The level's moving cells become floor, every monster goes, and Freddy appears with 1,000 hit points: "SO, YOU'VE MADE IT THIS FAR--NOW YOU MUST FIGHT ME!!" The sprites are doubled in size, and Freddy fills two of them.

The script operation $DA (op_ending) prints a speech from the file MSG, one of three by the number of friends rescued. All three promise to heal you "UP TO YOUR FULL POTENTIAL". With one friend, "I WILL ADD HIS STRENGTH TO YOURS TO EFFECTIVELY DOUBLE YOUR POWER", and with two or more their "COMBINED STRENGTH" will triple it. In the code, the help is that one or two rescued friends fight beside you: each throws a copy of every shot and grenade you throw, from beside you (fire_gun, throw_item).

Beat Freddy and game_won loads the picture HOUSE and plays the title tune while "CONGRATULATIONS! YOU HAVE DEFEATED FREDDY AND ELM STREET IS SAFE AGAIN!" is printed, then offers a new game.

16 · Saving

Every ladder saves the game

The game saves to side 2 every time you climb a ladder, and from a menu whenever you like, except on level 10. Each level also remembers what you changed in it.

The save menu, on the / key (save_menu), offers "RETURN TO THE GAME", "SAVE THE GAME", and "LOAD A SAVED GAME". Saving runs save_level and then save_game. The first compares the level's map with its first state on the disk and writes the difference to a file of its own, Dn.CUR: every opened door, cut tunnel, and item taken. The second writes the player, the friends, and the levels visited to SAVE.DAT. There is one save on a disk, and each save replaces it.

A saved game is loaded from the first menu, "LOAD THE SAVED GAME", after swapping in side 2 (load_saved_game), or from the save menu in the house (load_game).

17 · Death

"FREDDY HAS WON, AGAIN"

When your health runs out the game plays one of three short animations of your death, then prints "YOU'VE DIED. FREDDY HAS WON, AGAIN".

player_died calls death_animation, which picks the animation by what did the damage: Freddy, any other monster, or a floor. All three are on the Graphics tab. Then a menu offers "START A NEW GAME", "LOAD THE SAVED GAME", or "STOP PLAYING", which prints "PLEASE TURN OFF THE COMPUTER" and waits for ever.