Skip to content

Commit 47a02f5

Browse files
committed
Remove the remaining moon-surface landmark band from premium-art levels
The level-3 screenshot confirmed that the last broad green crater/tint strip was still coming from the generated moon-surface layer rather than the premium background itself. This removes the feature outright across the few levels that still opted into it and trims the parallax lifecycle to match the smaller visual stack. Constraint: Preserve the rest of the premium-background presentation stack while removing the crater/tint band source completely Rejected: Keep moonSurface config and gate it off per level | leaves dead visual infrastructure in the runtime without a planned return path Rejected: Add another alpha/tint tweak on top of moonSurface | treats the symptom while preserving the unwanted layer Confidence: high Scope-risk: moderate Reversibility: clean Directive: If further visual cleanup is needed, evaluate the remaining ambient layers individually instead of rebuilding a generalized landmark overlay path 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 screenshot capture after this exact release build
1 parent 0ad2918 commit 47a02f5

19 files changed

Lines changed: 53 additions & 464 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.20] - 2026-04-28
6+
7+
### Changed
8+
- Removed the remaining generated moon-surface landmark layer so premium-art levels no longer render the green crater/tint band over gameplay space.
9+
- Deleted the moon-surface config surface, generator, lifecycle wiring, and update/layout paths instead of leaving the layer dormant behind flags.
10+
- Simplified the shared parallax lifecycle by removing moon-surface creation/destruction from the level-visual orchestration context.
11+
12+
### Quality
13+
- Updated parallax lifecycle regression coverage to reflect the smaller background stack after moon-surface 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.19] - 2026-04-28
617

718
### Changed

docs/releases/1.1.20.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Release 1.1.20 — remove the moon-surface crater/tint band layer
2+
3+
## Highlights
4+
5+
- Removes the remaining moon-surface landmark layer that was still drawing a broad green crater/tint band over premium-art levels.
6+
- Deletes the moon-surface system outright instead of leaving it behind as dormant config and lifecycle wiring.
7+
- Keeps the rest of the premium-background stack intact while simplifying the parallax lifecycle.
8+
9+
## What changed
10+
11+
- Moon-surface feature removal:
12+
- `src/config/levels/types.ts`
13+
- `src/config/levels/definitions/ionStormSector.ts`
14+
- `src/config/levels/definitions/nebulaPass.ts`
15+
- `src/config/levels/definitions/wreckfieldRun.ts`
16+
- `src/systems/parallax/backgroundMotion.ts`
17+
- `src/systems/parallax/levelVisualLayerLifecycle.ts`
18+
- `src/systems/parallax/levelVisualLayerLifecycleContext.ts`
19+
- `src/systems/ParallaxBackground.ts`
20+
- Deleted `src/systems/parallax/moonSurfaceGenerator.ts`
21+
- Deleted `src/systems/parallax/moonSurfaceLayerLifecycle.ts`
22+
23+
- Regression coverage updates:
24+
- `tests/ParallaxBackground.test.ts`
25+
- `tests/levelVisualLayerLifecycle.test.ts`
26+
- `tests/levelVisualLayerLifecycleContext.test.ts`
27+
- Deleted `tests/moonSurfaceGenerator.test.ts`
28+
- Deleted `tests/moonSurfaceLayerLifecycle.test.ts`
29+
30+
## Validation
31+
32+
- `bunx tsc --noEmit`
33+
- `bun run lint`
34+
- `bun test`
35+
- `bun run build`
36+
- `bun run levels:validate`
37+
- `bun run knip`
38+
- `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.20`](./1.1.20.md) — removes the moon-surface crater/tint band layer from premium-art levels and deletes the feature outright
6+
57
- [`1.1.19`](./1.1.19.md) — stops stacking the legacy starfield under premium backgrounds and makes the premium art fully opaque
68

79
- [`1.1.18`](./1.1.18.md) — removes moon-surface prop overlays from the premium-background levels that still used them

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.19",
3+
"version": "1.1.20",
44
"author": "Douwe de Vries",
55
"license": "MIT",
66
"private": true,

src/config/levels/definitions/ionStormSector.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,4 @@ export const ION_STORM_SECTOR_LEVEL: LevelConfig = {
198198
},
199199
},
200200
}),
201-
moonSurface: {
202-
scrollSpeed: 0.14,
203-
surfaceColor: 0x20372d,
204-
accentColor: 0x52f7a6,
205-
craterCount: 5,
206-
horizonGlow: 0.96,
207-
},
208201
};

