Live-star skybox: game activity feed + procedural star sky
Server: - GameActivityRegistry singleton tracks subscribed clients - game.subscribe_activity handler: registers client, returns active session IDs - game.unsubscribe_activity handler: deregisters client - BroadcastActivityAsync helper in GameHandlerBase (mirrors spectator push pattern) - GamePlaceArchSpiritHandler broadcasts "started" when both players have placed - FinalizeGameAsync broadcasts "ended" to all subscribers Client: - Settings.skybox_mode: "live" | "cdn" | "off" (default: "live"), persisted to cfg - Game.game_activity signal forwarded from game.activity push - game_screen.gd: live mode sets near-black procedural sky; subscribes to activity feed; each active session is an emissive sphere star (280-unit radius, blue-white) that fades in on start, twinkles via sine tween, and flash-explodes on end - CDN and Off modes preserved; hot-swap supported mid-game via Settings.settings_changed - InGameSettings: SkyboxModeOption OptionButton (Live / CDN / Off) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -461,6 +461,25 @@ public sealed record GameMetaDelta(
|
||||
string? ActivePlayerAccountId,
|
||||
int? TurnNumber);
|
||||
|
||||
// ── Skybox activity feed ───────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
/// Subscribe to game activity events so the client can animate its live star skybox.
|
||||
/// The response includes IDs of currently active sessions to initialise the star field.
|
||||
/// </summary>
|
||||
public sealed record GameSubscribeActivityRequest;
|
||||
public sealed record GameSubscribeActivityResponse(IReadOnlyList<string> ActiveSessionIds);
|
||||
|
||||
/// <summary>Unsubscribe from game activity events.</summary>
|
||||
public sealed record GameUnsubscribeActivityRequest;
|
||||
public sealed record GameUnsubscribeActivityResponse;
|
||||
|
||||
/// <summary>
|
||||
/// Pushed to all subscribed clients when a game session starts or ends.
|
||||
/// EventType: "started" | "ended"
|
||||
/// </summary>
|
||||
public sealed record GameActivityPush(string EventType, string SessionId);
|
||||
|
||||
// ── DTOs ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user