feat(client): initialize Godot 4 project boilerplate (epic #277)
Set up the complete Godot 4.6 client foundation as a pure renderer (D-020): - project.godot with 2D rendering, autoloads, input actions - Main scene: Game > World (TileMapLayer, Entities, FogOverlay) + Camera2D + UILayer - Autoloads: SimBridge (connection state machine + test mode), GameState, InputMapper - Rendering stubs: WorldRenderer, EntityRenderer, FogRenderer - UI stubs: HUD (health/perception/time), Minimap, MonologueDisplay - Input mapping: WASD/arrows, E (interact), Tab (perception), Esc (menu), Space (pause) - gdUnit4 smoke tests: scene loads, autoloads registered (2/2 passing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
extends Node
|
||||
|
||||
# Updated each frame from ObserverSnapshot data
|
||||
var current_snapshot: Dictionary = {}
|
||||
var player_position: Vector2 = Vector2.ZERO
|
||||
var visible_entities: Array = []
|
||||
var fog_state: Dictionary = {}
|
||||
var hud_data: Dictionary = {}
|
||||
|
||||
func apply_snapshot(snapshot: Dictionary) -> void:
|
||||
current_snapshot = snapshot
|
||||
|
||||
# Parse player data
|
||||
if snapshot.has("player") and snapshot.player.has("position"):
|
||||
var pos = snapshot.player.position
|
||||
player_position = Vector2(pos[0], pos[1])
|
||||
|
||||
# Parse entities
|
||||
if snapshot.has("entities"):
|
||||
visible_entities = snapshot.entities
|
||||
|
||||
# Parse fog state
|
||||
if snapshot.has("fog"):
|
||||
fog_state = snapshot.fog
|
||||
|
||||
# Parse HUD data
|
||||
if snapshot.has("hud"):
|
||||
hud_data = snapshot.hud
|
||||
Reference in New Issue
Block a user