Build a GameCreating Crystal Cascade

Appendix E — Troubleshooting

Every chapter’s If it didn’t work names the slips most likely in that chapter, and how to find each one. Here they are together, chapter by chapter.

Two checks find most of them. First, names must match exactly: a message, a timer or a table row is matched letter for letter, capitals included. Second, compare with the chapter’s game. Every chapter’s Goal holds the game as it is at the end of that chapter, and its catch-up download is that chapter’s finished project. Play it next to yours.

E.1 Chapter 1: Falling Crystals

The empty well has no windows? Look at Glass Well’s Build The Well attachment, then its wellCell Shared Variable. It should name Well Cell. Run again, and the Scene creates the windows for you.

Only one crystal seems to move? The placements may all have the same crystal value. Change their Per Instance Variables to match the setup card, then run again. Each picture now has its own place in the shape.

A self name stays red? Read it from the left, and compare its Data Structure name and field. Attach the Logic to its Object and give it the structures its card lists. Retype the expression once those names exist.

Does the piece pass through a wall? Compare Piece Fits Here with Well Cell Filled, watching which answer each Function returns to its caller. A true answer means filled in one Function and fits in the other. Match the If tests with their cards, then try the wall again.

The piece won’t fall? In Piece Gravity, check the gravity Event starts in Falling. Make both Modes first. Choose them in Switch Mode, then run again and watch the next piece begin to fall.

E.2 Chapter 2: Rotating and Dropping

The ghost sits on the piece? Check showsLanding on each Ghost Crystal placement. It belongs on those outlines, while the falling crystals leave it off. Turn it on there and run again; the outline can now read landingRow.

The ghost stays behind after a slide? Look for Find Landing Row in Move Piece, before pieceMoved. Restore that call, then slide again. The new answer reaches both sets of pictures, keeping the ghost beneath the piece as you move it.

Does holding Down slow the next piece? Check the Attached Logic order on Falling Piece. Soft Drop Piece must follow Piece Gravity, so it can restart the timer after gravity starts it normally.

A hard drop draws no light? Look at Falling Piece’s streak Shared Variable. Choose the Drop Streak resource, then try a drop with room beneath it. That gives Show Drop Streaks something to create.

No extra time after sliding? Check that sliding and successful rotation send pieceShifted on Falling Piece. The listener is in Piece Gravity. Bring back the missing message or listener, then try the same slide again.

E.3 Chapter 3: Clearing Lines

The line flashes, but the stack never moves? Check the clearDelay timer Event and its name in Start Recurring Timer. The same spelling joins the wait to its listener. Restore the timer’s name or its listener, then fill another row to watch the delay finish its work.

A row gets copied into the wrong place? Watch targetRow in the clear-delay Event. It advances only for a kept row, while checkRow advances through every old row. Compare the If’s inside Actions with the card, then run the same clear again.

The count stays at its starting value? Check Count Lines is attached to Game Rules and its well Shared Variable names Glass Well. Then compare the Global lines name with the template on LINES Value. Those pieces can now share the same answer.

The next piece won’t move? Compare the Set Logic State Actions in Spawn Piece with the ones in Lock Piece. The first set wakes what the second set rested. Restore the missing Enable Action, start another piece, and check its controls before trying the next clear.

E.4 Chapter 4: The Queue and Hold

Nothing arrives at the start? Check Piece Queue is placed and Deal Pieces is attached. Spawn Piece no longer starts itself in When Created; it waits for the queue. Restore that Object, then run again.

The same kind stays at the front? Compare the pieceDealt sender in Spawn Piece with Deal Pieces’ listener. That message advances the waiting line. Match its spelling in the sender and listener, then lock again and watch the next kind take its place.

All the preview crystals cover each other? Compare their slot and crystal Per Instance Variables with PLACE THESE. The first placement values can stay at their defaults, but the copies need the card’s changes. Correct one slot, run it, then finish the others.

Hold works only once for the whole game? Look at Lock Piece. Then check Spawn Piece enables Hold Piece. Those changes give the next piece its own chance to trade. Run it again.

E.5 Chapter 5: Scoring and Levels

The name appears but makes no sound? Open Show Clear Name’s Control Sound and type the table expression into Sound. Its suggestions are choices, rather than a restriction to fixed resources. Try the same clear again and listen.

An open T twists? Compare the corner tests in Twist Kind with its card. The whole-box tally must qualify before the front-corner or last-kick test can choose a full twist. Restore the outer If and try an open turn again.

A T still twists after moving? Check the flag changes in Move Piece, Piece Gravity and Hard Drop Piece. A successful fall or slide clears lastMoveWasRotation. Restore the missing change and repeat the move before locking.

The level seems late? Count Level must run after Count Lines, but Score Points handles the lock before that level rise. Compare the attachment order and message names, then clear across the boundary again. The next piece should use the new pace.

