magicciv/.project/objectives/p1-10-game-setup-ux.md
Natalie a466499fc9 feat(@projects/@magic-civilization): add credits and game setup screens
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-04-17 02:36:24 -07:00

2.9 KiB

id title priority status scope owner updated_at evidence
p1-10 Game setup UX — new-game dialog, difficulty, clan preview p1 done game1 shipwright 2026-04-17
src/game/engine/scenes/menus/game_setup.gd
src/game/engine/scenes/menus/game_setup.tscn
src/game/engine/tests/unit/test_game_setup.gd
public/games/age-of-dwarves/data/ai_personalities.json
public/games/age-of-dwarves/data/difficulty.json
~/Desktop/magic_civ_game_setup.png

Status — 2026-04-17 (shipwright)

All acceptance bullets now verifiable in repo:

  • Map type / size / difficulty / AI-opponents pickers visible — game_setup.tscn adds DifficultyOption and AiCountOption, controller populates from difficulty.json ai_difficulty array + range(1..7); screenshot magic_civ_game_setup.png shows all four dropdowns in one frame.
  • Per-AI clan flavor + 6 axes — _rebuild_clan_preview() seeds a PRNG from the world seed, picks from ai_personalities.json, and for each slot renders a PanelContainer with the clan name, description, and an HBoxContainer row of six axis cells (aggression, expansion, production, wealth, trade_willingness, grudge_persistence). Screenshot shows AI 1 Goldvein (3/5/5/9/9/4) and AI 2 Ironhold with full axis table.
  • Seed visible with randomize — six SpinBox digits + RandomButton retained from prior iteration; screenshot shows seed 000042 and "The Answer" easter egg below.
  • Submit transitions to loading screen — _on_start_pressed() still calls GameState.initialize_game(settings) and change_scene("res://engine/scenes/menus/loading_screen.tscn").
  • GUT coverage — test_game_setup.gd asserts default-submit produces a valid settings dict, every field round-trips through GameState.game_settings, difficulty dropdown matches difficulty.json, AI count offers 1..7, clan preview size matches slot count, and seed randomize mutates composed seed. 6/6 passing on apricot (GUT 9.6.0, Godot 4.6.2).

Summary

New-game configuration exists but doesn't show the AI clan personality the player will face. Players need to see at minimum: map type, map size, difficulty, number of AI opponents, and a preview of each AI opponent's clan flavor (Ironhold industrialist, Goldvein merchant, etc.) so the matchup feels intentional.

Acceptance

  • Game-setup screen shows selectable: map_type, map_size, difficulty, num_players.
  • For each AI opponent slot, the assigned clan is visible with a short flavor description + the six axis values (aggression/expansion/production/wealth/trade_willingness/grudge_persistence).
  • Seed is visible (with a "randomize" button) so players who want to replay can.
  • Submit button confirms + transitions to game scene.
  • GUT test covers: default-submit produces a valid game; every field round-trips through GameState.game_settings.

Non-goals

  • Pick-your-own-clan for the player (p0-02 documents Dwarves as the single player race).
  • Advanced scripting options / mods.