src/config/levels/definitions/nebulaPass.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,6 @@ export const NEBULA_PASS_LEVEL: LevelConfig = {
204204
},
205205
},
206206
}),
207-
moonSurface: {
208-
scrollSpeed: 0.08,
209-
surfaceColor: 0x24163c,
210-
accentColor: 0xc67bff,
211-
craterCount: 6,
212-
horizonGlow: 0.92,
213-
},
214207
passingPlanets: [
215208
{ scrollSpeed: 0.015, planetPalette: [0x7445b0, 0xc593ff], size: 200, yPosition: 0.18, alpha: 0.2, ringChance: 0.5 },
216209
{ scrollSpeed: 0.025, planetPalette: [0x3d8f99, 0x87fff0], size: 100, yPosition: 0.72, alpha: 0.15, ringChance: 0.3 },

src/config/levels/definitions/wreckfieldRun.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,4 @@ export const WRECKFIELD_RUN_LEVEL: LevelConfig = {
213213
},
214214
},
215215
}),
216-
moonSurface: {
217-
scrollSpeed: 0.12,
218-
surfaceColor: 0x2a3535,
219-
accentColor: 0x53e2d5,
220-
craterCount: 12,
221-
horizonGlow: 0.8,
222-
},
223216
};

src/config/levels/types.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,9 @@ export interface LevelConfig extends LevelThemeSummary {
134134
asteroidInterval: number;
135135
sections: LevelSectionConfig[];
136136
music: LevelMusicConfig;
137-
moonSurface?: MoonSurfaceConfig;
138137
passingPlanets?: PassingPlanetConfig[];
139138
}
140139