E.6 Chapter 6: Game Over and Results

The game keeps asking for pieces after the well fills? Compare Spawn Piece’s starting-place test and its pieceBlocked sender with Check Top Out. Does On Next Piece Due also test Playing? Restore the boundary, then keep dropping into the middle until you reach the top again.

Stone appears all at once? Check Show Well Cell uses rowFromBottom in its wait, rather than only the starting delay. Their waits should differ. Restore the sum and watch the wave climb again.

The panel appears but Enter does nothing? Check Menus includes Confirm, then Open Results turns Menus on before showing the panel. Panel Choices must also receive panelOpened on Results Panel. Try Enter again after restoring those links; the selected choice should now hear you.

The next game keeps the old score? Start with Score Points. A Global survives the restart until its owner resets it. Add that reset from the card, then choose PLAY AGAIN once more.

The record’s self.shown name stays red? Check the value Object’s Game Record Text component is named shown and its Logic is attached. Retype the expression after those names agree. The finished record can then be copied into the component that each value text reads.

E.7 Chapter 7: Title and Main Menu

The menu shows but no key moves its glow? Start with the input context: Title Controls and Main Menu Controls must activate Menus before its Commands can be heard. The Commands must belong to that context. Restore the group, then enter the menu again and press Down.

Up and Down skip choices or stop wrapping? Compare Panel Choice’s Create Event and its panel value on every button. Each button counts itself on the same panel. Restore the missing reference and restart the Scene to count again.

Help opens and closes on one press? Keep the opening and closing responses in Modes of the same Confirm Event. A separate closing Event can hear the opening press too. Restore those Modes and try again.

A red self.shown name in Show Menu Info? Each info text needs its Menu Info Text component named shown before the Logic’s expressions read it. Add or rename that single component, attach the Logic, then retype the expression. The words have somewhere to arrive now.

A bubble leaves the view and never comes back up from below the screen? Look at its Leave View Event and bottomStart. Its upward velocity should remain set. Restore those values and wait for another passage through the sky.

The chosen start level disappears in Gameplay? Compare Count Level’s Scene Start branch and firstLevel assignment. Restore that boundary, return to MARATHON and choose the level again.

E.8 Chapter 8: Four Ways to Play

Every choice plays like Marathon? Check mode in Start The Chosen Mode, then compare the Modes row order. Each lookup subtracts one from mode. Restore that match, choose Sprint again, and watch its labels.

Both clocks appear together? Compare Show In Mode Row’s column and row on each text Object. The same screen position is intentional. Restore the different visibility values from their cards, then enter Ultra and watch the remaining time take that place.

Zen sparkles clean but no piece returns? Look at Spawn Piece. A blocked arrival needs that invitation after the table empties. Restore the flag and the wellReset listener, then fill the well again and watch the waiting piece arrive.

A completed game turns to stone? The cells must hear gameLost. Keep gameOver on the Logics that stop the controls and counters when either kind of ending arrives. Restore the cell’s message.

Sprint saves a time after a loss? Check Keep Bests chooses No Score Best for gameOver and saves its time on modeFinished. Restore those separate Events and start another race. A completed run can now earn a record that a shorter, lost game will leave alone.

Red self.shown expressions on a new text? Add the named component first. Compare its resource with that text’s card and keep one copy. The value now has somewhere to arrive.

The last clear misses its reward? Finish The Mode sends settleClear to Glass Well before modeFinished and gameOver. Check that well names Glass Well on Game Rules, then compare the order of the finishing Actions. Restore the connection before testing another finish.

E.9 Chapter 9: Countdown and Pause

The first piece arrives under READY? Check Deal Pieces for the removed nextPieceDue in When Created. Move the invitation to On Play Started, where the finished count can reach it. Let the count invite the piece.

The pause opens but its keys do nothing? Compare the Menus context’s Works While Paused switch with the new setting on the setup card. Pause The Game also activates that context when pausing. Restore both settings and resume.

The clock includes the countdown? Compare Scene Start with On Play Started in Time The Game. Their jobs differ. Restore those separate beginnings and watch another count.

Escape leaves the waiting piece behind? Check Open Results starts Back in While The Results Are Closed. Its timer makes the switch later. Restore the empty starting response, then pause during play and use Escape to resume that same piece.

The panel opens without a glow? Compare panel on the buttons and bright pictures with Pause Panel. Keep the existing prepared declarations. Then check the placement’s choice against its button and reopen the panel.

Zen’s best disappears after leaving? Look in Keep Bests, at When Created and its Zen Switch Mode. It chooses On Game Left’s saving Mode. Leave For The Menu must send gameLeft before changing Scenes. Restore those connections, earn a higher score, and return through MAIN MENU again.