How a1j9o94/eclipse-rougelike works
Eclipse · Second Dawn is a browser-based strategy game with solo AI, multiplayer rooms, resumable profiles, and an authoritative shared rules engine. Players create or join a game, take decisions through the board, and receive persisted game state and history; room play also supports spectators, recovery/undo, and leaderboard results. The graph separates client workflows, shared game rules, and Convex identity, room, match, and history services. Relationship evidence is limited to the README and supplied excerpts/index references; unsampled subsystem links are omitted rather than inferred.
Main entry points: eclipseMatches.ts Solo matches · eclipseRooms.ts Multiplayer rooms · second-dawn-game Game workflows · engine.ts Command engine
Components 24
Game client
- Game workflows
src/second-dawn-game - Board and decisions
src/second-dawn-game/SecondDawnBoard.tsx - Session sync
src/second-dawn-session - Action drafts
src/second-dawn-game/actionDraftStorage.ts - Presentation settings
src/second-dawn-game/presentationSettings.ts
Rules and gameplay
- Rule options
shared/eclipse/gameRules.ts - Game setup
shared/eclipse/setup.ts - Faction catalog
shared/eclipse/catalog.ts - Game state
shared/eclipse/rulesState.ts - Command engine
shared/eclipse/engine.ts - Combat resolution
shared/eclipse/battleEngine.ts - AI planning
shared/eclipse/aiSearch.ts - History journal
shared/eclipse/history.ts
Convex services
- Solo matches
convex/eclipseMatches.ts - Multiplayer rooms
convex/eclipseRooms.ts - Persistent game data
convex/schema.ts - Scheduled upkeep
convex/eclipseUpkeepTimer.ts - Input validation
convex/eclipseValidators.ts
Identity and records
- Guest identity
convex/eclipseIdentity.ts - Public history
convex/eclipsePublicHistory.ts - History recovery
convex/eclipseHistoryRecovery.ts - Leaderboard
convex/eclipseLeaderboardStore.ts - Player records
convex/eclipsePlayerStore.ts
Other components
- Player
Connections 29
- Player → Game workflows: plays
README.md - Game workflows → Board and decisions: renders
src/second-dawn-game/actionDraftStorage.ts - Board and decisions → Action drafts: stores drafts
src/second-dawn-game/actionDraftStorage.ts - Game workflows → Session sync: syncs activity
README.md - Game workflows → Presentation settings: configures
src/second-dawn-game/sound/useGameSoundFeedback.ts - Rule options → Game setup: configures rules
- Game setup → Faction catalog: selects factions
- Solo matches → Rule options: validates options
convex/eclipseMatches.ts - Solo matches → Guest identity: checks guest
convex/eclipseMatches.ts - Multiplayer rooms → Guest identity: checks guest
convex/eclipseRooms.ts - Solo matches → Game setup: creates game
convex/eclipseMatches.ts - Solo matches → Command engine: applies command
convex/eclipseMatches.ts - Command engine → Combat resolution: resolves combat
shared/eclipse/engine.ts - Command engine → Game state: updates state
shared/eclipse/engine.ts - Solo matches → Persistent game data: persists snapshot
convex/eclipseMatches.ts - Multiplayer rooms → Persistent game data: persists room
- Solo matches → History journal: journals actions
convex/eclipseMatches.ts - Solo matches → Public history: reads history
convex/eclipseMatches.ts - Public history → History journal: formats entries
convex/eclipsePublicHistory.ts - Player → Multiplayer rooms: joins room
README.md - Multiplayer rooms → Solo matches: starts match
convex/eclipseRooms.ts - Solo matches → AI planning: plans AI turns
convex/eclipseMatches.ts - Solo matches → Scheduled upkeep: schedules upkeep
convex/eclipseMatches.ts - Solo matches → Leaderboard: syncs results
convex/eclipseMatches.ts - Multiplayer rooms → Leaderboard: syncs results
convex/eclipseRooms.ts - Solo matches → History recovery: recovers checkpoints
- Session sync → Solo matches: loads saved games
- Input validation → Faction catalog: validates selections
convex/eclipseValidators.ts - Player records → Guest identity: links player