Actually: Add ranked gameplay UI — matchmaking + 3D game screen
- Game.gd autoload: stores session/state, handles match_found and
game.state_update.push, exposes helpers and all server action methods
- MatchmakingScreen: fetches decks, joins ranked queue, shows elapsed
timer, cancels cleanly; navigates to GameScreen on match_found push
- GameScreen (3D + 2D overlay):
- 3D board: 1×1×0.5 BoxMesh tiles colored by affinity (24 affinities),
StaticBody3D per tile for raycast picking
- Unit placeholders: sphere=Spirit, cylinder=ArchSpirit, box=Ruin,
team-colored (blue/red), exhaust dimming
- Camera: orbit (left-drag / one-finger), zoom (scroll / pinch),
pan (middle-drag / two-finger); isometric default ~40° pitch
- Hand: scrollable row of GameCardWidgets; hover → scale+rise anim;
click → select; selected card highlights valid play tiles green
- Unit selection: click unit → movement range (green), attack
range (red); click target tile → move; click enemy → attack
- Placement phase: valid ArchSpirit tiles highlighted automatically
- Draw phase: auto-draws after 0.3s delay
- Context popup: hold 0.5s on tile → tile coord/affinity + unit
stats + ability names
- Discard viewer: own + opponent, scrollable card list
- Game-over overlay: result, rank delta, return to main menu
- All game actions wired: play, move, attack, sacrifice, end turn,
draw, concede, ascend, transition, activate ability
- main_screen.gd: MatchBtn → MatchmakingScreen
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>
93 lines
2.6 KiB
Plaintext
93 lines
2.6 KiB
Plaintext
[gd_scene load_steps=2 format=3 uid="uid://matchmaking_screen"]
|
|
|
|
[ext_resource type="Script" path="res://scenes/matchmaking/matchmaking_screen.gd" id="1_mmscr"]
|
|
|
|
[node name="MatchmakingScreen" type="Control"]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
script = ExtResource("1_mmscr")
|
|
|
|
[node name="BG" type="ColorRect" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
color = Color(0.08, 0.08, 0.12, 1)
|
|
|
|
[node name="Center" type="CenterContainer" parent="."]
|
|
layout_mode = 1
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
|
|
[node name="VBox" type="VBoxContainer" parent="Center"]
|
|
custom_minimum_size = Vector2(480, 0)
|
|
theme_override_constants/separation = 24
|
|
|
|
[node name="Title" type="Label" parent="Center/VBox"]
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 28
|
|
text = "Ranked Match"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="StatusLabel" type="Label" parent="Center/VBox"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 18
|
|
text = "Loading…"
|
|
horizontal_alignment = 1
|
|
modulate = Color(0.8, 0.8, 0.85, 1)
|
|
|
|
[node name="SubLabel" type="Label" parent="Center/VBox"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 13
|
|
text = ""
|
|
horizontal_alignment = 1
|
|
modulate = Color(0.55, 0.55, 0.6, 1)
|
|
|
|
[node name="DeckPanel" type="VBoxContainer" parent="Center/VBox"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 8
|
|
|
|
[node name="ScrollContainer" type="ScrollContainer" parent="Center/VBox/DeckPanel"]
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(0, 240)
|
|
horizontal_scroll_mode = 0
|
|
|
|
[node name="DeckList" type="VBoxContainer" parent="Center/VBox/DeckPanel/ScrollContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_override_constants/separation = 4
|
|
|
|
[node name="SearchPanel" type="VBoxContainer" parent="Center/VBox"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 12
|
|
visible = false
|
|
|
|
[node name="Spinner" type="Label" parent="Center/VBox/SearchPanel"]
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 36
|
|
text = "⏳"
|
|
horizontal_alignment = 1
|
|
|
|
[node name="ElapsedLabel" type="Label" parent="Center/VBox/SearchPanel"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
theme_override_font_sizes/font_size = 14
|
|
text = "Searching… 00:00"
|
|
horizontal_alignment = 1
|
|
modulate = Color(0.6, 0.6, 0.7, 1)
|
|
|
|
[node name="CancelBtn" type="Button" parent="Center/VBox"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
custom_minimum_size = Vector2(0, 44)
|
|
theme_override_font_sizes/font_size = 15
|
|
text = "Cancel"
|