Create the main game scene: terrain grid, camera rig, environment #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stand up
res://scenes/game.tscnas the first playable-adjacent scene: a seeded terrain grid under an orthographic camera, lit, with working pan/zoom/rotate. No pawns, no building, no UI.This is the consumer the seed work (#1, #2, #3) was built for — until it exists,
GameState.run_seedis unobservable.Target tree
Menu wiring:
_start_new_game()inmain_menu.gdchanges to this scene after settingGameState.run_seed, and the temporaryprint()comes out.Seed threading
terrain_grid.gdmust not readGameStatedirectly. Take the seed as an exported/settable property, and letgame.gdpassGameState.run_seedin during setup.This keeps the generator testable in isolation and stops the autoload becoming an implicit dependency of every system — which matters more later, when threat cycles and contracts also want deterministic seeding off the same run seed.
Reference, not template
C:\Development\Games\OrthographicGamesolves this exact problem and its CLAUDE.md documents constraints found by failing at them. Read it first. Carry over the load-bearing mechanics:MeshLibrarygenerated at runtime; no authored.meshlib, no art assets.MeshLibraryhas no per-item material override in 4.7, so colour bakes onto each mesh viaPrimitiveMesh.material.height_scalegives a near-flat map.Camera3D.size(never the boom length), pan speed scales with zoom.Deliberately reconsider
The POC generates a radial-falloff island in a sea. That was a terrain-generation testbed, not this game's map. Worth deciding fresh:
level_heightshould follow the colony footprint we expect, not the POC's numbers.falloff_start = 0.80was fitted to guarantee reachable pawn spawns. With no pawns yet, that constraint does not apply — do not port the value without the reason.Pathfinding (
AStar2D, edge-based walkability) is out of scope — no pawns yet. Do not port it speculatively.Done when
gl_compatibilityrenders nothing headless, so a clean headless run proves nothing visual.May well split into separate terrain / camera issues if it gets unwieldy.