JavaScript Chip's Challenge Documentation

Some differences between my JavaScript version and the Windows version of Chip's Challenge:

  1. In the Windows version, monsters move at a fixed rate regardless of what you do or how fast you can move Chip. In some of the puzzles, you may have to move Chip very fast to avoid or get around some monsters. That means that the game is pretty well unplayable by anyone who uses slow assistive technology to operate the computer (slow because of the technology or slow because of the disability or both). I decided to use moves instead of seconds and have Chip alternate moves with the monsters. This way, someone who is disabled and who may need several seconds (or minutes) to make a move won't be penalized. That added the requirement for an explicit command to not move Chip for one move. (In the Windows version you would just not press any key for the time you wanted to wait.) (For those who do want timed versions with continuously moving monsters, see the versions by Madhav, AKA "Keyboard Wielder".)
  2. In the Windows version, puzzles that don't give you an unlimited time to finish a puzzle give you a fixed time within which a puzzle has to be solved. In the JavaScript version, the limit is either the number of moves regardless of how long it takes for any given move or a limited amount of time, depending on the version you select.
  3. In the Windows version, moves are made by pressing the Up, Left, Down and Right cursor keys. With the JavaScript version, you can use a mouse (real or emulated with a keyboard or some other assistive device) or (Firefox and IE only) use the Up, Left, Down and Right cursor keys or (Firefox, IE or Opera) the I, J, K and L keys to move Chip and the W key or the Space-bar to have Chip wait at the current location for a move.
  4. I chose to use the images from the Tile World clone of Chip's Challenge rather than images from Microsoft's implimentation of Chip's Challenge since Tile World uses the GPL and is Open Source. That way I avoid violating Microsoft's copyright on their images. (They also look nicer and lend themselves to being animated.)
  5. The Windows version has 149 Levels (puzzles). So far I have only one Level and "Keyboard Wielder" has adapted that one and added one of his own design.

Cast of characters:

Background objects (have fixed locations):

Floor. Doesn't block anything.

Wall. Blocks everything.

Water. Turns into Dirt when a Movable Block is pushed into it. Chip drowns in it if he doesn't have swimming flippers. (There are no flippers available in the current puzzle). The Glider monster can fly over it (but other monsters, not in this puzzle, can't).

Dirt. Blocks everything but Chip. Turns into Floor when Chip walks on it.

Exit. This is what you are trying to reach. The game is over and you win if you can get Chip to this square. There may be a limit in the number of moves you have to reach the Exit.

Red Door. Blocks everything but Chip and Chip needs a Red Key to get through the door. Once Chip "opens" the door, it turns into Floor.

Yellow Door. Blocks everything but Chip and Chip needs a Yellow Key to get through the door. Once Chip "opens" the door, it turns into Floor.

Red Key. When Chip steps on it, it is moved to the "Resource Box" to the right of the playing area (and is replaced by Floor). Chip may (but not in the current game) have more than one Red Key at a time but each Key is used up when Chip goes through a Red Door. (To go through three Red Doors, for example, Chip has to get three Red Keys.)

Yellow Key. When Chip steps on it, it is moved to the "Resource Box" to the right of the playing area (and is replaced by Floor). Chip may (but not in the current game) have more than one Yellow Key at a time but each Key is used up when Chip goes through a Yellow Door. (To go through three Yellow Doors, for example, Chip has to get three Yellow Keys.)

Toggle Wall turned on. Acts like a wall except that anything on it at the time it is turned on is still there and can move off the Toggle Wall. (In particular, if the wall is turned on while a movable block is over it, the block stays there but can be pushed off it by Chip although Chip doesn't move into the space formerly occuppied by the movable block.)

Toggle Wall turned off. Acts like Floor.

Green Button. Whenever Chip or a monster or a Movable Block moves on top of it, it changes the state of any and all Toggle Walls in the puzzle. Any that are turned on get turned off. Any that are turned off get turned on.

Foreground objects (with one exception, can move or be moved around the playing area):

Movable Block. Can be pushed around by Chip. Blocks monsters. Turns into Dirt when pushed into Water (or the Water becomes Dirt and the block vanishes).

Glider, a monster. The one to the left is shown flying North. Can fly in any direction. Normally flies in a straight line but trys to turn left if it encounters an obstacle. If it can't turn left, it tries going to the right. If it can't turn right, it tries turning around and going back in the opposite direction. Makes a 180-degree turn without moving if it is blocked on all four sides. The Glider can fly over water, the only monster that can do so. In this JavaScript version, after Chip takes a turn (which includes his staying on the same square without moving) then each monster gets a turn to move.

Chip. Shown on the left as facing South. Can face in the other three directions (faces the direction in which he moved to get to the current square). You have to move him to the exit after collecting whatever you need to get there. Drowns in Water unless he has flippers and is killed if he encounters a monster, a fire (not in this puzzle) or a bomb (not in this puzzle).

Chip in Exit. The only foreground image that can't be moved because it indicates that the game is over and that you won.

Note that there are other foreground and backgrouns objects, monsters, and square types not listed above. They will be added to this page if and when they are used in one of my JavaScript puzzles. There are too many for me to include all of them on my website as they take a lot of filespace for the entire collection and I have a limited quota.

Moving:

Up Up Up Up Up Up Up Up Up
Le Up Up Up A. Up Up Up Ri
Le Le Up Up Up Up Up Ri Ri
Le Le Le Up Up Up Ri Ri Ri
Le B. Le Le W. Ri Ri C. Ri
Le Le Le Dn Dn Dn Ri Ri Ri
Le Le Dn Dn Dn Dn Dn Ri Ri
Le Dn Dn Dn D. Dn Dn Dn Ri
Dn Dn Dn Dn Dn Dn Dn Dn Dn

Using the mouse:

Click on Chip (shown with a blue border in the chart to the left) to stay in the same spot for one move (to wait for an appropriate condition for moving).
Click on one of the squares above Chip (shown with a red A and red borders in the chart to the left) to move up.
Click on one of the squares to the left of Chip (shown with a green B and green borders in the chart to the left) to move to the left.
Click on one of the squares to the right of Chip (shown with a green C and green borders in the chart to the left) to move to the right.
Click on one of the squares below Chip (shown with a red D and red borders in the chart to the left) to move down.
Squares that are equally far from Chip in both horizontal and vertical directions or farther away vertically move Chip vertically. Squares that are farther away from Chip horizontally will move Chip horizontally.

Using the keyboard:

To pause or wait for one move, press the 'W' key or the space-bar.
To move up, press the Cursor Up key or the 'I' key.
To move left, press the Cursor Left key or the 'J' key.
To move right, press the Cursor Right key or the 'K' key.
To move down, press the Cursor Down key or the 'L' key.
(Opera users will have to use the 'I', 'J', 'K' and 'L' keys.)

My thanks go to Madhav Shanbhag ("Keyboard Wielder") who sent me the JavaScript code for handling keypresses. I may have eventually figured out how to do the same thing myself but this saved me a lot of trial and error coding (with emphasis on the error).