Skip to main content
CodeJam features 5 competitive game modes, each designed to test different coding skills. From fixing syntax errors under pressure to optimizing memory usage in C++, each mode offers unique challenges and escalating difficulty.

Available Game Modes

Syntax Smasher

Race against time to fix broken syntax errors in JavaScript.Difficulty: Beginner
Base XP: 100
Language: JavaScript

Function Fury

Master higher-order functions and stubborn closures.Difficulty: Intermediate
Base XP: 150
Language: JavaScript

CSS Combat

Master flexbox and grid in a battle arena.Difficulty: Advanced
Base XP: 200
Language: CSS

Logic Labyrinth

Navigate the maze using boolean logic gates.Difficulty: Intermediate
Base XP: 175
Language: Python

Algo Arena

Optimize memory usage in high-stakes sorting battles.Difficulty: Expert
Base XP: 300
Language: C++

Syntax Smasher

Perfect for beginners learning JavaScript fundamentals
Race against time to fix broken syntax errors. This fast-paced mode tests your ability to spot missing semicolons, incorrect brackets, and typos under pressure.

Objectives

ObjectiveTypeTarget
Survive 5 RoundsCollection5
Maintain 5x StreakStreak5
No Compilation ErrorsBoolean1

Scoring

  • Base XP: 100
  • Streak Multiplier: Up to 2.5x
  • Speed Bonus: Complete rounds faster for bonus XP

Strategy Tips

Focus on maintaining your streak early. Each consecutive correct answer multiplies your score, so accuracy beats speed until you hit a 5x streak.

Function Fury

Intermediate JavaScript developers ready for closures and callbacks
Master higher-order functions, debug callbacks, and untangle closure chains. This mode challenges your understanding of JavaScript’s functional programming paradigms.

Objectives

ObjectiveTypeTarget
Fix Syntax ErrorsCollection1
Maintain 3x StreakStreak3
Complete under 60sTime60s

Scoring

  • Base XP: 150
  • Time Bonus: Complete challenges under 60 seconds
  • Streak Bonus: 1.5x multiplier at 3x streak

Code Example

Typical challenges involve fixing patterns like this:
// Broken closure - can you spot the issue?
function createCounter() {
  let count = 0;
  return function() {
    count++;
    return count; // Missing semicolon
  }
}

CSS Combat

Advanced players only - requires deep flexbox and grid knowledge
Match pixel-perfect layouts using flexbox and grid in a timed arena. This mode tests your ability to translate visual designs into CSS code.

Objectives

ObjectiveTypeTarget
Match LayoutBoolean1
Perfect AlignmentStreak1

Scoring

  • Base XP: 200 (highest base reward)
  • Precision Bonus: Pixel-perfect matches earn bonus XP
  • No penalty for retries - focus on perfection

Common Patterns

/* Master these layouts */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
Use browser DevTools to inspect target layouts. Understanding the DOM structure helps you choose between flexbox and grid.

Logic Labyrinth

Python enthusiasts - navigate boolean logic gates
Navigate mazes using boolean logic gates, conditional statements, and path optimization algorithms. This mode combines problem-solving with Python fundamentals.

Objectives

ObjectiveTypeTarget
Solve MazeBoolean1
Optimize PathBoolean1

Scoring

  • Base XP: 175
  • Optimization Bonus: Shortest path solutions earn double XP
  • Time Bonus: Complete under target time

Logic Gates

Mazes include AND, OR, NOT, and XOR gates:
# Navigate through logic gates
def navigate_maze(position, gates):
    if gates['AND'] and gates['OR']:
        return move_forward(position)
    elif not gates['NOT']:
        return move_right(position)
    return position

Algo Arena

Expert mode - requires advanced C++ and algorithm knowledge
Optimize memory usage in high-stakes sorting battles. This brutal mode tests your understanding of Big O notation, memory management, and algorithm optimization.

Objectives

ObjectiveTypeTarget
Pass Unit TestsBoolean1
O(n) MemoryBoolean1

Scoring

  • Base XP: 300 (maximum base reward)
  • Memory Efficiency: O(n) memory earns 2x multiplier
  • Speed Bonus: O(n log n) or better time complexity

Memory Challenge

// Optimize this sorting algorithm for O(n) memory
vector<int> efficientSort(vector<int>& nums) {
    // Your solution must use constant extra space
    // or in-place modifications only
    sort(nums.begin(), nums.end());
    return nums;
}
Focus on in-place algorithms. Mergesort requires O(n) extra space, but quicksort and heapsort can be done in-place.

Game Stats & Progression

Your performance in each game mode is tracked in the game_stats table:
// From convex/schema.ts:68-74
game_stats: defineTable({
  userId: v.id("users"),
  gameId: v.string(), // 'syntax-smasher', 'function-fury', etc.
  bestScore: v.number(),
  gamesPlayed: v.number(),
  lastPlayed: v.number(),
})

Tracked Metrics

  • Best Score - Your highest score in each mode
  • Games Played - Total attempts per mode
  • Last Played - Timestamp of last session
  • Leaderboard Rank - Compared against all players

Pro Strategy

Start with Syntax Smasher to build confidence, then progress to Function Fury. Master these JavaScript modes before attempting CSS Combat or the expert-level challenges.

Implementation Reference

Game definitions are stored in convex/games.ts:31-89:
const GAME_DEFINITIONS: Record<string, any> = {
  'function-fury': {
    title: 'Function Fury',
    language: 'JavaScript',
    difficulty: 'Intermediate',
    description: 'Master higher-order functions and stubborn closures.',
    objectives: [
       { id: 'syntax', label: 'Fix Syntax Errors', type: 'collection', target: 1 },
       { id: 'streak', label: 'Maintain 3x Streak', type: 'streak', target: 3 },
       { id: 'speed', label: 'Complete under 60s', type: 'time', target: 60 }
    ],
    baseXp: 150
  },
  // ... additional modes
}
All game metadata is served from the backend to ensure security and consistency. Client-side modifications are prevented.

Boss Battles

Take on epic debugging challenges

Ghost Mode

Compete asynchronously against friends

Build docs developers (and LLMs) love