Back to Obsidian Breaker
SOURCE / PINNED RELEASE

Made of little things.

Obsidian Breaker

Release
44c589c52043…
Author-recorded commit
9ee5b61ce1c9…
License
LICENSE
Author’s source reference
nostr://npub1dmmh0futyszl4445mv4xrygkgsgj8vpu79yx3qyy9qxmz4pemtzqlqmc87/wss%3A%2F%2Fgit.napplet.soy%2F/n-de5dc6a02e7

Archive hash verified: 240ec416a9cbfd9c…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

src/levels.ts
export type BrickKind = 'shale' | 'granite' | 'basalt' | 'volatile' | 'obsidian';

export interface LevelDef {
  readonly name: string;
  readonly tagline: string;
  readonly speed: number;
  readonly rows: readonly string[];
}

export interface BrickSpec {
  readonly kind: BrickKind;
  readonly hp: number;
}

export const GRID_COLUMNS = 26;

const SEAM_HALF = GRID_COLUMNS / 2;

const BRICKS: Readonly<Record<string, BrickSpec>> = {
  '1': { kind: 'shale', hp: 1 },
  '2': { kind: 'granite', hp: 2 },
  '3': { kind: 'basalt', hp: 3 },
  v: { kind: 'volatile', hp: 1 },
  x: { kind: 'obsidian', hp: Number.POSITIVE_INFINITY },
};

export function brickSpec(character: string): BrickSpec | null {
  return BRICKS[character] ?? null;
}

/** Mirrors a 13-cell half-seam into a full 26-cell row. */
function seam(half: string): string {
  const padded = half.slice(0, SEAM_HALF).padEnd(SEAM_HALF, '.');
  return padded + [...padded].reverse().join('');
}

/**
 * Seven double-wide seams. Each half is mirrored so every row spans the full
 * 26-column field, and the deeper stages stack roughly twice the rows of the
 * original seams. Volatile veins feed each other, obsidian ribs are immune to
 * every impact, and there are far more stones to break on the way down.
 */
export const LEVELS: readonly LevelDef[] = [
  {
    name: 'Ashfall',
    tagline: 'A wider warm-up seam',
    speed: 1,
    rows: [
      '.............',
      '.11111111111.',
      '.12222222221.',
      '.12vvv3vvv21.',
      '.12222222221.',
      '.11111111111.',
      '.12222222221.',
      '.12v3333v221.',
      '.12222222221.',
      '.11111111111.',
      '.12vvv3vvv21.',
      '.12222222221.',
      '.11111111111.',
      '.............',
    ].map(seam),
  },
  {
    name: 'Fault Line',
    tagline: 'The seam splits twice over',
    speed: 1.04,
    rows: [
      '..x.......x..',
      '.11111111111.',
      '.11112222111.',
      '.1122v3v2211.',
      '.11122322111.',
      '..x..vvv..x..',
      '.12222222221.',
      '.11222v22211.',
      '.11111111111.',
      '.1122v3v2211.',
      '.11122322111.',
      '.12222222221.',
      '..x..vvv..x..',
      '.11111111111.',
      '.11222v22211.',
      '.12222222221.',
      '.11111111111.',
      '.............',
    ].map(seam),
  },
  {
    name: 'Mineshaft',
    tagline: 'Bank through the doubled ribs',
    speed: 1.08,
    rows: [
      '......x......',
      '.....131.....',
      '....13231....',
      '...132v231...',
      '..132121231..',
      '.13212v21231.',
      '..132121231..',
      '...132v231...',
      '....13231....',
      '.....131.....',
      '......x......',
      '.....131.....',
      '....13231....',
      '...132v231...',
      '..132121231..',
      '.13212v21231.',
      '..132121231..',
      '...132v231...',
      '....13231....',
      '.....131.....',
      '......x......',
      '......v......',
    ].map(seam),
  },
  {
    name: 'Fusion Core',
    tagline: 'Feed the doubled chain reaction',
    speed: 1.12,
    rows: [
      'x.111111111.x',
      '..122222221..',
      '.123vvvvv321.',
      '.12v33333v21.',
      '.123vvvvv321.',
      '..122222221..',
      'x.111111111.x',
      'x.111111111.x',
      '..122222221..',
      '.123vvvvv321.',
      '.12v33333v21.',
      '.123vvvvv321.',
      '..122222221..',
      'x.111111111.x',
    ].map(seam),
  },
  {
    name: 'Cascade',
    tagline: 'A layered volatile lattice',
    speed: 1.17,
    rows: [
      '.1.1.1.1.1.1.',
      '.2.2.2.2.2.2.',
      '1.1.1.1.1.1.1',
      '.2.v.3.v.2.v.',
      '1.1.1.1.1.1.1',
      '.2.3.v.3.3.2.',
      '1.1.1.1.1.1.1',
      '.2.v.3.v.2.v.',
      '1.1.1.1.1.1.1',
      '.2.3.3.3.3.2.',
      '1.1.1.1.1.1.1',
      '.x.........x.',
      '.1.1.1.1.1.1.',
      '.2.2.2.2.2.2.',
      '1.1.1.1.1.1.1',
      '.2.v.3.v.2.v.',
      '1.1.1.1.1.1.1',
      '.2.3.v.3.3.2.',
      '1.1.1.1.1.1.1',
      '.2.v.3.v.2.v.',
      '1.1.1.1.1.1.1',
      '.2.3.3.3.3.2.',
      '1.1.1.1.1.1.1',
      '.x.........x.',
    ].map(seam),
  },
  {
    name: 'Deep Vault',
    tagline: 'The wide black galleries',
    speed: 1.19,
    rows: [
      'x.111111111.x',
      '..122v3v221..',
      '.12.12221.21.',
      '12.1.3v3.1.21',
      '.1.1222221.1.',
      'x.1.v3v3v.1.x',
      '.1.1222221.1.',
      '12.1.3v3.1.21',
      '.12.12221.21.',
      '..122v3v221..',
      'x.111111111.x',
      '..x.......x..',
      'x.111111111.x',
      '..122v3v221..',
      '.12.12221.21.',
      '12.1.3v3.1.21',
      '.1.1222221.1.',
      'x.1.v3v3v.1.x',
      '.1.1222221.1.',
      '12.1.3v3.1.21',
      '.12.12221.21.',
      '..122v3v221..',
      'x.111111111.x',
      '..x.......x..',
    ].map(seam),
  },
  {
    name: 'Obsidian Crown',
    tagline: 'Crack the black shell twice',
    speed: 1.23,
    rows: [
      'xx.1111111.xx',
      'x.122222221.x',
      '.1.13v3v31.1.',
      '12.1v3v3v1.21',
      '.1.13v3v31.1.',
      '12.1222221.21',
      '.1.1111111.1.',
      'x.1.2v3v2.1.x',
      '.x.1222221.x.',
      '..x.11111.x..',
      'xx.1111111.xx',
      'xx.1111111.xx',
      'x.122222221.x',
      '.1.13v3v31.1.',
      '12.1v3v3v1.21',
      '.1.13v3v31.1.',
      '12.1222221.21',
      '.1.1111111.1.',
      'x.1.2v3v2.1.x',
      '.x.1222221.x.',
      '..x.11111.x..',
      'xx.1111111.xx',
    ].map(seam),
  },
];