Mixed-Up Mother Goose
Mixed-Up Mother Goose |
---|
Developer: Sierra On-Line This game has unused code. This game has a notes page |
Mixed-Up Mother Goose is a simplified adventure game for children. The object is to reunite the scattered parts of various nursery rhymes.
The game was remade and rereleased several times:
- 1987 AGI version
- 1990 SCI version
- 1991 VGA CD-ROM
- 1995 Deluxe CD-ROM
To do: Version differences. |
Sub-Page
Notes |
Unused Logic Resource 120
(This section applies to the AGI version.)
The programming of AGI games is stored in numbered logic resources. Logic resource 0 is the "main loop" that runs once per frame. In Mixed-Up Mother Goose, logic 0 is also responsible for randomizing the locations of items at the start of the game.
The game's logic resource 120 is unused. It is a near-copy (perhaps an early version) of the randomization code from logic 0. Besides some minor rearrangement of commands, there are a few differences from the code that is used in-game:
- The game has an array of "warps", rooms to which certain items may be transported when dropped. Both logics choose two random rooms to be warps, but logic 120 does not then append rooms 4, 25, 18, 5, and 33 to the array.
- The randomization algorithm has a failsafe: if an attempt to place any single item fails too many times, it starts over from the beginning. In logic 0, the threshold of failures is 250; in logic 120 the threshold is 232.
- Logic 120 permits Peter Peter Pumpkin Eater's wife to be placed in room 11, which is adjacent to his own yard in room 12. Logic 0 forbids this situation, presumably because Peter would be able to see his wife and wouldn't need help finding her.
- Logic 120 uses a different set of working variables,
v240
–v246
rather thanv135
–v141
.
The following is the differences between the decompiled logic code of logic resources 0 and 120, with symbolic names added:
// The first 7 items are animated items // that cannot be stored in interior rooms. #define ITEM_PUMPKIN_WIFE 11 #define ITEM_MISS_MUFFET 12 #define ITEM_MOUSE 13 #define ITEM_FIDDLERS_THREE 14 #define ITEM_SHEEP 15 #define ITEM_LITTLE_DOG 16 #define ITEM_LITTLE_LAMB 17 // The remaining items may go in any room. #define ITEM_FIDDLE 18 #define ITEM_PIE 19 #define ITEM_KNIFE 20 #define ITEM_STEAK 21 #define ITEM_PIPE 22 #define ITEM_BOWL 23 #define ITEM_BROTH 24 #define ITEM_CANDLESTICK 25 #define ITEM_PAIL 26 #define ITEM_WATERING_CAN 27 #define ITEM_SIXPENCE 28 #define ITEM_LADDER 29 #define ITEM_HORSE 30 #define v_unused v128 #define v_warp_ptr v129 #define v_index v209 -#define v_item v135 -#define v_room v136 -#define v_contents_ptr v137 -#define v_contents v138 -#define v_warp_index v139 -#define v_next_item v140 -#define v_num_attempts v141 +#define v_item v240 +#define v_room v241 +#define v_contents_ptr v242 +#define v_contents v243 +#define v_warp_index v244 +#define v_next_item v245 +#define v_num_attempts v246 start_over: - v_num_attempts = 0; // Variables v51 through v94 represent the contents // of the game's 44 rooms. Initially make all rooms // assignable (code 255). v_index = 51; init_loop: *v_index = 255; v_index++; if (v_index < 95) { goto(init_loop); } // Some rooms are not eligible for item assignment; // mark them empty (code 0). v51 = 0; v53 = 0; + v54 = 0; + v55 = 0; v57 = 0; v59 = 0; v60 = 0; v62 = 0; v63 = 0; v65 = 0; + v68 = 0; v71 = 0; v73 = 0; v74 = 0; + v75 = 0; v76 = 0; v77 = 0; v81 = 0; v82 = 0; + v83 = 0; v88 = 0; v92 = 0; - v84 = ITEM_WATERING_CAN; // Store the watering can in room 34. - v54 = 0; - v55 = 0; - v68 = 0; - v75 = 0; - v83 = 0; // The array of warp locations starts at address 170. v_warp_ptr = 170; + v84 = ITEM_WATERING_CAN; // Store the watering can in room 34. + // Choose two random overworld rooms to be warps. // These rooms are not assigned an item. v_warp_index = 1; warps_loop: random(1, 35, v_room); v_contents_ptr = v_room; v_contents_ptr += 50; v_contents = *v_contents_ptr; if (v_contents == 255) { // This room is empty. Make it a warp. *v_contents_ptr = 0; *v_warp_ptr = v_room; v_warp_ptr++; v_unused++; v_warp_index++; } if (v_warp_index < 3) { goto(warps_loop); } - // Append some hardcoded rooms to the warps array. - *v_warp_ptr = 4; - v_warp_ptr++; - *v_warp_ptr = 25; - v_warp_ptr++; - *v_warp_ptr = 18; - v_warp_ptr++; - *v_warp_ptr = 5; - v_warp_ptr++; - *v_warp_ptr = 33; - v_warp_ptr++; - // For each item, choose random rooms until we find one // that is capable of storing the item. + v_num_attempts = 0; v_item = 11; try_choose_room: random(1, 44, v_room); v_contents_ptr = v_room; v_contents_ptr += 50; v_contents = *v_contents_ptr; if (v_contents != 255) { // This room's contents are already decided. goto(try_choose_room); } v_num_attempts++; - if (v_num_attempts > 250) { + if (v_num_attempts > 232) { // If we get stuck trying to place any single item, // start over from the beginning. goto(start_over); } if ((v_item < 18) && (v_room > 35)) { // Cannot store an animated item in an interior room. goto(try_choose_room); } if ((v_item == ITEM_PIE) && (v_room == 43)) { // Do not put Jack Horner's pie in his own house. goto(try_choose_room); } if ((v_item == ITEM_STEAK) && (v_room == 36)) { // Do not put the Sprats' steak in their own house. goto(try_choose_room); } if (((v_item == ITEM_PIPE) || (v_item == ITEM_BOWL)) && (v_room == 37)) { // Do not put Old King Cole's pipe and bowl in his own throne room. goto(try_choose_room); } if ((v_item == ITEM_BROTH) && (v_room == 44)) { // Do not put the old woman's broth in her own house/shoe. goto(try_choose_room); } if ((v_item == ITEM_SIXPENCE) && (v_room == 40)) { // Do not put the crooked man's sixpence in his own house. goto(try_choose_room); } if ((v_item == ITEM_HORSE) && ((v_room == 37) || (v_room == 11))) { // Do not put the horse north of Banbury Cross. (Can only deliver // the horse by entering the room from the east, west, or south.) goto(try_choose_room); } - if ((v_item == ITEM_PUMPKIN_WIFE) && (v_room == 11)) { - // Do not put Peter Peter Pumpkin Eater's wife where - // he would be able to see her over the fence. - goto(try_choose_room); - } // Found a usable item–room pairing. Store the item. v_num_attempts = 0; *v_contents_ptr = v_item; // Step to the next item. The items are not visited // in numerical order, for some reason. if (v_item < 17) { v_next_item = v_item; v_next_item++; } if (v_item == 17) { v_next_item = 30; } if (v_item == 30) { v_next_item = 22; } if (v_item == 22) { v_next_item = 23; } if (v_item == 23) { v_next_item = 24; } if (v_item == 24) { v_next_item = 28; } if (v_item == 28) { v_next_item = 19; } if (v_item == 19) { v_next_item = 21; } if (v_item == 21) { v_next_item = 20; } if (v_item == 20) { v_next_item = 25; } if (v_item == 25) { v_next_item = 26; } if (v_item == 26) { v_next_item = 29; } if (v_item == 29) { v_next_item = 18; } if (v_item == 18) { v_next_item = 0; } v_item = v_next_item; if (v_item != 0) { goto(try_choose_room); }
- Pages missing developer references
- Games developed by Sierra On-Line
- Pages missing publisher references
- Games published by Sierra On-Line
- DOS games
- Atari ST games
- Amiga games
- Apple II games
- Windows games
- Mac OS Classic games
- Pages missing date references
- Games released in 1987
- Games with unused code
- Games with revisional differences
- To do
Cleanup > Pages missing date references
Cleanup > Pages missing developer references
Cleanup > Pages missing publisher references
Cleanup > To do
Games > Games by content > Games with revisional differences
Games > Games by content > Games with unused code
Games > Games by developer > Games developed by Sierra On-Line
Games > Games by platform > Amiga games
Games > Games by platform > Apple II games
Games > Games by platform > Atari ST games
Games > Games by platform > DOS games
Games > Games by platform > Mac OS Classic games
Games > Games by platform > Windows games
Games > Games by publisher
Games > Games by publisher > Games published by Microsoft > Games published by Activision Blizzard > Games published by Activision > Games published by Sierra Entertainment > Games published by Sierra On-Line
Games > Games by release date > Games released in 1987