game updates

This commit is contained in:
2026-01-26 17:02:47 -05:00
parent c8228f200d
commit cbe55820e9
9 changed files with 133 additions and 18 deletions

View File

@@ -10,7 +10,8 @@
"Bash(ls:*)", "Bash(ls:*)",
"Bash(timeout 5 godot4:*)", "Bash(timeout 5 godot4:*)",
"Bash(curl:*)", "Bash(curl:*)",
"Bash(timeout 3 godot4:*)" "Bash(timeout 3 godot4:*)",
"Bash(git -C /home/ckoch/Documents/Development/FFCardGame status background_1*)"
] ]
} }
} }

View File

@@ -1,5 +1,6 @@
ea4bc82a6ad023ab7ee23ee620429895 ea4bc82a6ad023ab7ee23ee620429895
::res://::1769454340 ::res://::1769464020
background_1.png::CompressedTexture2D::259206091835802070::1769464008::1769464212::1::::<><>::
FF14_Playmat__12516.webp::CompressedTexture2D::1641665221299209414::1769277769::1769280957::1::::<><>:: FF14_Playmat__12516.webp::CompressedTexture2D::1641665221299209414::1769277769::1769280957::1::::<><>::
FF_mat_option_1.png::CompressedTexture2D::4359709237641823626::1769451897::1769453057::1::::<><>:: FF_mat_option_1.png::CompressedTexture2D::4359709237641823626::1769451897::1769453057::1::::<><>::
README.md::TextFile::-1::1769279531::0::1::::<><>:: README.md::TextFile::-1::1769279531::0::1::::<><>::
@@ -10,7 +11,8 @@ Screenshot 2026-01-24 at 12-53-03 Untitled-3 - fftcgrulesheet-en.pdf.png::Compre
1-005R_eg.jpg::CompressedTexture2D::9030396388734102056::1769279471::1769280956::1::::<><>:: 1-005R_eg.jpg::CompressedTexture2D::9030396388734102056::1769279471::1769280956::1::::<><>::
1-006H_eg.jpg::CompressedTexture2D::8795536954934893861::1769279471::1769280956::1::::<><>:: 1-006H_eg.jpg::CompressedTexture2D::8795536954934893861::1769279471::1769280956::1::::<><>::
1-007R_eg.jpg::CompressedTexture2D::6933100492479484556::1769279471::1769280956::1::::<><>:: 1-007R_eg.jpg::CompressedTexture2D::6933100492479484556::1769279471::1769280956::1::::<><>::
::res://assets/table/::1769280957 ::res://assets/table/::1769464097
background_1.png::CompressedTexture2D::102728058489724503::1769464097::1769464212::1::::<><>::
playmat.webp::CompressedTexture2D::3235866490631872101::1769279471::1769280957::1::::<><>:: playmat.webp::CompressedTexture2D::3235866490631872101::1769279471::1769280957::1::::<><>::
::res://assets/ui/::1769280956 ::res://assets/ui/::1769280956
icon.svg::CompressedTexture2D::2912283608529879130::1769280588::1769280956::1::::<><>:: icon.svg::CompressedTexture2D::2912283608529879130::1769280588::1769280956::1::::<><>::
@@ -19,16 +21,16 @@ cards.json::JSON::-1::1769309289::0::1::::<><>::
::res://docs/::1769279608 ::res://docs/::1769279608
CARD_FORMAT.md::TextFile::-1::1769279608::0::1::::<><>:: CARD_FORMAT.md::TextFile::-1::1769279608::0::1::::<><>::
DESIGN.md::TextFile::-1::1769279572::0::1::::<><>:: DESIGN.md::TextFile::-1::1769279572::0::1::::<><>::
::res://scenes/::1769454021 ::res://scenes/::1769461610
game_controller.tscn::PackedScene::3882700613993784342::1769285267::0::1::::<><>::res://scripts/GameController.gd game_controller.tscn::PackedScene::3882700613993784342::1769285267::0::1::::<><>::res://scripts/GameController.gd
main.tscn::PackedScene::5942992277112036945::1769454021::0::1::::<><>::res://scripts/Main.gd main.tscn::PackedScene::5942992277112036945::1769461610::0::1::::<><>::res://scripts/Main.gd
::res://scenes/card/::1769279430 ::res://scenes/card/::1769279430
::res://scenes/main/::1769279430 ::res://scenes/main/::1769279430
::res://scenes/table/::1769279430 ::res://scenes/table/::1769279430
::res://scenes/ui/::1769279430 ::res://scenes/ui/::1769279430
::res://scripts/::1769381390 ::res://scripts/::1769454504
GameController.gd::GDScript::-1::1769288668::0::1::::<>Node<>:: GameController.gd::GDScript::-1::1769288668::0::1::::<>Node<>::
Main.gd::GDScript::-1::1769381390::0::1::::<>Node3D<>:: Main.gd::GDScript::-1::1769454504::0::1::::<>Node3D<>::
::res://scripts/autoload/::1769308378 ::res://scripts/autoload/::1769308378
CardDatabase.gd::GDScript::-1::1769308329::0::1::::<>Node<>:: CardDatabase.gd::GDScript::-1::1769308329::0::1::::<>Node<>::
GameManager.gd::GDScript::-1::1769308378::0::1::::<>Node<>:: GameManager.gd::GDScript::-1::1769308378::0::1::::<>Node<>::
@@ -48,11 +50,11 @@ GameUI.gd::GDScript::-1::1769379370::0::1::::GameUI<>CanvasLayer<>::
HandDisplay.gd::GDScript::-1::1769381830::0::1::::HandDisplay<>Control<>:: HandDisplay.gd::GDScript::-1::1769381830::0::1::::HandDisplay<>Control<>::
MainMenu.gd::GDScript::-1::1769285226::0::1::::MainMenu<>CanvasLayer<>:: MainMenu.gd::GDScript::-1::1769285226::0::1::::MainMenu<>CanvasLayer<>::
PauseMenu.gd::GDScript::-1::1769287615::0::1::::PauseMenu<>CanvasLayer<>:: PauseMenu.gd::GDScript::-1::1769287615::0::1::::PauseMenu<>CanvasLayer<>::
::res://scripts/visual/::1769454229 ::res://scripts/visual/::1769464132
CardVisual.gd::GDScript::-1::1769454209::0::1::::CardVisual<>Node3D<>:: CardVisual.gd::GDScript::-1::1769460118::0::1::::CardVisual<>Node3D<>::
PlaymatRenderer.gd::GDScript::-1::1769452774::0::1::::PlaymatRenderer<>Node<>:: PlaymatRenderer.gd::GDScript::-1::1769452774::0::1::::PlaymatRenderer<>Node<>::
TableCamera.gd::GDScript::-1::1769283810::0::1::::TableCamera<>Camera3D<>:: TableCamera.gd::GDScript::-1::1769461608::0::1::::TableCamera<>Camera3D<>::
TableSetup.gd::GDScript::-1::1769452840::0::1::::TableSetup<>Node3D<>:: TableSetup.gd::GDScript::-1::1769464132::0::1::::TableSetup<>Node3D<>::
ZoneVisual.gd::GDScript::-1::1769454229::0::1::::ZoneVisual<>Node3D<>:: ZoneVisual.gd::GDScript::-1::1769454229::0::1::::ZoneVisual<>Node3D<>::
::res://source-cards/::1769308626 ::res://source-cards/::1769308626
1-001H.jpg::CompressedTexture2D::2056726104879484109::1769306016::1769308625::1::::<><>:: 1-001H.jpg::CompressedTexture2D::2056726104879484109::1769306016::1769308625::1::::<><>::

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bp06fa744dxf"
path="res://.godot/imported/background_1.png-0ab7dfcee8e9494362804558f2c8c81a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/table/background_1.png"
dest_files=["res://.godot/imported/background_1.png-0ab7dfcee8e9494362804558f2c8c81a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 KiB

BIN
background_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

34
background_1.png.import Normal file
View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dxtc67kl8jji"
path="res://.godot/imported/background_1.png-06e59ebf119a5f3cff615c9fcbb01714.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://background_1.png"
dest_files=["res://.godot/imported/background_1.png-06e59ebf119a5f3cff615c9fcbb01714.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -26,19 +26,24 @@ const MAT_MARGIN: float = 0.3 # Gap between mats and from table center
# Player's left = +X, Player's right = -X # Player's left = +X, Player's right = -X
const ZONE_POSITIONS = { const ZONE_POSITIONS = {
"damage": Vector3(7.0, 0.1, 1.5), # Front-left (player's left) "damage": Vector3(7.0, 0.1, 1.5), # Front-left (player's left)
"deck": Vector3(-7.0, 0.1, 1.5), # Front-right (player's right) "deck": Vector3(-7.0, 0.1, 4.0), # Back-right (player's right, behind backups)
"break": Vector3(-7.0, 0.1, 4.0), # Right side, behind deck "break": Vector3(-7.0, 0.1, 1.5), # Front-right (player's right, front row)
"forwards": Vector3(0.0, 0.1, 2.0), # Center, front row "forwards": Vector3(0.0, 0.1, 2.0), # Center, front row
"backups": Vector3(0.0, 0.1, 5.0), # Center, back row "backups": Vector3(0.0, 0.1, 5.0), # Center, back row
"hand": Vector3(0.0, 0.5, 7.5) # Not used on table (2D overlay) "hand": Vector3(0.0, 0.5, 7.5) # Not used on table (2D overlay)
} }
# Background texture path
const BACKGROUND_TEXTURE_PATH: String = "res://assets/table/background_1.png"
# Components # Components
var table_mesh: MeshInstance3D var table_mesh: MeshInstance3D
var background_mesh: MeshInstance3D
var player_mat_meshes: Array[MeshInstance3D] = [null, null] var player_mat_meshes: Array[MeshInstance3D] = [null, null]
var camera: TableCamera var camera: TableCamera
func _ready() -> void: func _ready() -> void:
_create_background()
_create_table_base() _create_table_base()
_create_camera() _create_camera()
_create_lighting() _create_lighting()
@@ -46,8 +51,39 @@ func _ready() -> void:
_create_deck_indicators() _create_deck_indicators()
_generate_mats() _generate_mats()
func _load_background_texture() -> Texture2D:
var texture = load(BACKGROUND_TEXTURE_PATH)
if texture:
return texture
push_warning("Could not load background texture: " + BACKGROUND_TEXTURE_PATH)
return null
func _create_background() -> void:
# Large background plane that fills the view behind the table,
# similar to the wood desk surface in Pokemon TCG Online.
background_mesh = MeshInstance3D.new()
add_child(background_mesh)
var plane = PlaneMesh.new()
plane.size = Vector2(80.0, 80.0) # Large enough to fill camera view
background_mesh.mesh = plane
var mat = StandardMaterial3D.new()
var bg_texture = _load_background_texture()
if bg_texture:
mat.albedo_texture = bg_texture
# Tile the texture so the wood grain repeats naturally
mat.uv1_scale = Vector3(3.0, 3.0, 1.0)
else:
mat.albedo_color = Color(0.25, 0.15, 0.08) # Fallback wood-ish brown
mat.roughness = 0.9
background_mesh.material_override = mat
# Sit slightly below the table surface to avoid z-fighting
background_mesh.position = Vector3(0, -0.05, 0)
func _create_table_base() -> void: func _create_table_base() -> void:
# Base table surface (dark, slightly larger than mats) # Base table surface with wood texture, slightly raised above background
table_mesh = MeshInstance3D.new() table_mesh = MeshInstance3D.new()
add_child(table_mesh) add_child(table_mesh)
@@ -56,8 +92,16 @@ func _create_table_base() -> void:
table_mesh.mesh = plane table_mesh.mesh = plane
var mat = StandardMaterial3D.new() var mat = StandardMaterial3D.new()
mat.albedo_color = Color(0.08, 0.10, 0.08) # Very dark green base var bg_texture = _load_background_texture()
if bg_texture:
mat.albedo_texture = bg_texture
# Slightly darker tint so the table surface is distinct from the background
mat.albedo_color = Color(0.7, 0.65, 0.6)
else:
mat.albedo_color = Color(0.15, 0.1, 0.06)
mat.roughness = 0.85
table_mesh.material_override = mat table_mesh.material_override = mat
table_mesh.position.y = 0.0
func _create_player_mat(player_idx: int, texture: ImageTexture) -> void: func _create_player_mat(player_idx: int, texture: ImageTexture) -> void:
var mat_mesh = MeshInstance3D.new() var mat_mesh = MeshInstance3D.new()
@@ -110,10 +154,10 @@ func _create_lighting() -> void:
add_child(env) add_child(env)
var environment = Environment.new() var environment = Environment.new()
environment.ambient_light_source = Environment.AMBIENT_SOURCE_COLOR environment.ambient_light_source = Environment.AMBIENT_SOURCE_COLOR
environment.ambient_light_color = Color(0.3, 0.3, 0.35) environment.ambient_light_color = Color(0.35, 0.3, 0.25)
environment.ambient_light_energy = 0.5 environment.ambient_light_energy = 0.6
environment.background_mode = Environment.BG_COLOR environment.background_mode = Environment.BG_COLOR
environment.background_color = Color(0.1, 0.1, 0.15) environment.background_color = Color(0.12, 0.08, 0.04) # Dark brown to blend with wood
env.environment = environment env.environment = environment
func _create_zones() -> void: func _create_zones() -> void: