Remove cyberpunk overlay from game scene

The CRT/glitch dressing (scanlines, vignette, glitch burst) was visually distracting during gameplay. Strip the CyberOverlay import, creation, update, and destroy calls from GameScene and drop the now-unused `theme.gameScene` config block.
This commit is contained in:
Brian Fertig 2026-09-03 18:47:54 -06:00
parent 3f2779e790
commit d41183c1fa
2 changed files with 0 additions and 43 deletions

View File

@ -32,11 +32,5 @@
"duration": [110, 340], "duration": [110, 340],
"slices": [2, 6], "slices": [2, 6],
"maxOffset": 12 "maxOffset": 12
},
"gameScene": {
"overlay": true,
"scanlineAlpha": 0.1,
"vignetteAlpha": 0.45,
"burstOnEntry": true
} }
} }

View File

@ -8,7 +8,6 @@ import { formatSystemReport } from '../galaxy/SystemReport.js';
import { Ship } from '../entities/Ship.js'; import { Ship } from '../entities/Ship.js';
import { Planet } from '../entities/Planet.js'; import { Planet } from '../entities/Planet.js';
import { Starfield } from '../visuals/Starfield.js'; import { Starfield } from '../visuals/Starfield.js';
import { CyberOverlay } from '../visuals/CyberOverlay.js';
const FONT_FALLBACK = "'Segoe UI', 'Helvetica Neue', Arial, sans-serif"; const FONT_FALLBACK = "'Segoe UI', 'Helvetica Neue', Arial, sans-serif";
const HEADER_FONT = () => fontStack('header', FONT_FALLBACK); const HEADER_FONT = () => fontStack('header', FONT_FALLBACK);
@ -43,14 +42,6 @@ export class GameScene extends Phaser.Scene {
this.cameraFollowShip = config.get('game.camera.followShip', true); this.cameraFollowShip = config.get('game.camera.followShip', true);
this.cameraFollowRate = config.get('game.camera.followRate', 3.0); // 1/s this.cameraFollowRate = config.get('game.camera.followRate', 3.0); // 1/s
// The shared cyberpunk dressing (scanlines, vignette, occasional
// glitch burst) — the same overlay the menu uses, dialed down.
this.overlay = this.createThemeOverlay();
if (this.overlay && config.get('theme.gameScene.burstOnEntry', true)) {
// One arrival glitch when we cut in from the menu.
this.time.delayedCall(350, () => this.overlay?.trigger(320, 0.8));
}
// We are, after all, in a system. Show the player which one. (This // We are, after all, in a system. Show the player which one. (This
// also establishes the galaxy — and its seed — for what follows.) // also establishes the galaxy — and its seed — for what follows.)
this.createSystemHud(); this.createSystemHud();
@ -162,39 +153,12 @@ export class GameScene extends Phaser.Scene {
line(`seed ${this.galaxy.seed}`, { fontFamily: fam, fontSize: '11px', color: '#3d476b' }); line(`seed ${this.galaxy.seed}`, { fontFamily: fam, fontSize: '11px', color: '#3d476b' });
} }
/**
* The shared CRT/glitch overlay for this scene (data/theme.json
* gameScene + overlay/glitch). Dialed down vs. the menu: fainter
* scanlines, lighter vignette dressing, not the star of the show.
*/
createThemeOverlay() {
const theme = config.section('theme', {});
const gs = config.section('theme.gameScene', {});
if (gs.overlay === false) return null;
const overlay = theme.overlay ?? {};
return new CyberOverlay(this, {
scanline: {
pitch: overlay.scanline?.pitch ?? 3,
alpha: gs.scanlineAlpha ?? overlay.scanline?.alpha ?? 0.1,
},
grid: overlay.grid
? { cell: overlay.grid.cell ?? 48, alpha: (overlay.grid.alpha ?? 0.05) * 0.6 }
: undefined,
vignette: overlay.vignette
? { alpha: gs.vignetteAlpha ?? overlay.vignette.alpha ?? 0.4 }
: undefined,
sweep: overlay.sweep,
glitch: theme.glitch,
});
}
update(_time, delta) { update(_time, delta) {
// Phaser v4 (Giedi): the engine does not step the scene's TimeClock or // Phaser v4 (Giedi): the engine does not step the scene's TimeClock or
// TweenManager — drive them here or delayedCall/addEvent/tweens never // TweenManager — drive them here or delayedCall/addEvent/tweens never
// fire. (Same quirk as MenuScene.update; verified Sept 2026.) // fire. (Same quirk as MenuScene.update; verified Sept 2026.)
this.time.update(_time, delta); this.time.update(_time, delta);
this.tweens.update(); this.tweens.update();
this.overlay?.update(_time, delta);
this.ship.update(_time, delta); this.ship.update(_time, delta);
// The home world is solid: the ship may come within the clearance in // The home world is solid: the ship may come within the clearance in
// data/planets.json of its rim, but never closer (or through it). // data/planets.json of its rim, but never closer (or through it).
@ -253,6 +217,5 @@ export class GameScene extends Phaser.Scene {
shutdown() { shutdown() {
this.starfield?.destroy(); this.starfield?.destroy();
this.overlay?.destroy();
} }
} }