added sys digger
This commit is contained in:
50
sys_digger/constants.js
Normal file
50
sys_digger/constants.js
Normal file
@@ -0,0 +1,50 @@
|
||||
// ─── Game rules ──────────────────────────────────────────────────────────────
|
||||
const MAX_DOCKS = 8; // failed docks before game over
|
||||
const NUM_ANCHORS = 6; // anchor points around the central molecule
|
||||
const ANCHOR_RADIUS = 120; // px distance from center to anchor points
|
||||
const CLICK_RADIUS = 38; // px hit radius for clicking an anchor
|
||||
|
||||
// ─── Spawn timing ────────────────────────────────────────────────────────────
|
||||
const SPAWN_INTERVAL_START = 2500; // ms between spawns at the start
|
||||
const SPAWN_INTERVAL_MIN = 700; // ms floor (fastest difficulty)
|
||||
const SPAWN_DIFFICULTY_STEP = 18; // ms reduction per spawn
|
||||
|
||||
// ─── Incoming atom ───────────────────────────────────────────────────────────
|
||||
const ATOM_SPEED_MIN = 1.4; // px/frame minimum
|
||||
const ATOM_SPEED_MAX = 3.2; // px/frame maximum (min + random range)
|
||||
const ATOM_RADIUS_MIN = 16; // px nucleus radius minimum
|
||||
const ATOM_RADIUS_MAX = 24; // px nucleus radius maximum (min + random range)
|
||||
const ATOM_HUE_MIN = 180; // hsl hue range start (blue-cyan)
|
||||
const ATOM_HUE_RANGE = 60; // hsl hue range width
|
||||
const ATOM_ELECTRON_SPEED_MIN = 0.05;
|
||||
const ATOM_ELECTRON_SPEED_MAX = 0.08;
|
||||
|
||||
// ─── Particles ───────────────────────────────────────────────────────────────
|
||||
const BURST_COUNT = 20; // particles per burst
|
||||
const BURST_SPEED_MIN = 2;
|
||||
const BURST_SPEED_MAX = 7;
|
||||
const PARTICLE_DECAY_MIN = 0.022;
|
||||
const PARTICLE_DECAY_MAX = 0.047;
|
||||
const PARTICLE_RADIUS_MIN = 2;
|
||||
const PARTICLE_RADIUS_MAX = 6;
|
||||
|
||||
// ─── Anchor block flash ───────────────────────────────────────────────────────
|
||||
const BLOCK_TIMER_FRAMES = 20; // frames the green flash lasts after a block
|
||||
|
||||
// ─── Stars ───────────────────────────────────────────────────────────────────
|
||||
const STAR_COUNT = 160;
|
||||
const STAR_ALPHA_MIN = 0.15;
|
||||
const STAR_ALPHA_RANGE = 0.55;
|
||||
const STAR_RADIUS_MAX = 1.5;
|
||||
|
||||
// ─── Central nucleus ─────────────────────────────────────────────────────────
|
||||
const NUCLEUS_RADIUS = 52; // px
|
||||
const NUCLEUS_ORBITS = 3; // electron orbits to draw
|
||||
|
||||
// ─── Cystinstein indicator ────────────────────────────────────────────────────
|
||||
const CYS_CENTER_X = 65; // px within the 130×130 side canvas
|
||||
const CYS_CENTER_Y = 65;
|
||||
const CYS_CORE_RADIUS = 14; // central atom radius
|
||||
const CYS_DOCK_RADIUS = 28; // distance from center to docked atoms
|
||||
const CYS_ATOM_RADIUS = 9; // docked atom radius
|
||||
const CYS_RING_RADIUS = 48; // final danger ring radius
|
||||
Reference in New Issue
Block a user