Chapter 1 of 6
The Spirit Crossing
School project
The trail is a piecewise function: six pieces, each with its own equation and its own interval of x values. The game calculates every point of the trail from these equations.
A linear function has the form y = mx + b. Its graph is a straight line, and the slope m is the same everywhere: x goes up by 1, y changes by m. The trail has three: y = 0 (slope 0, flat), y = 3x − 12 (slope 3, uphill bridge) and y = −3x + 24 (slope −3, downhill candle trail).
A quadratic function in vertex form is y = a(x − h)² + k. Its graph is a parabola with vertex (h, k). If a < 0 it opens downward (an arch). If a > 0 it opens upward (a valley). A larger |a| makes it narrower. The trail has two arches with a = −3, vertices (3, 3) and (9, 3), and one valley with a = 4, vertex (6, −1).
Each equation is used only on its own interval, in order from x = 0 to x = 10: flat start, arch, ramp up, valley, ramp down, final arch.
On its own, every equation goes on forever. For example, y = 3x − 12 keeps rising past x = 5. Restricting it to 4 ≤ x ≤ 5 keeps only the piece we need, so pieces never overlap and every x has exactly one y.
Each piece ends exactly where the next begins. The game checks this when it loads, using the real equations:
Luz's position is a math point (x, f(x)). To draw it, the game converts math coordinates to screen pixels with screenX = centerX + (x − cameraX)·k and screenY = centerY − (y − cameraY)·k. The same scale k is used for x and y, so no curve gets stretched. The minus sign flips y, because screens count downward. Luz moves by distance along the curve, so she travels at a steady speed even on steep parts.
Chapter
The Spirit Valley · vertex (6, −1)
Watch the order the lights glow, then tap the symbols in the same order. Each pattern returns one of Luz's memories.
Your progress is saved while this page stays open.
The end · thank you for remembering
Every offering you gathered now shines on the ofrenda, and the family is telling stories about Abuela Luz.