- Learn
- Build a Game
- Crystal Cascade
- Appendices
- D Tuning Tables
Appendix D — Tuning Tables
The numbers that make Crystal Cascade play the way it does. Change them to remix the game: the game’s Logic reads them from here. Try one change at a time, and run the game after each. If something stops working, put the old number back.
D.1 Data Tables
D.1.1 Well Layout
Where the well is on screen and how big it is. One row. columns: the cells across (10); rows: the cells up, the two hidden rows above the top included (22); visibleRows: the rows the player sees (20); cellSize: the size of one cell in meters (1.5); left and bottom: the outer edges of the bottom-left cell, in meters.
1022201.522.51.875D.1.2 Piece Kinds
The seven kinds of piece. Row index + 1 is the kind number the Well stores (1 = I … 7 = L). frame: the crystal’s frame in the sprite “Crystal Blocks”. color: the kind’s color, as a hex color (the color of the shards when one of its crystals shatters). rotationColumn, rotationRow: the point of its 4 x 4 box the kind rotates about (its rotations are its up shape rotated about it, Piece Shapes). firstKickRow: where this kind’s quarter-rotation kicks start in the Kicks table. streakColor: the lighter tint of its hard-drop streak. middleColumn, middleRow: the middle of the piece in its box (rotation up), to center it in a preview. canTwist: this kind can make a twist (the T).
1#3cd6ff1.51.540#7fe6ff22.5No2#ffce3a1.52.50#ffe27a23No3#b268ff120#cf9dff1.53Yes4#60e25c120#9ff09a1.53No5#ff486e120#ff8aa41.53No6#3a74ff120#83a8ff1.53No7#ff9232120#ffbd7a1.53NoD.1.3 Piece Shapes
The four crystals of each kind of piece as it appears (rotation up). Row index = (kind - 1) * 4 + crystal - 1; column and row are the crystal’s cell in the piece’s 4 x 4 box, row 0 at the bottom. The other rotations are this shape rotated clockwise about the kind’s rotation point (Piece Kinds; Crystal Cell).
021222D.1.4 Well
The stack, one row per cell: row index = row * columns + column (Well Layout), row 0 at the bottom; rows 20 and 21 are hidden above the top. kind: 0 empty, 1-7 a crystal of that kind (Piece Kinds). Its rows are made, all empty, by Empty The Well when a game begins. isClearing: the crystal is in a full line and is shattering (until the rows above drop).
D.1.5 Kicks
Where to try a rotated piece, in order (the standard rotation system’s wall kicks): columnShift to the right, rowShift up. Rows 0-39: J, L, S, T, Z and O quarter rotations; 40-79: I quarter rotations; 80-99: 180-degree rotations. Quarter rotation: row = firstKickRow (Piece Kinds) + (from rotation * 2, + 1 counterclockwise) * testsPerRotation + test. 180: row = firstHalfRotationRow + from rotation * testsPerRotation + test (Kicks Layout).
00-10-11D.1.6 Kicks Layout
How the Kicks table is laid out. One row. testsPerRotation: places tried for each rotation, in order; firstHalfRotationRow: where the 180-degree rotations start.
580D.1.7 Crystal Frames
Frames of the sprite “Crystal Blocks” that are not a kind of piece. One row. shatter: a crystal in a full line. stone: a crystal when the game is over.
89D.1.8 Queue
The pieces to come, in order: row 0 is the next one. piece: a kind (Piece Kinds), 0 for an empty row. Two bags of seven fit; Deal Pieces adds a bag whenever fewer than seven are left.
000D.1.9 Preview Slots
The preview boxes: isHold marks the Hold box (it shows the held piece); otherwise queuePlace is the Queue row the box shows (0 = the next piece); middleX, middleY the box’s middle (meters); cellSize the size of one crystal there.
No043.26562528.68751.3125No143.26562524.843750.984375No243.26562521.281250.984375No343.26562517.718750.984375No443.26562514.156250.984375Yes016.73437528.68751.3125D.1.10 Clear Names
Every kind of lock: row = twist * 5 + lines (twist 0 none, 1 mini, 2 full twist). name: what the player is told (empty: nothing); points: before the level multiplier; sound: what plays; isDifficult: a clear that counts for back-to-back (4 lines, or any twist with lines); allClearPoints: the bonus when such a clear empties the well (row = lines). isCascade: a four-line clear, counted on the results.
0No0NoSINGLE100Clear SingleNo800NoDOUBLE300Clear DoubleNo1200NoD.1.11 Twist Corners
The four corners of the T’s 3 x 3 box, clockwise from the top left (row 0 to 3). column and row: the corner’s cell in the piece’s 4 x 4 box. The two front corners of a rotation (on the side the T points to) are the corners numbered rotation and rotation + 1, going round (Twist Kind).
03232101D.1.13 Modes
The four ways to play; row = $mode - 1 (Marathon, Sprint 40, Ultra, Zen). name: shown on the stats panel. calmTheme: plays Zen Tide instead of Crystal Current. levelRow, linesRow and clockRow: which of the stats panel’s rows show (LEVEL, GOAL or RESETS; LINES or LINES LEFT; TIME or TIME LEFT). goalLines: the lines that finish the mode (0: no goal); stopsAtGoal: the lines count stops at the goal (Sprint 40). timeLimit: the seconds a game lasts (0: no limit). finishTitle: the results title when the mode is finished. levelClimbs: the level rises with the lines (Marathon, Ultra). fallSeconds: a fixed fall time for every level (Zen; 0: by level). freshStart: topping out empties the well and the game goes on (Zen). startsAtChosenLevel: the game starts at the level chosen on the Main Menu (Marathon; the others at level 1). bestKey: the Persistent Value key its best is kept under (the keys of the original), which also marks the text of the mode on the PERSONAL BEST panel.
MARATHONNoLEVELLINESTIME150No0MARATHON COMPLETE!Yes0NoYesbestMarathonSPRINT 40NoGOALLINES LEFTTIME40Yes0SPRINT COMPLETE!No0NoNobestSprintULTRANoLEVELLINESTIME LEFT0No120TIME UP!Yes0NoNobestUltraZENYesRESETSLINESTIME0No0No1.1YesNobestZenD.2 Logic Numbers
The numbers and colors each Logic Component keeps in its Shared Variables and Per Instance Variables, with the Starting Value its card gives. A value set on its Object, under Variables in the Properties, or on a placement in the Scene, wins over the value here.
SHOW WELL CELL
popScale ................... 1.22
popSeconds ................. 0.2
stoneDelaySeconds .......... 0.05
stoneRowSeconds ............ 0.035
SPAWN PIECE
startColumn ................ 3
PIECE GRAVITY
lockResetLimit ............. 15
curveStartSeconds .......... 0.8
curveStepSeconds ........... 0.007
READ THE MOVE KEYS
autoRepeatDelaySeconds ..... 0.15
autoRepeatSeconds .......... 0.03
SHOW PIECE CRYSTAL
dimmedAlpha ................ 0.55
crystal .................... 1
SOFT DROP PIECE
speedUp .................... 20
slowestSeconds ............. 0.05
HARD DROP PIECE
shakeStrength .............. 0.004
shakeSeconds ............... 0.12
FADE AWAY
startAlpha ................. 0.95
fadeSeconds ................ 0.26
removeSeconds .............. 0.3
SHOW DROP STREAKS
streakArtMeters ............ 6
sparksCellsAboveMiddle ..... 0.4
CLEAR FULL LINES
clearSeconds ............... 0.42
entrySeconds ............... 0.06
shakePerLine ............... 0.0025
shakeSeconds ............... 0.28
flashColor ................. #c9f6ff
flashSeconds ............... 0.25
twistShake ................. 0.004
SHOW PREVIEW CRYSTAL
usedAlpha .................. 0.35
slot ....................... 0
crystal .................... 1
SCORE POINTS
softDropPoints ............. 1
hardDropPoints ............. 2
backToBackTimes ............ 1.5
FADE OUT MESSAGE
showSeconds ................ 1.8
fadeSeconds ................ 0.33
COUNT COMBO
comboPoints ................ 50
SHOW ALL CLEAR
flashColor ................. #e8fdff
flashSeconds ............... 0.45
sparkleCount ............... 70
fountainRow ................ -0.8125
COUNT LEVEL
linesPerLevel .............. 10
lastLevel .................. 20
SHOW LEVEL UP
sparkleCount ............... 50
CHECK TOP OUT
shakeStrength .............. 0.01
shakeSeconds ............... 0.5
OPEN RESULTS
resultsDelaySeconds ........ 1.6
SHOW WITH RESULTS
shownAlpha ................. 1
SHOW WHEN PANEL CHOICE
choice ..................... 0
PANEL CHOICE
choice ..................... 0
MAIN MENU CONTROLS
startLevelChoice ........... 0
highestStartLevel .......... 15
musicFadeSeconds ........... 0.5
SHOW WITH HELP
shownAlpha ................. 1
GAME MUSIC
musicFadeSeconds ........... 0.5
BLINK
period ..................... 1.6
dimAlpha ................... 0.1
TITLE CONTROLS
musicFadeSeconds ........... 0.5
RISE AND SWAY
smallestSize ............... 0.22
largestSize ................ 0.85
riseSpeed .................. 0.65625
risePerSize ................ 2.15625
swaySpeed .................. 0.75
swaySeconds ................ 4.5
leftmost ................... 1.40625
rightmost .................. 58.59375
bottomStart ................ -3.75
DRIFT DOWN
slowestFall ................ 1.6
fastestFall ................ 2.7
fastestSpin ................ 40
smallestScale .............. 0.9
largestScale ............... 1.7
faintest ................... 0.55
clearest ................... 0.9
leftmost ................... 1.875
rightmost .................. 58.125
topStart ................... 36.5625
FINISH THE MODE
sparkleCount ............... 80
fountainCount .............. 120
fountainRow ................ -0.8125
START AFRESH
sparkleCount2 .............. 70
SHOW MENU SPRINT BEST
choice ..................... 1
COUNT DOWN
countdownSeconds ........... 3
SHOW WHILE PAUSED
shownAlpha ................. 1
