Skip to content

Experiment: SpriteKit atmosphere layer#1

Open
testtest126 wants to merge 2 commits into
mainfrom
experiment/spritekit-atmosphere
Open

Experiment: SpriteKit atmosphere layer#1
testtest126 wants to merge 2 commits into
mainfrom
experiment/spritekit-atmosphere

Conversation

@testtest126

Copy link
Copy Markdown
Owner

What this is

A prototype, not a decision. Goal: let Yakiv feel whether SpriteKit adds
dread that plain SwiftUI/Core Animation can't, before we commit to it as a
dependency of LULL's real fear mechanics.

What's in it

  • app/Sources/AtmosphereScene.swift — an SKScene that is pure decoration:
    slow drifting fog (SKEmitterNode), faint upward dust motes, a static
    vignette (generated radial-gradient texture, no shader), a slow breathing
    red glow, and a rare, brief flicker. Dark palette matched to Theme.swift
    by eye (duplicated locally, not imported — so this file stays liftable/
    deletable without touching the app's shared theme).
  • app/Sources/AtmosphereBackground.swift — bridges the scene into SwiftUI
    via SpriteView.
  • app/Sources/LULLApp.swift — one-line swap: Theme.ink.ignoresSafeArea()
    AtmosphereBackground() as the base layer in RootView's ZStack, so it
    sits behind the existing title/consent UI and composes with it (proven in
    the screenshots below — text and buttons render normally on top).
  • app/project.yml — added INFOPLIST_KEY_UILaunchScreen_Generation: YES.
    Unrelated to SpriteKit itself: the app was rendering letterboxed in the
    simulator for lack of a launch screen, a pre-existing gap. Needed this to
    actually see the atmosphere full-screen.

What this is not

  • No touches to LULLKit, the consent ledger, EyeSession, or the camera
    pipeline. AtmosphereScene holds no state and reaches no sensor.
  • No new dependencies — SpriteKit is first-party.
  • Nothing removed — ConsentView/EyeView/GameModel are untouched; this is
    strictly an additive background layer.

Verification

  • swift test in LULLKit: 16/16 green, unchanged.
  • xcodegen generate + xcodebuild for iphonesimulator: builds clean.
  • Ran in iPhone 17 Pro simulator; screenshots attached to the PR description
    by the requester separately (SpriteKit's SKView needs a live GPU context,
    can't easily attach here) — the atmosphere layer renders full-screen behind
    the consent title, with a visibly breathing glow and vignette.

Honest read

Worth a look before merging any direction: does the dread read as "SpriteKit
justified itself" or "this could've been three SwiftUI TimelineView /
Core Animation layers for less complexity and no new framework surface to
learn"? My instinct after building this — restrained particle/glow work like
this is well within reach of Canvas/TimelineView+Core Animation, and
SpriteKit's advantage would show up more once there's actual interactivity
(things reacting to touch/face/time in real-time, physics, sprite-sheet
animation) rather than ambient decoration. Ambient-only, I'd lean SwiftUI to
keep the surface area small — but SpriteKit is a lot less awkward for this
than I expected, so if THE EYE's escalation ever wants particle reactions
tied to the camera signal, it's a reasonable investment.

🤖 Generated with Claude Code

…licker)

Additive-only visual prototype to feel whether SpriteKit adds dread beyond
plain SwiftUI. AtmosphereScene (SKScene) is a pure decoration layer with no
state, no sensors, and no knowledge of consent/EyeSession; AtmosphereBackground
bridges it into SwiftUI via SpriteView and sits behind the existing title/
consent UI in LULLApp's RootView. Also sets
INFOPLIST_KEY_UILaunchScreen_Generation so the simulator renders full-screen
instead of letterboxed (pre-existing gap in project.yml, unrelated to the
scene itself but needed to actually see it).

LULLKit untouched, 16/16 tests green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant