Blueprint 10 - Planetary Runtime
Status: PLAN - FINAL. Aerospace planetary layer: seamless, persistent, planet-scale exploration with community-built surface facilities. Simulation scope deliberately small - aerospace operations first, not a full civilization simulator. 09 paused at Fase 5.
1. Overview
ARCLUX already provides a persistent SPACE universe (WorldRegion 5000 entities stability.ts:13, tick 10/s tickScheduler, G/Kepler/1/r²/KE physics.ts:12, Gate transactional gate.ts:86). 10 adds a planetary layer beneath it - a planet-scale natural environment that is thousands of kilometers across, streamed by chunks, and shares the same persistence and physics as space.
The planet is empty by default - terrain, ocean, atmosphere, weather are generated, but cities, hangars, bases are built by communities on empty land. The runtime makes everything they build live and destructible like vessels.
2. Objectives / Non-Objectives
Objectives:- Seamless
SPACE -> ORBIT -> ATMOSPHERE -> SURFACEwithout loading screens. - Planet-scale geography that is explored, not teleported.
- Community-built surface facilities that are persistent and have consequences.
- Character that can leave the vessel and operate inside facilities.
- Global NPC / fauna / city simulation, terrain deformation, procedural cities, full economy - not in this blueprint.
3. Foundation Reuse (No New Laws)
- Lighting:
scene3d.ts:249DirectionalLight+PMREM scene.environment:858+MeshStandard- same sun illuminates planet and clouds. - Orbit: Kepler
environs.ts:49r=a(1-e²)/(1+e cosθ)+ lunar phase. - Physics:
physics.ts:12G, σ, c, AU+g=9.81+thermics.ts:34L/4πr²+collision.ts:92KE=½mv²×angle. - Persistence:
WorldRegion:41Map+RegionSnapshot:79/snapshotserver.ts:139+persistence.ts:120RecoveryManager+gate.ts:86+bridge.ts:75+relay/registry.ts:33. - Vessel as Repository:
universe/connect.ts:74->.arclux/->buildVesselModelstats.ts:183->server.ts:216spawnPlayerVessel.
4. Planetary Substrate - Natural Environment (Visual-Only)
- Terrain:
seed -> continental -> mountain -> biome -> riverheightmap, streamingLOD 16-64settings.ts:28,vertexColorstopsoil/clay/rock. - Ocean:
SphereGeometry+ Gerstner wavesω²=g·kg=9.81, depth from heightmap,71%coverage. - Atmosphere:
Sphere 1.018+ procedural cloudsmakeCloudTexture 512per-kind (gasGiant banded, ocean swirl, ice wispy, desert dust, volcanic ash)scene3d.tschilddepthWrite:false. - Weather:
mulberry32(tick)+ Perlinrain, wind, fog, not fully deterministic. - Environment: per-planet
gravity, temperature, weather, day/night 24h, lighting- streamed,gvaries (Earth 9.81, Mars 3.71).
child sphere 1.018 drift, metalness 0, dispose buildPlanetSystem:283 - does not enter WorldRegion.entities / EnvironsState.bodies / RegionSnapshot, does not add O(V*B) simulation.ts:121.
5. Scale & Persistence - Large Planet, Chunked Runtime
A planet is thousands of kilometers -heightmap + ocean + forest are geographically large, but the runtime only activates chunks that are in use.
- Chunking:
regionId = planetId:chunkX:chunkZdistributed viaWorldRegion:41relay/registry.ts:33claimRegion- only chunks with players or facilities are ticked; world state for all chunks stays persistent inpersistence.ts:120.
ERRATUM F9 (10.V F0, 2026-09-11, mengikat): paragraf chunking di atas DINYATAKAN KELIRU. Fakta terverifikasi:claimRegion= handoff shard vessel (bukan tick chunk); chunking yang berjalan = streaming + LOD sisi klien + persist koordinat. Chunk-tick server beneran = opsi (a) yang DITUNDA ke fase MMO-server. Lihat10-visual-fidelity.md§4 F9.
- Persistent Coordinate:
position Vec3{x,y,z}types.ts:18stored inRegionSnapshot:79RegionState:65Map- logging out inPlanet-07 / Region-A / Hangar-Areturns to the sameHangar-A;Player A ↔2000 km↔ Player Bare on the same planet, different locations. Coordinates are shareable (gate.ts:34position) for rendezvous. Spawn is at the chosen facility, not a global0,0,0. - Empty Land Rule: community facilities may only be placed on empty land (
ARCLUXlimits buildable area,forest/oceanstay natural) -hutan/lautremain,hangaris built where land is empty.
6. Time & Compass - Real-World Laws
SPACE -> ORBIT -> ATMOSPHERE -> SURFACE is a lerp through cloud layers, not a teleport.
- Time:
day/night 24h+lunar Keplerenvirons.ts:49+season+physics.ts:12G,σ-north is night while west is daybecausecompassfollowsplanet rotation+lunar orbitNewtonian tidal. Nonight faster- time equals real world.
7. Aerospace Operations - Seamless Flight
GateLink:34spaceportactivationRadius 800mgate.ts:86+cloud driftscene3d.ts:890+simulation.ts:238p+=v*dt- approach can besafe (auto Gate notifyTarget->ACK)ormanual (raycast terrain, KE damage on crash).- Low-altitude flight is gameplay:
cloud closes cockpit 2s -> terrain LOD fades in -> search for facility.
8. Surface Facilities - Built by Community
ARCLUX does not build cities. Community builds on empty land:Landing Pad, Hangar, Repair Facility, Refit Facility, Radar, Communication Station, Military Facility, Storage, Manufacturing Facility, Spaceport
Planet starts empty (🌲🌲🌲), community fills it. Each facility is StationEntity:54 health 0..100 component.ts:10 - code -> health buildVesselModel - combat.ts:39 DAMAGE_CEILING=12 / KE=½mv² -> region.remove + wreckage 04 + Repair=commit 02:257 - hangars have consequences.
9. Character - Limited to Facilities
FPS capsule 1.8m gravity 9.81 raycast clampSpeed 5.5 m/s baseline.ts:16 - only inside hangar/facility interiors, not full-planet FPS. CharacterEntity mass 80kg health blood/stamina SystemState:32 persists via lineage.ts.
10. Strategic Geography - Terrain Creates Opportunity
heightmap deterministically (mulberry32(planetId) random.ts) creates:
mountains (slope>0.4) -> military,plains (slope<0.1) -> spaceport,desert -> remote,poles -> observatory,coastline <2km -> coastal facilities,valleys -> hidden.
11. Night & Discovery - Planet Feels Inhabited Without NPCs
- Night:
StationEntityemissive #ffd9a096 windows/ring+PointLightrunwayamber- from orbit at nightDirectionalLightoff, facility emissive stays (PMREMoff) -orbit sees light -> descend -> runway -> hangarfeels inhabited without one NPC. - Discovery:
Radarworld.ts:83entitiesWithin(pos,50000)+distanceBetween:150+directory listServers-Planet-07: Hangar-A 12 km / Military-B 847 km / Spaceport-C 1,920 km / Unknown 430 km- thousands of km matter.
12. Social Geography - Empty by Default, Shaped by Players
Don't make the planet more complex - make the same planet feel deeper.
13. Checklist
- Substrate natural
terrain/ocean/atmosphere/cloudsstreaming LOD (visual-only) - 10.2 done - Scale + chunk + persistent coordinate
Planet/ChunkVec3persist - 10.3 done (F9 erratum:claimRegionDICABUT dari baris ini — handoff shard, bukan tick chunk) - Time & compass Newtonian
24h + lunar Kepler + G,σ- 10.4 done - Aerospace seamless
ORBIT->HANGARGateLinkwithout loading - 10.4 done - Community facilities
10typesStationEntitypersistent - 10.5 done - Character limited to facilities
FPS 5.5- 10.5 done - Strategic geography from
heightmap- 10.6 done (geography.ts 6 niches) - Night emissive + discovery
Radar+Unknown- 10.6 done (night.ts 96 windows + PointLight) - Empty by default, shaped by players - DONE (persistent WorldRegion + community facilities)
09Part A Fase 6-7 + Part B 8-12 remain next after10-10is now final aerospace depth, not SimCity.
10.X - Cinematic Environmental Interaction Layer
Status: PLAN - FINAL (Extension of 10). Visual authority boundary - effects derived from EnvironmentalContext, never becomes gameplay authority. Parent: Planetary Runtime (§3 reuse).
10.X.1 Purpose - Coherent Visual System
AUTHORITATIVE PLANETARY STATE -> ENVIRONMENT CONTRACTS -> EFFECT RESOLUTION LAYER -> (ATMOSPHERE|WEATHER|VESSEL) -> WORLD RESPONSE -> (TERRAIN|OCEAN|VEGETATION) -> FACILITY -> CINEMATIC OUTPUT
Extends 10 across atmosphere, clouds, sunlight, volumetrics, wind, rain, lightning, fog, terrain, ocean, vegetation, particles, vessels, landing zones, day/night, entry, low flight, surface ops - not a pile of isolated VFX.
10.X.2 Architectural Boundary
STATE -> CONTRACT -> VISUAL RESOLVER -> RENDERER - never PARTICLE -> GAMEPLAY STATE. Changing quality must not affect physics/health/damage/collision/weather/vessel/facility/planetary/simulation (see 10 §3 physics.ts:12).
10.X.3 EnvironmentalContext (single source)
EnvironmentalContext { planetId, planetSeed, simulationTick, worldTime, timeOfDay, sunDirection, sunElevation, sunIntensity, moonState, atmosphereState, temperature, humidity, pressure, visibility, weatherState, windState, cloudState, precipitationState, terrainState, oceanState, localSurfaceState, vesselState, facilityState, localEffectBudget }
10.X.4 Global Wind Field
WIND FIELD -> clouds|rain|fog|dust|smoke|leaves|grass|trees|debris|vessel - WindState { direction, speed, gustStrength, turbulence, verticalComponent, altitudeGradient, localVariation } - smooth transitions, shared visibility.
10.X.5–10.X.9 Sun, Cloud–Sun, Cloud Shadows, God Rays, Scattering
Sundirection/elevation/intensity/color/transmission/timeOfDay drives terrain/ocean/vegetation/clouds/atmosphere/facilities/vessels. Clouds self-shadow, edge-lit, sunrise/sunset bright. SUN -> CLOUD -> MOVING SHADOW -> SURFACE (forest darkens under cloud). God Rays mandatory GodRayContext { sunDirection/elevation/intensity, atmosphericDensity, fogDensity, cloudDensity/coverage, terrain/vegetation occlusion, weather, visibility, cameraPosition } through mountain gaps/valleys/canopy/cloud gaps - coupled, not static overlay.
Atmospheric scattering SPACE -> ORBIT -> ATMOSPHERE -> LOW -> SURFACE - limb, haze, cloud layer, no map switch.
10.X.10–10.X.12 Volumetric Clouds, Intersection, Weather Stack
Cloudscoverage/density/altitude/thickness/wind/turbulence/weather/sun/shadow/scattering/gaps - quality scalable ground->orbit. CLEAR -> CLOUD EDGE -> LIGHT FOG -> INTERIOR -> EXIT continuous. CLEAR -> OVERCAST (cloud+shadow) -> RAIN (cloud+rain+wet+puddles+fog) -> STORM (+wind+lightning+darkening) coordinated.
10.X.13–10.X.20 Rain, Lightning
RainState { intensity, direction, wind, droplet density, visibility, precipitation type, storm intensity } -> slant, splash, wet, puddles, runoff, ocean ripples. LightningEvent { eventId, timestamp, position, direction, intensity, duration, cloudResponse, environmentResponse } -> cloud flash + sky/terrain/ocean/facility illumination + reflection (bolt is only one part). DARK STORM -> ⚡ FLASH -> MOUNTAIN REVEALED -> DARK.
10.X.21–10.X.26 Fog, Vegetation, Low-Altitude Vessel
Fogtemperature/humidity/weather/altitude/terrain/wind/visibility/timeOfDay -> height/distance/valley/entry haze + god-ray feed. Vegetation wind grass->small->bush->branch->tree gust/turbulence phased, rain wetness. ORBIT -> HIGH -> MEDIUM (cloud/shadow/haze) -> LOW (vegetation/dust/wake) -> GROUND - VESSEL -> LOCAL AIR -> VEGETATION visual only.
10.X.27–10.X.29 Dust, Landing, Exhaust
Landing dust mandatory phases:Approach (small particles) -> Hover (radial dust) -> Touchdown (burst -> cloud -> wind advection) -> Settlement. Exhaust -> dust/heat/particles -> column -> wind dispersion on takeoff. WindState decides direction.
10.X.30–10.X.37 Ocean, Terrain, Snow, Heat
OceanState { wave direction/amplitude/frequency, wind relationship, roughness, depth, reflection, foam, disturbance } + SUN/OCEAN specular + VESSEL -> spray/wake/foam. Terrain wet darkening/puddles/runoff/reflection gradual dry->wet. Snow/ice where g/temp allow, dust storms WIND -> particles -> haze, heat haze visual only.
10.X.38–10.X.45 Entry, Orbit Weather, Night, Facility Response, Particles, Event Chain
EntrySPACE -> EDGE -> UPPER -> DENSE -> CLOUDS -> LOW (glow, haze, sky transition). Orbit sees storm fronts/gaps/night lights. Night moon/stars/emissive + facility nav lights. FACILITY -> rain(wet/puddle) | wind(particles) | fog(visibility) | lightning(flash) | night(emissive) - visual only. Particles rain/dust/fog/leaves/spray/snow/ash/steam derive from wind+gravity+turbulence+vessel. Event chain STORM -> cloud density -> sunlight reduction -> shadow -> rain -> wet -> puddles -> reflection -> lightning -> flash -> ocean/facility coherent.
10.X.46–10.X.51 Sunrise/Sunset, Camera, Reflections, Occlusion, Local Volumes
SunriseDARK -> HORIZON GLOW -> SCATTERING -> RIM LIGHT -> CLOUD -> GOD RAYS -> SURFACE; sunset long shadows, cloud color, god rays. Camera rain/lightning/turbulence/landing subtle, never physics. Reflections sun/cloud/rain/wet/ocean/facility/lightning. Occlusion terrain/mountain/building/tree/cloud/fog for god rays/shadows. Local effect volumes around player/landing/facility (rain/vegetation/dust/wake/fog/god rays/particles), distant = low cost.
10.X.52–10.X.55 Quality, Budget, Determinism, Persistence
FAR (scattering/coverage) -> MEDIUM (rain/fog/shadow) -> NEAR (dust/spray) -> CINEMATIC (volumetrics/high-res god rays), graceful degrade. Budget PLAYER PROXIMITY -> VISUAL IMPORTANCE -> EFFECT COST (expensive near player/landing/camera). Determinism planetSeed/weatherSeed/simulationTick/chunkKey/position - visual subordinate to authority. Persistent: weather/facility/terrain/vessel/events - transient: particles/god rays/fog/splash/flash (regenerated after handoff/reconnect).
10.X.56–10.X.59 Seamless + Composition + Non-Goals + Contract
SPACE (star field/limb/glow) -> ORBIT (cloud systems/shadows/night lights) -> ATMOSPHERE (scattering/haze/clouds/fog/god rays) -> LOW FLIGHT (vegetation/ocean/wind) -> SURFACE (rain/dust/puddles) -> LANDING (exhaust/dust) -> FACILITY (weather/wetness/lighting) - no discontinuity. Composition targets: mountain sunrise, forest flight, ocean storm, desert landing, night facility, storm night landing. Non-goals: second physics/weather/terrain/vessel/facility, pile of scripts. Contract PLANETARY RUNTIME -> (PLANET|WEATHER|TIME) -> ENVIRONMENT CONTEXT -> (ATMOSPHERE|SURFACE|VESSEL -> CLOUDS/FOG/GOD RAYS | TERRAIN/OCEAN/VEGETATION | EXHAUST/WAKE/DUST) -> FACILITY RESPONSE -> CINEMATIC FRAME - same state propagates consistently.
10.X Checklist (implementation - like other blueprints)
Each row = PR (or iris), no auto-merge. Visual-only unlessStationEntity:54health involved - then viacomponent.ts:10+combat.ts:39/collision.ts:92+persistence.ts:120(audit trail: authority vs visual).
-
EnvironmentalContext+WindStatecontracts (EnvironmentalContext.ts,WindState.ts- derived fromplanetSeed/simulationTick/worldTime/sunDirection) - Sun / day-night lighting (
sunDirection/elevation/intensity-> terrain/ocean/vegetation/clouds) - DONE 10.X.1 sun.ts - Dynamic cloud–sun + cloud shadows (
CLOUD -> MOVING SHADOW -> SURFACE) - DONE 10.X.1 cloudShadows.ts - God rays volumetric (
GodRayContext- mountain/forest/cloud-gap shafts, not overlay) - DONE 10.X.1 godRays.ts - Atmospheric scattering
SPACE -> SURFACE+ volumetric clouds (coverage/density/altitude/thickness/wind) + cloud intersection (CLEAR -> EDGE -> INTERIOR) - DONE 10.X.1 (part of godRays/fog) - Weather stack
CLEAR/OVERCAST/RAIN/STORMcoordinated - DONE 10.X.2 weatherStack.ts - Rain + rain–surface/ocean (
wet/puddles/runoff/reflection,micro-ripples) - DONE 10.X.2 rain.ts - Lightning event chain (
LightningEvent-> cloud flash -> terrain/ocean/facility + reflection) - DONE 10.X.2 lightning.ts - Fog (+ fog–sun god-ray feed) + vegetation wind/rain (
grass->treephased) - DONE 10.X.3 fog.ts + vegetation.ts - Low-altitude vessel -> vegetation/dust + landing dust phases + exhaust–ground - DONE 10.X.3 vegetation tick + oceanSystem wake (partial, landing dust deferred to 10.E)
- Ocean system (
OceanState+ vessel spray/wake + sun reflection) - DONE 10.X.3 oceanSystem.ts - Terrain wet/snow/heat + dust storms - DONE 10.2 terrain wet + 10.X.3 fog/vegetation (dust deferred to 10.E)
- Entry effects + orbit weather visibility + night emissive - DONE via 10.E + 10.G G6
- Facility–weather (wet/wind/fog/lightning/night) + landing pad cinematic + damage visualization (smoke/debris via authority) - DONE via 10.G + 10.E
- Particles derived (
wind+gravity+turbulence) + environmental event chain - DONE via 10.G G1 + 10.X - Sunrise/sunset cinematic + camera response (exposure/visibility/touchdown) + reflections + occlusion - DONE via 10.X sun/godRays + 10.C6-C7
- Local effect volumes + quality
FAR->CINEMATIC+ budgetproximity->importance->cost+ determinism seeding + persistence boundary - DONE 10.X.4 localVolumes.ts + qualityBudget.ts
Dependency:10substrate (terrain/ocean/atmospherevisual-only) lands first;10.Xrides on top.09Part B 9-12 land before10.Xneeds facilities to illuminate. No new authority - every effect is a resolver overEnvironmentalContext.
14. File Mapping - Where Code Goes (No Guessing, 1 Contract + 1 Folder)
Biar pas code gak ngarang:BLUEPRINT 10numpang ke file yang udah ada,BLUEPRINT 10.Xcuma tambah 1 kontrak. Hujan gak 1 planet - per chunk, deterministik dariplanetSeed+tick.
BLUEPRINT 10 (substrate) -> 2 tempat
1. Serverpackages/gameserver/ - otoritas & persistence (reuse, bukan baru):
environs.ts(udah ada,SystemBodiesKepler) -> tambahplanetaryEnvirons.ts-heightmapseed, chunkplanetId:chunkX:chunkZviaclaimRegion(world.ts:41+relay/registry.ts:33udah ada). Chunk cuma di-tick kalau ada pemain/facility;persistence.ts:120simpan semua.physics.ts:12(G, KE) +thermics.ts:34(1/r²) -> reuse buatgravityper planet (Earth 9.81 vs Mars 3.71),collision.ts:92KE=½mv²buat crash.types.ts:18 Vec3+world.ts:41 Map+persistence.ts:120-> koordinat persistenVec3udah ada, tinggalplanetIddiregionId(log out Hangar-A -> Hangar-A, 2000 km same planet).cosmicEvent.ts(udah ada, anomali acak) -> cuaca/anomali numpang di sini:weatherSeed = mulberry32(planetSeed + tick)->rain/wind/foglokal per chunk, bukan global.Anomali = cosmicEventyang sama, visualnya beda. Gak bikin file gede baru.
packages/gameserver/planetary/environment.ts (EnvironmentalContext + WindState) - kontrak yang dibaca semua sistem. Gak bikin simulasi baru.
2. Client apps/game/src/renderer/scene3d/ - visual-only (gak masuk WorldRegion):
scene3d/planets.ts(udah ada,buildPlanetSystem+makeCloudTexture) -> tambahscene3d/planetary/folder:Semuachild sphere 1.018+depthWrite:false+disposebuildPlanetSystem:283- gak masukWorldRegion.entities/EnvironsState.bodies/RegionSnapshot, gak nambahO(V*B)simulation.ts:121. Hujan di Valley A, Valley B cerah -weatherStateper chunk.
BLUEPRINT 10.X (cinematic) -> 1 kontrak + numpang
EnvironmentalContext.ts+WindState.ts(diplanetary/environment.tstadi) - satu angin dilihat awan+hujan+kabut+daun bareng (10.X §4). Gak adarainpunya angin sendiri.- Efek lain (
god rays,landing dust 4 fase,puddles,lightning flash) gak bikin file otoritas baru - cumavisual resolverbacaEnvironmentalContext -> THREE.localEffectBudgetper chunk -> habitat A hujan deres, B kering.
EnvironmentalContext) + 1 folder planetary/ 7 file visual. Sisanya numpang ke file yang udah ada. weatherSeed per chunk + WindState localVariation -> anomali gak ketebak tapi deterministik planetSeed+tick. Pondasi WorldRegion Map + Vec3 + RecoveryManager udah beton -> langit tinggal tancap.
15. Addendum - Gaps Closed (Continuous Event & Shoreline) - PLAN FINAL
Temuan 8 celah setelah reviewAPA efek adavsGIMANA efek ketemu sepanjang waktu- ditutup sebagai addendum, bukan arsitektur baru (semua cuma resolver di atasEnvironmentalContext, visual-only).
G1 - Continuous Environmental Event (Priority 1 - wajib)
BukanRAIN=true/false -> langsung CLEAR. Tapi state machine visual:
CLEAR (☀️) -> PRE-STORM (awan tebal, shadow gerak, angin naik, laut berubah) -> STORM (hujan, visibility turun, lightning, spray) -> LANDING DURING STORM (pad spray, wet reflection, mist) -> POST-STORM (awan pecah, matahari balik, tapi GENANGAN + DAUN BASAH + MIST MASIH ADA) -> RECOVERY -> NORMAL
Implementasi: EnvironmentalEvent { eventId, phase: "clear"|"pre"|"storm"|"landing"|"post"|"recovery", startedAt, weatherState, windState, cloudState } derived dari EnvironmentalContext - visual only, gak ganti authority.
G2 - Weather Accumulation -> Recovery (gabung G1)
RAIN -> WET -> DRAINING -> DRYING -> NORMAL - puddle surut, runoff ke titik rendah, vegetation tetap basah/reflektif beberapa menit setelah hujan berhenti. Planet persistent jadi terasa: “tadi di sini badai”.
G3 - Coastal Transition (Priority 2)
BukanTERRAIN | garis air | OCEAN. Tapi zona:
LAND (dry) -> WET SHORE (wet sand/rock, foam, spray) -> SHALLOW WATER (≈≈≈) -> OPEN OCEAN (wave)
Storm -> coastal spray↑, foam, wave breaking, shoreline mist, wake. Checklist: terrain wet -> coastal foam/spray -> shallow -> ocean wave gradual.
G4 - Hydrological Continuity
MOUNTAIN (snow/rain) -> STREAM -> RIVER (flow direction, foam, wet banks) -> LAKE -> COAST -> OCEAN - river dari heightmap procedural, visual: flow direction, waterfalls, foam, wet banks, shallow/deep, river->ocean meeting, rain-fed runoff, mist near waterfall. Tanpa simulasi hidrologi berat.
G5 - Terrain Visual Memory (Future - decal only)
scorch mark, dust residue, disturbed vegetation, debris, snow displacement - decal per chunkKey persist via persistence.ts (bukan voxel Minecraft). “Pernah landing di sini” - taruh sebagai FUTURE biar gak scope creep 10.X.
G6 - Atmospheric Continuity (Optical)
Orbit (limb) -> High (cloud) -> Low (haze) -> Surface (fog/rain) - horizon haze + valley fog + mountain contrast berubah kontinu, bukan trigger entered atmosphere.
G7 - Terrain + Sun Moving Shadows
Sunrise di balik mountain:valley gelap -> shadow line gerak melintasi valley/forest/ocean/facility/pad - bukan global directional doang. sunElevation + terrain heightmap -> shadow map gradual.
Checklist Gaps (PR - no auto-merge)
-
EnvironmentalEventstate machineclear->pre->storm->landing->post->recovery+WET->DRAINING->DRYING(visual timers, gak ganti weather authority) - Coastal zone
WET SHORE -> SHALLOW -> OPEN OCEAN+ foam/spray/shoreline mist (terrain/ocean meet) - Hydrological
river flow + foam + wet banks + river->ocean(dari heightmap) -
Terrain Visual Memory(FUTURE decal scaffold — wire ready, persist via persistence.ts) decal per chunk (FUTURE - persist scorch/dust) - Atmospheric optical
haze->valley fog->mountain contrast+ moving terrain shadows
Catatan file: G1-G2 diplanetary/weather.ts+EnvironmentalContext; G3-G4 diplanetary/terrain.ts+ocean.ts; G5 diplanetary/surface.tsdecal; G6-G7 diplanetary/atmosphere.ts. Semua visual resolver, no new authority.
16. Emergency Landing - ADRIFT -> FALLING -> CRASHED (PLAN FINAL)
Kapal habis perang gak langsungrespawn. Rusak -> terombang-ambing -> jatuh kayak film -> mendarat darurat -> butuhRepair = commitbiar hidup lagi. Sinematik, persistent, dan numpang di pondasi yang udah ada.
State Machine (visual + authority tipis)
- ADRIFT:
VesselEntityhealth < 10%->state="adrift"+velocitydrift pelan +cooldownslock +HUD ENGINE 0%+sfxDebrispelan. Pemain lain lihat◈ VSL GSF-xxxx 847 km - ADRIFT(viaworld.ts:83 entitiesWithin+directory). Gak bisa thrust - servervalidator.tsrejectmovekalauhealth < 10%. - FALLING: Gravitasi
physics.ts:12narik ke planet terdekat (bukan jatuh meteor batu, tapipitch 70° + velocity 120 m/s + heat haze + cloud gap god rayskayak filmInterstellar).simulation.ts:238 p+=v*dt + drag 0.02+clampSpeedbiar drift natural. Visual:atmospheric entry(10.X §38) +cloud intersection(10.X §11). - EMERGENCY LANDING:
GateLink:34 spaceport 800mgak kepake - ini manualraycast terraincariempty land(planetaryfacilities.tsrule: hutan/laut tetep natural).Landing dust 4 fase(10.X §28)Approach->Hover->Touchdown burst->Settlement + wind advection. Kalau miring/cepat ->KE crash -> wreckage(persistence.ts:120+04). - CRASHED:
VesselEntityposition = terrain height,health 5%,velocity 0,state="crashed"persist viaRegionSnapshot+persistence.ts. Visual:smoke/debris + emissive red(10.X §43). Gak bisalaunchsampaiintegritybalik.
Kenapa Gak Butuh File Baru Gede
Numpang semua:- Damage ->
combat.ts:39+collision.ts:92+thermics.ts:34 - Jatuh ->
physics.ts:12 G + environs.ts:49 Kepler+simulation.ts:238 - Terrain ->
planetary/terrain.ts+chunks.tsplanetId:chunkX:chunkZ - Visual ->
10.Xatmosphere.ts+weather.ts+planetary/surface.ts - Persist ->
persistence.ts:120 RecoveryManager(restart ≠ reset V6)
packages/gameserver/vesselState.ts (VesselState { health, state: "nominal"|"adrift"|"falling"|"crashed" }) - tipis, cuma enum + transisi, otoritas tetep world.ts + validator.ts.
Checklist (PR - no auto-merge)
-
VesselState+ transisiadrift->falling->crashed(server, health <10% -> adrift, gravitasi -> falling, raycast -> crashed) -
ADRIFTdrift + HUDENGINE 0%+ validator reject thrust -
FALLINGheat haze + cloud intersection + pitch sinematik (bukan meteor) -
EMERGENCY LANDINGraycastempty land+ dust 4 fase + KE crash check -
CRASHEDpersist + smoke/debris +Repair=commit-> launch lagi - Visual only:
WIND FIELDbawadustsettlement,EnvironmentalContextbawafallingstate
Catatan: Bukanrespawn3 detik arcade. Inifilm- terombang-ambing dulu, jatuh pelan, mendarat darurat, baru bisa commit. Planet jadi kuburan + bengkel.
Urutan:09Part B 9-12 ->10substrate ->10.Xcinematic +15gaps ->16emergency landing (numpang semua). Gak lompat.
10.C - Cinematic Atmospheric & Experiential Continuity (Filtered - PLAN FINAL)
ParentCore:10+10.X+10.E. Scope:client presentation- bukan authority baru.No New Authority: gak boleh ubah position/velocity/health/physics/weather/terrain/facility/persistence - cuma bacaEnvironmentalContext->CinematicContext->presentation.
WORLD STATE -> ENVIRONMENTAL STATE -> EVENT -> CINEMATIC CONTEXT -> (CAMERA|AUDIO|VESSEL MOTION|COCKPIT|LIGHTING|VFX) -> PLAYER EXPERIENCE. Autoritative (planet/weather/vessel/facility) -> EnvironmentalContext -> Cinematic resolver -> Renderer. Gak boleh VFX -> health.
CinematicContext (derived, gak persist): { eventId, eventType (ATMOSPHERIC_ENTRY|STORM|LIGHTNING|EMERGENCY_LANDING...), phase (TRIGGER->PRE->ACTIVE->PEAK->RECOVERY->EXIT), priority, cameraMode, exposure, visibility, environmentalIntensity, audioIntensity, vesselMotion {pitch,roll,vibration}, transitionProgress, exitCondition }
Event Sequencing: Satu event punya priority (CRASH 100 > EMERGENCY 90 > ENTRY 70 > STORM 50). Storm contoh: CLEAR -> PRE-STORM (wind↑, cloud dark) -> RAIN -> LIGHTNING -> TURBULENCE -> PEAK -> RAIN↓ -> CLOUD BREAK -> RECOVERY (wet tetap).
Atmospheric Flight & Turbulence (presentation, bukan physics force): Vessel+Wind+Density+Weather+Altitude+Velocity -> TurbulenceResolver -> visualPitch/Roll/Vibration/cameraShake/cockpitShake/audio. NORMAL->BUILDUP->ACTIVE->DECAY->NORMAL, gak 0->MAX instan. Sources: windVector, gust, turbulence, weatherIntensity.
Heat / Entry: ENTRY VELOCITY + DENSITY + ALTITUDE -> heat glow/distortion/exposure (COLD->HEATING->PEAK->COOLING->NORMAL) - visual, damage tetep authority sim.
Wind -> Vessel: GLOBAL WIND FIELD (10.X §4) -> CLOUD|RAIN|FOG -> VESSEL cinematic motion - gak ada wind simulator kedua.
Cloud / Cockpit / Audio / Lightning: CLOUD APPROACH -> visibility↓ -> diffuse -> rain↑ -> turbulence -> CLOUD EXIT -> terrain reveal (continuous). Rain -> windshield droplets -> lightning -> cockpit flash -> exposure. LightningEvent -> cloud flash -> terrain/ocean/facility/cockpit + thunder delay by distance.
Camera Director: World Event -> Camera Response (entry: stable->follow->cloud compression->reveal, landing: approach->touchdown->settle, crash: impact->displace->settle) - additive & bounded (≤2° pitch/roll, exposure ≤+0.3), priority tentukan event, never forced cutscene.
Landing / Ocean / Wreck: APPROACH -> GROUND PROXIMITY -> GROUND EFFECT -> TOUCHDOWN -> DUST/SPRAY -> SETTLE (desert/forest/snow/wet beda via EnvironmentalContext). Ocean approach -> disturbance -> spray -> wake - authority tentukan valid/invalid. Wreck IMPACT->DISPLACEMENT->DEBRIS->SMOKE->SETTLE->WRECK (persistent wreck di authority, transient flash di presentation).
Budget & Determinism: PROXIMITY->IMPORTANCE->COST - FAR (cloud mass/beacon) -> MEDIUM (rain/fog) -> NEAR (dust/spray) -> CINEMATIC (full volumetrics) graceful degrade, cuma sekitar pemain mahal. Determinism planetSeed/weatherSeed/tick/chunkKey/eventId - no uncontrolled randomness.
File (saran, 6 inti dulu, sisanya numpang): scene3d/cinematic/{ CinematicContext.ts, CinematicEventDirector.ts, AtmosphericFlightResolver.ts, TurbulenceResolver.ts, CinematicCameraDirector.ts, EnvironmentalAudioResolver.ts } - Heat/Cockpit/Impact/FacilityDiscovery numpang dulu, pecah kalau perlu. Semua -> THREE visual, no gameplay authority.
Checklist 10.C (PR, no auto-merge):
-
10.C.1ContractsCinematicContext/Event/Phase(typecheck) -
10.C.2Directortrigger/phase/priority/exit(multiple events) -
10.C.3Flightwind+density+velocity+altitude -> turbulence/motion/camera -
10.C.4Heatentry->heating->peak->cooling -
10.C.5Cameraentry/landing/crash/docking(bounded, player control intact) -
10.C.6Audiowind/rain/thunder/engine/atmospheresync -
10.C.7Cockpitrain/lightning/heat/cloud/turbulencepresentation-only -
10.C.8Impactimpact->debris->smoke->settling->wreck -
10.C.9Facility discoverydistant->reveal->approach->hangar(no cutscene) -
10.C.10ContinuitySPACE->ORBIT->ATMOSPHERE->CLOUD->SURFACE->FACILITYunderFAR->CINEMATIC
Dependency:10substrate ->10.X/10.G/10.E->10.Cpaling akhir (presentation di atas environmental).10.Cbisa dibangun bareng10.Xkarena pakaiEnvironmentalContextsama, tapi merge terakhir.
17. Implementation Phases - Urutan Eksekusi (KAYAK 09 - TIAP FASE = PR, NO AUTO-MERGE)
Biar gak lupa besok habis A-B-C dari mana - kayak09adaFase 1-12,10juga ada fase. Tiap fase punya file + checklist + dependency. No guessing.
FASE 10.1 - Substrate Contracts (pondasi dulu)
-
packages/gameserver/planetary/environment.ts-EnvironmentalContext+WindState- DONE 10.1 (planetId, planetSeed, tick, worldTime, sunDirection, weatherState, dll) - 1 kontrak, semua baca ini -
Verify:npx tsc --noEmit+node -e "require('./environment.ts')"- kontrak kebaca semua sistem - DONE tsc 0
FASE 10.2 - Planetary Substrate Visual (terrain/ocean/atmosphere)
-
scene3d/planetary/terrain.ts- heightmapcontinental->mountain->biome->river- DONE 10.2 LOD 16-64,vertexColors -
scene3d/planetary/ocean.ts- Gerstnerg=9.81, 71%, depth dari heightmap - DONE 10.2 -
scene3d/planetary/atmosphere.ts-Sphere 1.018+ clouds512per-kind - DONE 10.2,depthWrite:false -
Verify:build-game.mjsOK,scene.environmentPMREM tetap - DONE 1.5mb
FASE 10.3 - Scale & Chunk + Persistent Coordinate
-
scene3d/planetary/chunks.ts- streaming LOD, cull jauh,planetId:chunkX:chunkZ- DONE 10.3 (F9 erratum: frasa “viaclaimRegion” DICABUT — streaming klien, bukan tick server) -
packages/gameserver/planetary/chunks.ts+geography.ts- matematika kunci + helper chunk - DONE 10.3 (F9 erratum: frasa “chunk tick via claimRegion” DICABUT — tanpa loop tick) -
types.ts:18 Vec3-log out Hangar-A -> Hangar-A, 2000 km same planet, shareablegate.ts:34- DONE via persistence -
Verify:2 player 2000 km same planet, relog tetap di tempat - DONE
FASE 10.4 - Time & Aerospace Seamless
-
scene3d/planetary/surface.ts-lerp SPACE->ORBIT->ATMOSPHERE->SURFACE(bukan teleport), cloud occlusion 2s - DONE 10.4 -
environs.ts:49+physics.ts:12-24h + lunar Kepler + G,σ->north night west day- DONE via deriveSunState -
gate.ts:86GateLink spaceport 800m+simulation.ts:238 p+=v*dt-auto ACKvsmanual raycast crash KE- DONE -
Verify:SPACE->SURFACE tanpa loading, low flight cari facility - DONE
FASE 10.5 - Facilities + Character Limited
-
scene3d/planetary/facilities.ts- 10 facility diempty land- DONE 10.5 -
packages/gameserver/world.ts:41-FacilityEntityspawn di empty land rule - DONE canBuildOnEmptyLand -
CharacterFPS 5.5 m/s limitedhangar/facilityonly (clampSpeed 5.5,baseline.ts:16) - DONE -
Verify:build di empty land bisa, hutan/laut tetep natural, facility healthcombat.ts:39- DONE
FASE 10.6 - Geography & Night
- Strategic geography
mountains->military, plains->spaceport, poles->observatorydariheightmap(mulberry32) - DONE 10.6 geography.ts - Night
emissive #ffd9a0+PointLight runway+Radar entitiesWithin 50000+Unknown- DONE 10.6 night.ts -
Verify:orbit malam liat facility nyala, RadarHangar-A 12 km / Unknown 430 km- DONE
FASE 10.X.1 - Sun + Clouds + God Rays (cinematic core) - DONE
-
WindStateshared ->clouds drift,rain slant,fog flow- DONE via deriveWindState - Cloud–sun
illuminated tops/darker bases/self-shadow+CLOUD->SHADOW->SURFACE- DONE via cloudShadows.ts -
GodRayContext-mountain gap/valley/canopy/cloud gapshafts, not overlay, coupledsun+fog+cloud+terrain+camera- DONE via godRays.ts -
Verify:cloud lewat -> forest darkens -> god ray gerak - DONE
FASE 10.X.2 - Weather Stack + Rain + Lightning - DONE
-
WeatherState CLEAR/OVERCAST/RAIN/STORMcoordinated ->RainState+wet/puddles/runoff/reflection+ocean ripples- DONE via weatherStack.ts -
LightningEvent->cloud flash + terrain/ocean/facility illumination + reflection(bolt cuma 1 part) - DONE via lightning.ts -
Verify:stormcloud density -> sunlight down -> rain -> puddles -> lightning flash -> ocean reflection- DONE
FASE 10.X.3 - Fog + Vegetation + Dust + Ocean - DONE
- Fog
temperature/humidity/weather->height/distance/valley/entry haze+fog–sun god-ray feed- DONE via fog.ts - Vegetation
grass->treewind phased + rain wetness - DONE via vegetation.ts - Ocean
OceanState+spray/wake/foam+sun reflection- DONE via oceanSystem.ts -
Verify:wind gust -> leaves/grass beda fase, rain -> leaf wetness - DONE
FASE 10.X.4 - Local Volumes + Quality + Budget - DONE
-
Local effect volumes(player/landing/facility) +quality FAR->CINEMATICgraceful degrade - DONE via localVolumes.ts -
Budget proximity->importance->cost+determinism planetSeed+tick+chunkKey+persistence boundary(transient vs persistent) - DONE via qualityBudget.ts -
Verify:jauh = low cost, dekat = cinematic, handoff/reconnect regenerate - DONE
FASE 10.G - Gaps Closed (Continuous Event & Shoreline)
-
EnvironmentalEventclear->pre->storm->landing->post->recovery+WET->DRAINING->DRYING(G1-G2) - DONE via environmentalEvent.ts wire10G - Coastal
WET SHORE->SHALLOW->OPEN OCEAN+ foam/spray (G3) + Hydrologicalriver->ocean(G4) - DONE via coastal.ts/hydrological.ts wire10G -
Verify:POST-STORM genangan masih ada, coastal gradual, river ketemu ocean - DONE
FASE 10.E - Emergency Landing (film-like)
-
vesselState.tsadrift->falling->crashed+ADRIFT drift+FALLING heat+LANDING dust 4 fase + KE+CRASHED persist- DONE via vesselState.ts/wire10E #720 -
Verify:health<10% -> adrift -> falling pitch film -> empty land survive / hutan crash -> Repair=commit - DONE
FASE 10.C.1 - Cinematic Contracts (pondasi presentasi)
-
scene3d/cinematic/CinematicContext.ts+CinematicEvent.ts+CinematicPhase.ts-eventId, eventType, phase TRIGGER->EXIT, priority, exposure -
Verify:npx tsc --noEmit+ typecheck, no authority - DONE tsc 0
FASE 10.C.2 - Event Director
-
CinematicEventDirector.ts-trigger/phase/priority/exit(CRASH 100 > EMERGENCY 90 > ENTRY 70) -
Verify:multiple events, priority resolve - DONE via CinematicEventDirector
FASE 10.C.3 - Atmospheric Flight & Turbulence
-
AtmosphericFlightResolver.ts+TurbulenceResolver.ts-wind+density+velocity+altitude -> turbulence/motion/cameraNORMAL->BUILDUP->ACTIVE->DECAY -
Verify:SPACE -> ATMOSPHERE -> LOW FLIGHTturbulence continuity - DONE via AtmosphericFlightResolver
FASE 10.C.4 - Heat Response
-
HeatResponseResolver.ts-entry->heating->peak->cooling(visual, gak ganti physics) -
Verify:heat visual continuityCOLD->PEAK->NORMAL- DONE
FASE 10.C.5 - Camera Director (bounded)
-
CinematicCameraDirector.ts-entry/landing/crash/docking≤2° pitch/roll, exposure ≤+0.3additive, never forced cutscene -
Verify:player control intact, camera additive - DONE via CinematicCameraDirector
FASE 10.C.6 - Audio Context
-
EnvironmentalAudioResolver.ts-wind/rain/thunder/engine/atmospheresync dariEnvironmentalContext- DONE via EnvironmentalAudioResolver -
Verify:audio syncwind↑ -> rain -> thunder delay- DONE via EnvironmentalAudioResolver
FASE 10.C.7 - Cockpit Response
-
CockpitResponseResolver.ts-rain/lightning/heat/cloud/turbulencepresentation-only,HUD motion- DONE via CockpitResponseResolver -
Verify:cockpit gak ubah physics - DONE via CockpitResponseResolver
FASE 10.C.8 - Impact / Wreck
-
ImpactPresentation.ts-impact->debris->smoke->dust->settling->wreck- DONE via ImpactPresentation (persistent wreck authority, transient flash presentation) -
Verify:health 0 -> wreckpersist, flash transient - DONE via ImpactPresentation
FASE 10.C.9 - Facility Discovery
-
FacilityDiscovery.ts+AtmosphericReveal.ts-distant->reveal->approach->hangar- DONE via FacilityDiscovery (no cutscene,FOG->SILHOUETTE->LIGHT->DETAIL) -
Verify:orbit night liattiny emissive -> beacon -> runway- DONE via FacilityDiscovery
FASE 10.C.10 - Continuity & Budget
-
CinematicBudget.ts-FAR->MEDIUM->NEAR->CINEMATIC- DONE via CinematicBudget +proximity->importance->cost+SPACE->FACILITYcontinuity -
Verify:SPACE->ORBIT->ATMOSPHERE->CLOUD->SURFACE->FACILITYno discontinuity,handoff/reconnectregenerate - DONE via CinematicBudget
Dependency final: 09 9-12 -> 10.1 -> 10.2 -> 10.3 -> 10.4 -> 10.5 -> 10.6 -> 10.X.1 -> 10.X.2 -> 10.X.3 -> 10.X.4 -> 10.G -> 10.E -> 10.C.1 -> 10.C.2 -> 10.C.3 -> 10.C.4 -> 10.C.5 -> 10.C.6 -> 10.C.7 -> 10.C.8 -> 10.C.9 -> 10.C.10 - gak lompat, tiap fase tau file + verify, no guessing, code 1:1 gampang.