Skip to content

Commit 8d03960

Browse files
committed
Retire the scenic overlay path now that premium art owns the backdrop
This release removes the old scenic fog/nebula overlay system instead of leaving it dormant behind runtime conditions. The parallax stack now treats premium background art as the intended backdrop path, while the remaining moon/planet/twinkle/debris layers stay intact. Constraint: Preserve the premium-background presentation and avoid disturbing unrelated gameplay or pause/runtime behavior Rejected: Keep the scenic system behind a permanent feature gate | dead visual code would keep maintenance cost without planned use Rejected: Remove all procedural parallax ambience in one pass | broader visual change than requested and harder to verify safely Confidence: high Scope-risk: moderate Reversibility: clean Directive: If you later want a flatter premium-art presentation, evaluate moon surface, passing planets, debris motes, and silhouettes separately rather than bundling them into one visual removal pass Tested: bunx tsc --noEmit; bun run lint; bun test; bun run build; bun run levels:validate; bun run knip; bun run bundle:check Not-tested: Manual in-game visual smoke pass on the affected premium-background levels after this exact release build
1 parent df4af12 commit 8d03960

15 files changed

Lines changed: 50 additions & 442 deletions

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.17] - 2026-04-28
6+
7+
### Changed
8+
- Removed the old procedural scenic fog/nebula overlay system from the parallax stack now that premium level backgrounds are the intended presentation path.
9+
- Deleted the scenic-layer lifecycle and scenic-texture generator code instead of keeping the overlay dormant behind runtime gating.
10+
- Simplified `ParallaxBackground` and level-visual lifecycle wiring by removing scenic-layer create/layout/update/destroy paths and the unused `premiumAssetsReplaceProcedural` manifest flag.
11+
12+
### Quality
13+
- Added/updated regression coverage for the level-visual lifecycle and parallax orchestration after scenic-layer removal.
14+
- Verified with `bunx tsc --noEmit`, `bun run lint`, `bun test`, `bun run build`, `bun run levels:validate`, `bun run knip`, and `bun run bundle:check`.
15+
516
## [1.1.16] - 2026-04-28
617

718
### Changed

docs/releases/1.1.17.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Release 1.1.17 — scenic overlay removal
2+
3+
## Highlights
4+
5+
- Removes the old procedural scenic fog/nebula overlay system that was still rendering over premium background art.
6+
- Keeps the premium background presentation path and deletes the now-unwanted scenic overlay code instead of leaving it disabled.
7+
- Simplifies the parallax/runtime wiring and trims a small amount of dead visual infrastructure.
8+
9+
## What changed
10+
11+
- Scenic overlay removal:
12+
- Deleted `src/systems/parallax/scenicLayerLifecycle.ts`
13+
- Deleted `src/systems/parallax/scenicTextureGenerator.ts`
14+
- Removed scenic-layer create/layout/update/destroy wiring from:
15+
- `src/systems/ParallaxBackground.ts`
16+
- `src/systems/parallax/backgroundMotion.ts`
17+
- `src/systems/parallax/levelVisualLayerLifecycle.ts`
18+
- `src/systems/parallax/levelVisualLayerLifecycleContext.ts`
19+
- Removed the unused `premiumAssetsReplaceProcedural` flag from:
20+
- `src/systems/parallax/premiumBackgroundManifest.ts`
21+
22+
- Regression coverage updates:
23+
- `tests/levelVisualLayerLifecycle.test.ts`
24+
- `tests/levelVisualLayerLifecycleContext.test.ts`
25+
- `tests/ParallaxBackground.test.ts`
26+
- Updated the lifecycle/parallax tests to lock the scenic-overlay removal and the remaining visual-layer orchestration.
27+
28+
## Validation
29+
30+
- `bunx tsc --noEmit`
31+
- `bun run lint`
32+
- `bun test`
33+
- `bun run build`
34+
- `bun run levels:validate`
35+
- `bun run knip`
36+
- `bun run bundle:check`

docs/releases/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Latest first.
44

5+
- [`1.1.17`](./1.1.17.md) — removes the old scenic overlay system now that premium backgrounds are the intended art path
6+
57
- [`1.1.16`](./1.1.16.md) — gameScene contract split and import-boundary cleanup for the next maintainability tranche
68