141-
export interface MoonSurfaceConfig {
142-
scrollSpeed: number;
143-
surfaceColor: number;
144-
accentColor: number;
145-
craterCount: number;
146-
horizonGlow: number;
147-
}
148-
149140
export interface PassingPlanetConfig {
150141
scrollSpeed: number;
151142
planetPalette: [number, number];

src/systems/ParallaxBackground.ts

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
scrollStarLayers,
66
updateDebrisMoteMotion,
77
updateForegroundSilhouetteMotion,
8-
updateMoonSurfaceMotion,
98
updatePassingPlanetMotion,
109
updatePlanetLayerMotion,
1110
updateTwinkleMotion,
@@ -29,18 +28,12 @@ import {
2928
type PremiumBackgroundScrollSnapshot,
3029
} from './parallax/premiumBackgroundLayers';
3130
import { updateHazardOverlay as updateHazardOverlayRuntime } from './parallax/hazardOverlayRuntime';
32-
import {
33-
createMoonSurfaceLayer as createMoonSurfaceLayerHelper,
34-
destroyMoonSurfaceLayer as destroyMoonSurfaceLayerHelper,
35-
layoutMoonSurfaceLayer as layoutMoonSurfaceLayerHelper,
36-
type MoonSurfaceState,
37-
} from './parallax/moonSurfaceLayerLifecycle';
38-
import { type ForegroundSilhouetteState } from './parallax/foregroundSilhouetteLifecycle';
3931
import {
4032
getPassingPlanetOffscreenThreshold,
4133
resetPassingPlanetPosition,
4234
type PassingPlanetState,
4335
} from './parallax/passingPlanetLifecycle';
36+
import { type ForegroundSilhouetteState } from './parallax/foregroundSilhouetteLifecycle';
4437
import {
4538
createPlanetLayer as createPlanetLayerHelper,
4639
destroyPlanetLayer as destroyPlanetLayerHelper,
@@ -78,7 +71,6 @@ export class ParallaxBackground {
7871
private planetLayer: PlanetLayerState | null = null;
7972
private debrisMotes: DebrisMoteState[] = [];
8073
private twinkles: TwinkleState[] = [];
81-
private moonSurface: MoonSurfaceState | null = null;
8274
private passingPlanetSprites: PassingPlanetState[] = [];
8375
private elapsed = 0;
8476
private currentWidth = 0;
@@ -187,10 +179,6 @@ export class ParallaxBackground {
187179
});
188180
}
189181

190-
private createMoonSurfaceLayer(scene: Phaser.Scene, config: LevelConfig): void {
191-
this.moonSurface = createMoonSurfaceLayerHelper(scene, config, this.getViewportSize());
192-
}
193-
194182
private setPassingPlanetSprites(states: PassingPlanetState[]): void {
195183
this.passingPlanetSprites = states;
196184
}
@@ -210,10 +198,8 @@ export class ParallaxBackground {
210198
PASSING_PLANET_RESPAWN_MIN_X,
211199
PASSING_PLANET_RESPAWN_MAX_X,
212200
STARFIELD_TILE_DEPTHS,
213-
this.createMoonSurfaceLayer.bind(this),
214201
this.createPlanetLayer.bind(this),
215202
this.createDebrisMotes.bind(this),
216-
this.destroyMoonSurfaceLayer.bind(this),
217203
this.destroyPlanetLayer.bind(this),
218204
this.destroyDebrisMotes.bind(this),
219205
(states) => this.setPassingPlanetSprites(states),
@@ -360,7 +346,6 @@ export class ParallaxBackground {
360346
updatePlanetLayerMotion(this.planetLayer, this.elapsed, this.atmosphereAlpha, this.landmarkAlpha);
361347
updateDebrisMoteMotion(this.debrisMotes, this.elapsed, delta, this.atmosphereAlpha);
362348
updateTwinkleMotion(this.twinkles, this.elapsed, this.atmosphereTwinkle);
363-
updateMoonSurfaceMotion(this.moonSurface, this.elapsed, this.atmosphereAlpha, this.landmarkAlpha);
364349
updatePassingPlanetMotion(
365350
this.passingPlanetSprites,
366351
delta,
@@ -404,7 +389,6 @@ export class ParallaxBackground {
404389
}
405390

406391
private layoutLevelVisualLayers(): void {
407-
this.layoutMoonSurfaceLayer();
408392
this.layoutPlanetLayer();
409393
}
410394

@@ -423,10 +407,6 @@ export class ParallaxBackground {
423407
layoutPlanetLayerHelper(this.planetLayer, this.getViewportSize());
424408
}
425409

426-
private layoutMoonSurfaceLayer(): void {
427-
layoutMoonSurfaceLayerHelper(this.moonSurface, this.getViewportSize());
428-
}
429-
430410
// ---------------------------------------------------------------------------
431411
// Cleanup
432412
// ---------------------------------------------------------------------------
@@ -438,9 +418,4 @@ export class ParallaxBackground {
438418
private destroyDebrisMotes(): void {
439419
this.debrisMotes = destroyDebrisMotesHelper(this.debrisMotes);
440420
}
441-
442-
private destroyMoonSurfaceLayer(): void {
443-
this.moonSurface = destroyMoonSurfaceLayerHelper(this.scene, this.moonSurface);
444-
}
445-
446421
}

src/systems/parallax/backgroundMotion.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ interface TwinkleMotionState {
3232
baseMaxAlpha: number;
3333
}
3434

35-
interface MoonSurfaceMotionState {
36-
sprite: Phaser.GameObjects.Image;
37-
baseX: number;
38-
baseY: number;
39-
baseAlpha: number;
40-
motionSpeed: number;
41-
motionAmplitude: number;
42-
}
43-
4435
interface PassingPlanetMotionState {
4536
sprite: Phaser.GameObjects.Image;
4637
scrollSpeed: number;
@@ -118,25 +109,6 @@ export function updateTwinkleMotion(
118109
}
119110
}
120111

121-
export function updateMoonSurfaceMotion(
122-
moonSurface: MoonSurfaceMotionState | null,
123-
elapsed: number,
124-
atmosphereAlpha: number,
125-
landmarkAlpha: number
126-
): void {
127-
if (!moonSurface) {
128-
return;
129-
}
130-
131-
const phase = elapsed * moonSurface.motionSpeed;
132-
const scrollOffset = Math.sin(phase) * moonSurface.motionAmplitude;
133-
moonSurface.sprite.x = moonSurface.baseX + scrollOffset;
134-
moonSurface.sprite.y = moonSurface.baseY;
135-
moonSurface.sprite.setAlpha(
136-
Phaser.Math.Clamp(moonSurface.baseAlpha * (0.94 + (atmosphereAlpha - 1) * 0.5) * landmarkAlpha, 0.24, 0.62)
137-
);
138-
}
139-
140112
export function updatePassingPlanetMotion(
141113
planets: PassingPlanetMotionState[],
142114
delta: number,

0 commit comments

Comments
 (0)