Skip to main content

Challenge Overview

CodeJam features five distinct challenge types, each testing different coding skills and offering unique objectives. Complete challenges to earn XP, unlock badges, and climb the leaderboard.

Function Fury

Intermediate JavaScriptMaster higher-order functions and closuresBase XP: 150

Syntax Smasher

Beginner JavaScriptRace against time to fix syntax errorsBase XP: 100

CSS Combat

Advanced CSSMaster flexbox and grid in battle arenaBase XP: 200

Logic Labyrinth

Intermediate PythonNavigate mazes using boolean logicBase XP: 175

Algo Arena

Expert C++Optimize memory usage in sorting battlesBase XP: 300

Objective Types

Every challenge features multiple objectives that determine your final score and XP reward. Understanding each objective type is key to maximizing your performance.

Collection Objectives

Complete a specific number of tasks or rounds.
{ 
  id: 'syntax', 
  label: 'Fix Syntax Errors', 
  type: 'collection', 
  target: 1 
}
Collection objectives track cumulative progress. You must reach the target number to complete the objective.

Streak Objectives

Maintain consecutive successful completions without breaking the chain.
{ 
  id: 'streak', 
  label: 'Maintain 3x Streak', 
  type: 'streak', 
  target: 3 
}
Streak objectives reset to zero if you make a mistake. Consistency is crucial!

Time Objectives

Complete the challenge within a time limit.
Function Fury
{ 
  id: 'speed', 
  label: 'Complete under 60s', 
  type: 'time', 
  target: 60 
}
Time objectives reward speed. Every second counts toward your final score.

Boolean Objectives

Binary pass/fail requirements with strict criteria.
{ 
  id: 'clean', 
  label: 'No Compilation Errors', 
  type: 'bool', 
  target: 1 
}
Boolean objectives are all-or-nothing. You either complete them perfectly or not at all.

Scoring System

Your final score determines XP rewards and leaderboard ranking.

Base XP Rewards

Each challenge awards base XP upon completion:
1

Beginner: 100 XP

Syntax Smasher - Perfect for new players
2

Intermediate: 150-175 XP

Function Fury (150), Logic Labyrinth (175)
3

Advanced: 200 XP

CSS Combat - Complex layout challenges
4

Expert: 300 XP

Algo Arena - Maximum reward for peak difficulty

Score Calculation

The updateGameStats mutation tracks your performance:
convex/social.ts
export const updateGameStats = mutation({
  args: { gameId: v.string(), score: v.number() },
  handler: async (ctx, args) => {
    const userId = await getAuthUserId(ctx);
    if (!userId) throw new Error("Unauthorized");

    const existing = await ctx.db
      .query("game_stats")
      .withIndex("by_user_game", (q) => 
        q.eq("userId", userId).eq("gameId", args.gameId)
      )
      .first();

    if (!existing) {
      await ctx.db.insert("game_stats", {
        userId,
        gameId: args.gameId,
        bestScore: args.score,
        gamesPlayed: 1,
        lastPlayed: Date.now()
      });
    } else {
      await ctx.db.patch(existing._id, {
        bestScore: Math.max(existing.bestScore, args.score),
        gamesPlayed: existing.gamesPlayed + 1,
        lastPlayed: Date.now()
      });
    }
  }
});
Only your best score is saved per challenge. Keep playing to improve your personal record!

Difficulty Levels

Challenges are categorized by difficulty to help you find the right level:
Syntax Smasher - JavaScript fundamentals
  • Simple syntax errors
  • Clear error messages
  • Forgiving time limits
  • Perfect for learning
Function Fury - JavaScript advanced conceptsLogic Labyrinth - Python logic gates
  • Complex problem-solving
  • Multiple objectives
  • Moderate time pressure
  • Requires solid fundamentals
CSS Combat - Modern CSS mastery
  • Flexbox and grid layouts
  • Pixel-perfect matching
  • High precision requirements
  • Strong CSS knowledge needed
Algo Arena - C++ optimization
  • Memory complexity constraints
  • Performance optimization
  • Unit test requirements
  • Algorithmic expertise essential

Challenge Strategy

Start with Objectives

Review all objectives before starting. Plan which ones to prioritize based on your strengths.

Manage Streaks

Streak objectives are high-risk, high-reward. Take your time on early rounds to build momentum.

Watch the Clock

Time objectives require speed. Practice runs help you optimize your approach.

Test Thoroughly

Boolean objectives demand perfection. Always verify your solution before submitting.
Play challenges multiple times to improve your best score. Your stats track both your highest score and total games played.

Next Steps

Progression System

Learn how XP, levels, and streaks work

Achievements

Unlock badges and track milestones

Leaderboard

Compete globally and track your rank

Battle System

Challenge friends in live or ghost mode

Build docs developers (and LLMs) love