Core Systems
Focus Points
Focus Points are the base currency of LevelUp. You earn them from four sources: focus time, lines of code, keystrokes and review time. Each of them is computed with your current Activity Score (0–100%).
The Vault groups these into three buckets: Coding, Review and Focus Time.
The formula for FP
Focus seconds × 0.7 × A²
+ Lines × 9.0 × Quality × Decay × A
+ Keystrokes × 0.4 × A
+ Review seconds × (28/60) × A
A is your Activity Score as a value between 0 and 1 (100% = 1.0). Every term scales with A, except Review time, which scales linearly with A instead of squared (see below).
The Activity Score has a built-in floor at 30%. It is never weighted with less than 30%, even if your actual activity score is lower. True 0 FP only occurs through inactivity (idle or inactive).
Source 1: Focus time (up to 42 FP per minute)
Every 3 seconds LevelUp checks whether you are in an active state right now (Activity Tracker). If so, that time counts as focus time, worth 0.7 FP per second, weighted by A².
The square is intentional. Half attention gives you a quarter of the FP. The more focused the session, the more FP you earn.
| Activity Score | FP per minute |
|---|---|
| 100% | 42.0 |
| 80% | 26.9 |
| 50% | 10.5 |
| 30% or below (floor) | 3.8 |
| Idle (no activity) | 0 |
Source 2: Lines of Code (up to ~10 FP per line)
A written line is worth up to 9 FP × quality factor × A. For a line to count at all, it has to clear three hurdles:
- More than 6 characters (after whitespace is stripped).
- Not yet counted: each line number counts only once. The lock resets when the file is saved.
- No paste: pasted text earns no LOC (see the Anti-Cheat chapter).
The quality score
Every valid line gets a quality score. It starts at 0.3 and is adjusted:
| Criterion | Effect |
|---|---|
| Line has code structure | +0.5 (otherwise −0.2) |
| Reads like natural text | +0.2 |
| Under 10 characters | −0.1 |
| Over 15 characters | +0.1 |
| Over 30 characters | +0.1 |
| Excessive character repetition (spam) | Score drops to a fixed 0.01 |
The score is then translated into an FP factor:
| Quality score | FP factor | FP per line (at 100% activity) |
|---|---|---|
| under 0.11 | 0.05 | 0.45 |
| up to 0.3 | 0.1 | 0.9 |
| up to 0.4 | 0.3 | 2.7 |
| up to 0.5 | 0.5 | 4.5 |
| up to 0.6 | 0.8 | 7.2 |
| up to 1.1 | 1.0 | 9.0 |
| over 1.1 | 1.1 | 9.9 |
A typical, decent line of code lands at factor 1.0, so 9 FP. Spam lines land at 0.45 FP and additionally trigger spam detection.
The decay, or why mass does not win
Within a writing burst (a typing pause of 1.5 seconds ends the burst) every further line loses value:
1st line ×1.0 → 2nd ×0.8 → 3rd ×0.6 → 4th ×0.4 → 5th ×0.2 → from the 6th ×0.05
The next burst starts the counter again at ×1.0. Whoever writes line by line in peace gets the full value. Whoever generates 20 lines in one go gets almost nothing.
Source 3: Keystrokes (0.4 FP per press)
Every validated key press brings 0.4 FP × A. Validated means the paste and spam detection classified it as real typing.
Source 4: Review time (up to 28 FP per minute)
Review time rewards time spent reading and understanding code, even when you are not typing. See the Activity Tracker chapter for how LevelUp detects it. It pays 0.467 FP per second, weighted by A, on top of Focus time.
Focus time uses A² (the score squared). Review time uses A instead, without the square. Light edits while reading are not a flow state, so they earn less per second than focused writing.
| Activity Score | FP per minute |
|---|---|
| 100% | 28.0 |
| 80% | 22.4 |
| 50% | 14.0 |
| 30% or below (floor) | 8.4 |
| True idle (no activity) | 0 |
What earns no FP
| Case | Why nothing |
|---|---|
| Pastes | Neither as keystrokes nor as lines |
| Time without activity | During Idle or Cooldown, focus time stands still |
| Anything during a spam block | Triggers spam detection. All FP sources are set to zero for the duration of the block (see Anti-Cheat) |
| FP over the Vault capacity | Once the Vault is full, new FP fizzle out. Claiming makes room, so click on the status item to claim the vault. |
