87 lines
4.5 KiB
JSON
87 lines
4.5 KiB
JSON
{
|
||
"_comment": "COMBAT SANDBOX — the standalone combat range (combat.html, the dev server's /combat, or index.html?combat). A full-screen arena where the player ship (ART + flight stats from data/ship.json, COMBAT feel from player.*) fights a pack of enemy ships (enemy.* — assets/images/ships-enemy.png). Every number here is SANDBOX tuning: iterate in the range first, then port the survivors into the real game (the main game already loads enemy.texture — GameScene.preload — so the texture is ready when combat ships in). The range is js/combat/CombatScene.js; the pure rules (armor damage, orbit steering) are js/combat/Combat.js (tested: dev/combat.test.mjs).",
|
||
"enabled": true,
|
||
|
||
"player": {
|
||
"_comment": "The combat feel of YOUR ship in the range (the art, hull stats, and ship name still come from data/ship.json). WASD/arrows fly, SPACE/J fires (hold = auto-fire). thrust px/s^2, maxSpeed px/s, drag 1/s (exponential coast decay), rotSpeed rad/s (keyboard turn rate), brake = the S/Down reverse-throttle as a fraction of thrust. weapon.* = the player's cannon: cooldown s between shots, bulletSpeed px/s, damage per hit, spread rad of aim jitter, bulletLife s before a shot fizzles, color/size the tracer's glow.",
|
||
"thrust": 1500,
|
||
"maxSpeed": 560,
|
||
"drag": 1.6,
|
||
"rotSpeed": 4.8,
|
||
"brake": 0.6,
|
||
"weapon": {
|
||
"key": "space",
|
||
"cooldown": 0.16,
|
||
"bulletSpeed": 680,
|
||
"damage": 10,
|
||
"spread": 0.03,
|
||
"bulletLife": 1.15,
|
||
"color": "#00e5ff",
|
||
"size": 16
|
||
}
|
||
},
|
||
|
||
"enemy": {
|
||
"_comment": "The hostile craft. texture = spritesheet of frameWidth×frameHeight frames (frame picks which one — frame 0 = the red triple-boost fighter, art facing north, filling its frame; the sheet is 10×10 of 128px frames). size = hull length in world px (render = size × the art's footprint), hitRadius = the collision circle in world px (bullets + rams). count = hostiles in the arena at once. speed px/s + turn (1/s velocity-approach rate) = the chase feel. orbitRadius px = the standoff ring they keep around the player; orbitSpeed rad/s = how fast they circle it (direction alternates per craft). hull/shields = their armor (shields absorb first — js/combat/Combat.js). weapon.* = their lance: range px, cooldown s, bulletSpeed px/s, damage, spread rad, bulletLife s. ramDamage = hull damage a COLLISION deals you; ramDamageSelf = what the collision deals THEM (per hit, ramGrace s apart). respawn = the pack reforms (respawnDelay s) after a kill, so the range stays stocked while you tune.",
|
||
"texture": "assets/images/ships-enemy.png",
|
||
"frameWidth": 128,
|
||
"frameHeight": 128,
|
||
"frame": 0,
|
||
"artFacing": "north",
|
||
"size": 54,
|
||
"hitRadius": 20,
|
||
"count": 3,
|
||
"speed": 165,
|
||
"turn": 3.2,
|
||
"orbitRadius": 300,
|
||
"orbitSpeed": 0.6,
|
||
"hull": 60,
|
||
"shields": 0,
|
||
"weapon": {
|
||
"range": 560,
|
||
"cooldown": 1.4,
|
||
"bulletSpeed": 330,
|
||
"damage": 8,
|
||
"spread": 0.08,
|
||
"bulletLife": 2.4,
|
||
"color": "#ff2d6f",
|
||
"size": 18
|
||
},
|
||
"ramDamage": 10,
|
||
"ramDamageSelf": 22,
|
||
"ramGrace": 0.8,
|
||
"respawn": true,
|
||
"respawnDelay": 2.5
|
||
},
|
||
|
||
"playerShip": {
|
||
"_comment": "Your armor in the range (the real game's ship reads data/ship.json → stats). shields absorb before the hull; after shieldRegenDelay s without a hit, shields regrow at shieldRegenRate/s up to their max.",
|
||
"hull": 100,
|
||
"shields": 40,
|
||
"shieldRegenDelay": 4,
|
||
"shieldRegenRate": 14
|
||
},
|
||
|
||
"arena": {
|
||
"_comment": "The range walls. inset = px between the screen edge and the bounce wall; bounce = the fraction of speed a ship keeps off a wall (1 = full mirror bounce). wallColor = the rim line, wallGlow = its neon edge.",
|
||
"inset": 26,
|
||
"bounce": 0.9,
|
||
"wallColor": "#1b2c4a",
|
||
"wallGlow": "#00e5ff"
|
||
},
|
||
|
||
"sandbox": {
|
||
"_comment": "Sandbox conveniences — none of this ships with the real game. resetKey rebuilds the whole range (a fresh scene); pauseKey freezes the sim (handy for eyeballing positions via window.__COMBAT__ in the console); respawn = the player comes back (respawnDelay s) instead of dying permanently.",
|
||
"resetKey": "R",
|
||
"pauseKey": "P",
|
||
"respawn": true,
|
||
"respawnDelay": 1.6
|
||
},
|
||
|
||
"hud": {
|
||
"_comment": "The range console chrome (colors fall back to data/theme.json). title = the corner label; hints = the control line at the bottom.",
|
||
"title": "COMBAT // SANDBOX",
|
||
"hints": "WASD / arrows — fly · space — fire · R — reset range · P — pause"
|
||
}
|
||
}
|