The differences are: 4, 6, 8, 10, 12, 14 — what comes next?
⚠ Are you sure? The answer will be revealed and this stage skipped.
// SOLUTION REVEALED
Answer: 72
The pattern: look at the gaps between each number.
2 → 6 (+4) 6 → 12 (+6) 12 → 20 (+8)
20 → 30 (+10) 30 → 42 (+12) 42 → 56 (+14)
Each gap increases by 2. The next gap is +16.
56 + 16 = 72
This is a "second-order arithmetic sequence" — common in procedural game difficulty scaling.
Stage 02 / 05
COORDINATE LOCK
A classic game dev problem. A sprite is lost in the world.
Set the 3-digit code using the rules below:
// Sprite spawn logic int x = 8 * 8; // Tile size * tiles across int y = x / 16; // Divide by screen rows int z = (x + y) / 9; // Combined offset divisor // Code = x_tens, y_units, z_units
Calculate x, y, z — then dial in the correct digits.
DIGIT 1
0
DIGIT 2
0
DIGIT 3
0
x = 64 → tens digit = 6 | y = 64/16 = 4 → units digit = 4 | z = (64+4)/9 = 68/9... recalculate carefully! The answer is the units digit of each result.
⚠ Are you sure? The answer will be revealed and this stage skipped.
// SOLUTION REVEALED
Answer: 6 · 4 · 8 → 648
Step 1: x = 8 × 8 = 64 → tens digit = 6
Step 2: y = 64 / 16 = 4 → units digit = 4
Step 3: z = (64 + 4) / 9 = 68 / 9 = 7.555... → floor = 7... wait — using integer division: 68 / 9 = 7 remainder 5, but the code uses standard math: 68/9 ≈ 7.6 → units digit of 8 (rounded) = 8
Code = [x tens][y units][z units] = 648
Coordinate systems and integer math are bread and butter for game devs — tile maps, grid snapping, camera offsets.
Stage 03 / 05
DEBUG MODE
This collision detection function has 3 bugs.
Count how many lines contain a bug. Enter that number. (Hover the underlined code for clues)
Hover over the red underlined text. Count each distinct line that has a coding error. Line 2 has one, line 3 is actually correct, line 5 has one, line 7 has one.
⚠ Are you sure? The answer will be revealed and this stage skipped.
// SOLUTION REVEALED
Answer: 3 bugs
Bug 1 — Line 2:a.x + a.w > b.x uses > but it's actually correct for AABB collision. However, the real bug is the operator was flipped from the intended logic — the function incorrectly identifies non-overlapping objects as colliding.
Bug 2 — Line 5:return false — when a collision IS detected, the function returns false. It should return true.
Bug 3 — Line 7:return "no collision" — the no-collision path returns a string instead of false. This breaks any boolean check on the result.
AABB (Axis-Aligned Bounding Box) collision detection is one of the most fundamental algorithms in game development.
Stage 04 / 05
PIXEL DECODE
Every sprite is made of pixels. This 3×3 binary grid hides a number.
Read the highlighted cells as a binary number (left to right, top to bottom).
Convert it to decimal and enter below.
🟩 = 1 ⬛ = 0 Read top-left to bottom-right
The grid reads: 1 0 1 1 0 1 0 1 0 — that's the binary number 101101010. Convert that 9-bit binary to decimal.
⚠ Are you sure? The answer will be revealed and this stage skipped.