79
- [`1.1.15`](./1.1.15.md) — maintainability release for gameplay/runtime refactors, import cleanup, and broader regression coverage

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "space-explorer",
3-
"version": "1.1.16",
3+
"version": "1.1.17",
44
"author": "Douwe de Vries",
55
"license": "MIT",
66
"private": true,

src/systems/ParallaxBackground.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
updateMoonSurfaceMotion,
99
updatePassingPlanetMotion,
1010
updatePlanetLayerMotion,
11-
updateScenicLayerMotion,
1211
updateTwinkleMotion,
1312
} from './parallax/backgroundMotion';
1413
import {
@@ -37,10 +36,6 @@ import {
3736
type MoonSurfaceState,
3837
} from './parallax/moonSurfaceLayerLifecycle';
3938
import { type ForegroundSilhouetteState } from './parallax/foregroundSilhouetteLifecycle';
40-
import {
41-
layoutScenicLayers as layoutScenicLayersHelper,
42-
type ScenicLayerState,
43-
} from './parallax/scenicLayerLifecycle';
4439
import {
4540
getPassingPlanetOffscreenThreshold,
4641
resetPassingPlanetPosition,
@@ -80,7 +75,6 @@ export class ParallaxBackground {
8075
private scene: Phaser.Scene | null = null;
8176
private levelConfig?: LevelConfig;
8277
private tileSprites: Phaser.GameObjects.TileSprite[] = [];
83-
private scenicLayers: ScenicLayerState[] = [];
8478
private planetLayer: PlanetLayerState | null = null;
8579
private debrisMotes: DebrisMoteState[] = [];
8680
private twinkles: TwinkleState[] = [];
@@ -121,7 +115,6 @@ export class ParallaxBackground {
121115
this.scene = scene;
122116
this.levelConfig = levelConfig;
123117
this.tileSprites = [];
124-
this.scenicLayers = [];
125118
this.debrisMotes = [];
126119
this.foregroundSilhouettes = [];
127120
this.resetRuntimeFieldState(scene.cameras.main.width, scene.cameras.main.height);
@@ -209,7 +202,6 @@ export class ParallaxBackground {
209202
this.scene,
210203
this.currentWidth,
211204
this.currentHeight,
212-
this.scenicLayers,
213205
this.passingPlanetSprites,
214206
this.twinkles,
215207
this.foregroundSilhouettes,
@@ -363,7 +355,6 @@ export class ParallaxBackground {
363355
private updateVisualLayers(delta: number): void {
364356
scrollStarLayers(this.tileSprites, STARFIELD_LAYER_CONFIGS, delta);
365357
this.scrollPremiumBackgroundLayers(delta);
366-
updateScenicLayerMotion(this.scenicLayers, this.elapsed, this.atmosphereDrift, this.atmosphereAlpha);
367358
updatePlanetLayerMotion(this.planetLayer, this.elapsed, this.atmosphereAlpha, this.landmarkAlpha);
368359
updateDebrisMoteMotion(this.debrisMotes, this.elapsed, delta, this.atmosphereAlpha);
369360
updateTwinkleMotion(this.twinkles, this.elapsed, this.atmosphereTwinkle);
@@ -411,7 +402,6 @@ export class ParallaxBackground {
411402
}
412403

413404
private layoutLevelVisualLayers(): void {
414-
layoutScenicLayersHelper(this.scenicLayers, this.getViewportSize());
415405
this.layoutMoonSurfaceLayer();
416406
this.layoutPlanetLayer();
417407
}

src/systems/parallax/backgroundMotion.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ interface TileSpriteScrollConfig {
55
scrollSpeed: number;
66
}
77

8-
interface ScenicMotionState {
9-
sprite: Phaser.GameObjects.Image;
10-
baseX: number;
11-
baseY: number;
12-
baseAlpha: number;
13-
driftX: number;
14-
driftY: number;
15-
speed: number;
16-
phase: number;
17-
}
18-
198
interface PlanetMotionState {
209
sprite: Phaser.GameObjects.Image;
2110
baseX: number;
@@ -80,21 +69,6 @@ export function scrollStarLayers(
8069
}
8170
}
8271

83-
export function updateScenicLayerMotion(
84-
layers: ScenicMotionState[],
85-
elapsed: number,
86-
atmosphereDrift: number,
87-
atmosphereAlpha: number
88-
): void {
89-
for (let i = 0; i < layers.length; i++) {
90-
const layer = layers[i];
91-
const phase = elapsed * layer.speed * atmosphereDrift + layer.phase;
92-
layer.sprite.x = layer.baseX + Math.sin(phase) * layer.driftX * atmosphereDrift;
93-
layer.sprite.y = layer.baseY + Math.cos(phase * 0.85) * layer.driftY * atmosphereDrift;
94-
layer.sprite.setAlpha(Phaser.Math.Clamp(layer.baseAlpha * atmosphereAlpha, 0.16, 0.95));
95-
}
96-
}
97-
9872
export function updatePlanetLayerMotion(
9973
planetLayer: PlanetMotionState | null,
10074
elapsed: number,

src/systems/parallax/levelVisualLayerLifecycle.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import Phaser from 'phaser';
22
import type { LevelConfig } from '../../config/LevelsConfig';
3-
import {
4-
createScenicLayers,
5-
destroyScenicLayers,
6-
type ScenicLayerState,
7-
} from './scenicLayerLifecycle';
83
import {
94
createPassingPlanetLayers,
105
destroyPassingPlanetLayers,
@@ -21,7 +16,6 @@ export type LevelVisualLayerLifecycleContext = {
2116
scene: Phaser.Scene | null;
2217
currentWidth: number;
2318
currentHeight: number;
24-
scenicLayers: ScenicLayerState[];
2519
passingPlanetSprites: PassingPlanetState[];
2620
twinkles: TwinkleState[];
2721
foregroundSilhouettes: ForegroundSilhouetteState[];
@@ -43,15 +37,6 @@ export function createLevelVisualLayers(
4337
scene: Phaser.Scene,
4438
config: LevelConfig
4539
): void {
46-
createScenicLayers(
47-
scene,
48-
config,
49-
{
50-
width: context.currentWidth,
51-
height: context.currentHeight,
52-
},
53-
context.scenicLayers
54-
);
5540
context.createMoonSurfaceLayer(scene, config);
5641
createPassingPlanetLayers(
5742
scene,
@@ -81,7 +66,6 @@ export function createLevelVisualLayers(
8166
}
8267

8368
export function destroyLevelVisualLayers(context: LevelVisualLayerLifecycleContext): void {
84-
destroyScenicLayers(context.scene, context.scenicLayers);
8569
context.destroyMoonSurfaceLayer();
8670
context.setPassingPlanetSprites(destroyPassingPlanetLayers(context.passingPlanetSprites));
8771
context.destroyPlanetLayer();

src/systems/parallax/levelVisualLayerLifecycleContext.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export function getLevelVisualLayerLifecycleContext(
44
scene: LevelVisualLayerLifecycleContext['scene'],
55
currentWidth: LevelVisualLayerLifecycleContext['currentWidth'],
66
currentHeight: LevelVisualLayerLifecycleContext['currentHeight'],
7-
scenicLayers: LevelVisualLayerLifecycleContext['scenicLayers'],
87
passingPlanetSprites: LevelVisualLayerLifecycleContext['passingPlanetSprites'],
98
twinkles: LevelVisualLayerLifecycleContext['twinkles'],
109
foregroundSilhouettes: LevelVisualLayerLifecycleContext['foregroundSilhouettes'],
@@ -24,7 +23,6 @@ export function getLevelVisualLayerLifecycleContext(
2423
scene,
2524
currentWidth,
2625
currentHeight,
27-
scenicLayers,
2826
passingPlanetSprites,
2927
twinkles,
3028
foregroundSilhouettes,

src/systems/parallax/premiumBackgroundManifest.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ interface PremiumBackgroundManifest {
1919
levelName: string;
2020
assetPrefix: string;
2121
baseSize: { width: number; height: number };
22-
premiumAssetsReplaceProcedural: boolean;
2322
layers: PremiumBackgroundLayerConfig[];
2423
}
2524

@@ -60,7 +59,6 @@ function createManifest(level: (typeof LEVELS)[number]): PremiumBackgroundManife
6059
levelName: level.name,
6160
assetPrefix,
6261
baseSize: { ...BASE_SIZE },
63-
premiumAssetsReplaceProcedural: false,
6462
layers: [createLayer(level.index)],
6563
};
6664
}

src/systems/parallax/scenicLayerLifecycle.ts

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)