This commit is contained in:
francis 2026-03-06 20:12:38 +01:00
commit 3ea7bfd5dc
122 changed files with 568704 additions and 0 deletions

14
Scene/Pieces/bishop.tscn Executable file
View file

@ -0,0 +1,14 @@
[gd_scene format=3 uid="uid://dsc2tova7rvx7"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="2_bmony"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="2_r76xr"]
[ext_resource type="ArrayMesh" uid="uid://c67nw3hvqrkev" path="res://Models/bishop.obj" id="3_r76xr"]
[node name="Bishop" type="Node3D" unique_id=1605941411]
script = ExtResource("2_bmony")
color = ExtResource("2_r76xr")
[node name="mesh" type="MeshInstance3D" parent="." unique_id=830382749]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
material_override = ExtResource("2_r76xr")
mesh = ExtResource("3_r76xr")

13
Scene/Pieces/king.tscn Executable file
View file

@ -0,0 +1,13 @@
[gd_scene format=3 uid="uid://qjo2ij73xlok"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="1_ycl1t"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="2_5ys0t"]
[ext_resource type="ArrayMesh" uid="uid://bxtpbpxglphok" path="res://Models/king.obj" id="3_2gso2"]
[node name="King" type="Node3D" unique_id=1224931075]
script = ExtResource("1_ycl1t")
[node name="mesh" type="MeshInstance3D" parent="." unique_id=455294172]
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0, 0, 0)
material_override = ExtResource("2_5ys0t")
mesh = ExtResource("3_2gso2")

12
Scene/Pieces/knight.tscn Executable file
View file

@ -0,0 +1,12 @@
[gd_scene format=3 uid="uid://di3qg1qnmy0p2"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="1_qbtkq"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="2_cka4e"]
[ext_resource type="ArrayMesh" uid="uid://hnlwpehvi3ok" path="res://Models/kight.obj" id="3_0w1en"]
[node name="Knight" type="Node3D" unique_id=1333208927]
script = ExtResource("1_qbtkq")
[node name="mesh" type="MeshInstance3D" parent="." unique_id=515809374]
material_override = ExtResource("2_cka4e")
mesh = ExtResource("3_0w1en")

10
Scene/Pieces/pawn.tscn Executable file
View file

@ -0,0 +1,10 @@
[gd_scene format=3 uid="uid://dkl8itq74sajx"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="1_nci4k"]
[ext_resource type="ArrayMesh" uid="uid://dn2vs5onakx6i" path="res://Models/pawn.obj" id="3_un5ic"]
[node name="Pawn" type="Node3D" unique_id=124611093]
script = ExtResource("1_nci4k")
[node name="mesh" type="MeshInstance3D" parent="." unique_id=1910024001]
mesh = ExtResource("3_un5ic")

77
Scene/Pieces/piece.gd Executable file
View file

@ -0,0 +1,77 @@
@tool
class_name Piece
extends Node3D
@export var piece_res : PieceRes
var is_moving : bool = false
var target : Vector2
var start_pos :Vector3
var start_coord: Vector2i
var mesh_instance_3d: MeshInstance3D
var possible_movements: Array[Vector2i]
#@export var color : StandardMaterial3D = preload("uid://brrbuo0i0e5bh") as StandardMaterial3D:
#set(material):
#color = material
#if Engine.is_editor_hint():
#mesh.material_override = color
#get:
#return color
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
for rule in piece_res.rules:
rule.ready(self)
print(piece_res.material)
var mesh_instance = MeshInstance3D.new()
mesh_instance.mesh = piece_res.mesh
mesh_instance.mesh.surface_set_material(0,piece_res.material)
add_child(mesh_instance)
mesh_instance_3d = mesh_instance
start_coord = to_coord()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if is_moving:
#move to target
var x_diff = 0
var z_diff = 0
if target.x < start_pos.x:
x_diff = -(start_pos.x - target.x)
else:
x_diff = (target.x - start_pos.x)
if target.y < start_pos.z:
z_diff = -(start_pos.z - target.y)
else:
z_diff = (target.y - start_pos.z)
global_translate(Vector3(x_diff, 0, z_diff).normalized() * delta * piece_res.movement_speed)
if abs(position.x - target.x) < 0.1:
position.x = target.x
if abs(target.y - position.z) < 0.1:
position.z = target.y
if position.z == target.y and position.x == target.x:
is_moving = false
pass
pass
func move_to(new_target: Vector2):
for moverule_script in piece_res.rules:
moverule_script.before_move(self)
#if piece_res.piece_type == PieceRes.PieceType.PAWN:
#possible_movements = [Vector2i(0,1)]
target = new_target * 2
start_pos = position
is_moving = true
pass
func to_coord() -> Vector2i:
return Vector2i(position.x / 2, position.z / 2)
func die():
queue_free()
pass

1
Scene/Pieces/piece.gd.uid Executable file
View file

@ -0,0 +1 @@
uid://c11aaiot3b336

6
Scene/Pieces/piece.tscn Executable file
View file

@ -0,0 +1,6 @@
[gd_scene format=3 uid="uid://ci6k70kme7egj"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="1_y1oan"]
[node name="Piece" type="Node3D" unique_id=410020425]
script = ExtResource("1_y1oan")

12
Scene/Pieces/queen.tscn Executable file
View file

@ -0,0 +1,12 @@
[gd_scene format=3 uid="uid://b5o0e01wkibu7"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="1_gmwly"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="2_uipd2"]
[ext_resource type="ArrayMesh" uid="uid://cbr1tmaelnbwv" path="res://Models/queen.obj" id="3_18v2x"]
[node name="Queen" type="Node3D" unique_id=1009873024]
script = ExtResource("1_gmwly")
color = ExtResource("2_uipd2")
[node name="mesh" type="MeshInstance3D" parent="." unique_id=1534534969]
mesh = ExtResource("3_18v2x")

12
Scene/Pieces/rook.tscn Executable file
View file

@ -0,0 +1,12 @@
[gd_scene format=3 uid="uid://dxh3jmv61jfp0"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="1_4uxm1"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="2_kqueb"]
[ext_resource type="ArrayMesh" uid="uid://bpi163efm64p2" path="res://Models/rook.obj" id="3_bs0i1"]
[node name="Rook" type="Node3D" unique_id=699678101]
script = ExtResource("1_4uxm1")
color = ExtResource("2_kqueb")
[node name="mesh" type="MeshInstance3D" parent="." unique_id=2043445377]
mesh = ExtResource("3_bs0i1")

7
Scene/attack_highlighter.tscn Executable file
View file

@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://c772javfi1vol"]
[ext_resource type="PackedScene" uid="uid://h43qfi8nk4uv" path="res://Models/tile_border_attack.blend" id="1_854c7"]
[node name="attack_highlighter" type="Node3D" unique_id=2043934970 groups=["Highlighter"]]
[node name="tile_border_attack" parent="." unique_id=1588961792 groups=["Highlighter"] instance=ExtResource("1_854c7")]

129
Scene/board.gd Executable file
View file

@ -0,0 +1,129 @@
extends Node3D
@export var multiplier = 20
const TILE : PackedScene = preload("uid://btmuoxdocev5r")
const TILE_DARK = preload("uid://lc84reoxexjp")
const TILE_LIGHT = preload("uid://drsd4o5kptjhm")
var board_size = Vector2i(8, 8)
var all_tiles = []
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
var tile_array2 = generate_tile_array(board_size, 2)
generate_board_from_array(tile_array2)
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func generate_board_from_array(tile_array):
# Board spacing
var TILE_SPACING := 2.0
for data in tile_array:
# Read coord + height from your array entries
var coord = data.get("coord", Vector2(0, 0))
var y_offset = data.get("tile_y_offset")
# Support Vector2 or Vector2i
var x := int(coord.x)
var z := int(coord.y)
all_tiles.append(Vector2i(x, z))
if TILE.can_instantiate():
var tile := TILE.instantiate() as Tile
var mesh := tile.get_child(0) as MeshInstance3D
# Checker materials (same logic you had)
if x % 2 == 0:
if z % 2 == 0:
mesh.set_surface_override_material(0, TILE_DARK)
else:
mesh.set_surface_override_material(0, TILE_LIGHT)
else:
if z % 2 == 0:
mesh.set_surface_override_material(0, TILE_LIGHT)
else:
mesh.set_surface_override_material(0, TILE_DARK)
tile.position = Vector3(x * TILE_SPACING, y_offset, z * TILE_SPACING)
tile.name = "fffx%dz%d" % [x, z]
add_child(tile)
# Your coord setter (assuming Tile expects Vector2i)
tile.set_coord(Vector2i(x, z))
# Connect signals after adding
for child in get_children():
child.is_clicked.connect(_on_tile_clicked)
#generate simple 8x8 board
func generate_board():
for x in range(8):
for z in range(8):
if TILE.can_instantiate():
var tile = TILE.instantiate() as Tile
var mesh = tile.get_child(0) as MeshInstance3D
mesh.set_surface_override_material(0, TILE_DARK)
tile.translate(Vector3(x*2, 0, z*2))
tile.name = "fffx{0}z{1}".format([x,z])
add_child(tile)
#tile.is_clicked.connect(board.on_tile_clicked)
#board.
#tile.connect("is_clicked", board, "on_tile_clicked")
#tile.owner = get_scene()
tile.set_coord(Vector2i(x,z))
if x % 2 == 0:
if z % 2 == 0:
mesh.set_surface_override_material(0, TILE_DARK)
else:
mesh.set_surface_override_material(0, TILE_LIGHT)
else:
if z % 2 == 0:
mesh.set_surface_override_material(0, TILE_LIGHT)
else:
mesh.set_surface_override_material(0, TILE_DARK)
#mesh.owner = get_scene()
for child in get_children():
child.is_clicked.connect(_on_tile_clicked)
pass # Replace with function body.
const FAST_NOISE_LITE = preload("uid://ba38fsam4t5xj")
func generate_tile_array(grid_dimensions: Vector2, smoothing_iterations: int = 4) -> Array:
var rng: RandomNumberGenerator = RandomNumberGenerator.new()
rng.randomize()
var tiles: Array = []
var grid_width: int = int(grid_dimensions.x)
var grid_height: int = int(grid_dimensions.y)
# elevation_map[z][x] -> float
var elevation_map: Array = []
# ----------------------------
# STEP 3: build your tile array
# ----------------------------
for x: int in range(grid_width):
for z: int in range(grid_height):
var final_elevation: float = FAST_NOISE_LITE.get_noise_2d(x,z) * multiplier
tiles.append({
"coord": Vector2(x, z),
"tile_height": 1,
"tile_y_offset": 0 #final_elevation
})
return tiles
func _on_tile_clicked(coord) -> void:
print("Tile Coord:", coord);
pass # Replace with function body.

1
Scene/board.gd.uid Executable file
View file

@ -0,0 +1 @@
uid://5tat6gxpjuwq

6
Scene/board.tscn Executable file
View file

@ -0,0 +1,6 @@
[gd_scene format=3 uid="uid://2cqjdxpi6ave"]
[ext_resource type="Script" uid="uid://5tat6gxpjuwq" path="res://Scene/board.gd" id="1_mo6ic"]
[node name="Board" type="Node3D" unique_id=934988573]
script = ExtResource("1_mo6ic")

78
Scene/game.gd Executable file
View file

@ -0,0 +1,78 @@
extends Node3D
class_name Game
const HIGHLIGHT = preload("uid://d3ognkvbqsh4u")
var selected_piece : Piece
const MOVEMENT_HIGHLIGHTER = preload("uid://cnbgugaxpa3g5")
const ATTACK_HIGHLIGHTER = preload("uid://c772javfi1vol")
var possible_positions : Array[Vector2i] = []
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#$SuperPawn2.move_to(Vector2(8,8))
#$SuperPawn.move_to(Vector2(0,0))
for child in get_node("Board").get_children():
child.is_clicked.connect(movement)
pass # Replace with function body.
func movement(coord:Vector2i):
if selected_piece:
if coord in possible_positions:
selected_piece.move_to(coord)
deselect()
else:
select_piece(coord)
func get_piece_at(coord) -> Piece:
for piece in get_node("Pieces").get_children():
var piece_coord = Vector2i(piece.position.x / 2, piece.position.z / 2)
if piece_coord == coord:
return piece
return null
func select_piece(coord:Vector2i):
var pos = Vector3(coord.x, 0, coord.y)
for child in $Pieces.get_children():
if child.is_in_group("Pieces"):
if child.position / 2 == pos:
var piece : Piece = child
selected_piece = piece
piece.mesh_instance_3d.material_overlay = HIGHLIGHT
piece.possible_movements = []
for scr in piece.piece_res.rules:
scr.select(piece,self)
#piece.piece_res.moverules.selectRule(piece, self)
for move in piece.possible_movements:
var highlighter : Node3D
var possible_pos = Vector2i(piece.position.x / 2 + move.x, piece.position.z / 2 + move.y)
var other_piece = get_piece_at(possible_pos)
if possible_pos not in get_node("Board").all_tiles:
continue
if other_piece and other_piece.is_in_group("Enemy"):
highlighter = ATTACK_HIGHLIGHTER.instantiate()
else:
highlighter = MOVEMENT_HIGHLIGHTER.instantiate()
highlighter.position.x = possible_pos.x * 2
highlighter.position.z = possible_pos.y * 2
possible_positions.append(possible_pos)
add_child(highlighter)
break
else:
deselect()
pass
func deselect():
if selected_piece:
selected_piece.mesh_instance_3d.material_overlay = null
selected_piece = null
possible_positions = []
for child in get_children():
if child.is_in_group("Highlighter"):
child.queue_free()
func _process(delta: float) -> void:
pass

1
Scene/game.gd.uid Executable file
View file

@ -0,0 +1 @@
uid://40ykqd27yux

99
Scene/game.tscn Executable file
View file

@ -0,0 +1,99 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="Script" uid="uid://40ykqd27yux" path="res://Scene/game.gd" id="1_8f6ah"]
[ext_resource type="Resource" uid="uid://cbwd1rtruemqj" path="res://Resources/Pieces/pawn.tres" id="5_sagxc"]
[ext_resource type="Resource" uid="uid://cah56vr1263v1" path="res://Resources/Pieces/knight.tres" id="6_h8jt7"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="Resource" uid="uid://drhygbtu4bbiq" path="res://Resources/Pieces/bishop.tres" id="7_h8jt7"]
[ext_resource type="PackedScene" uid="uid://ci6k70kme7egj" path="res://Scene/Pieces/piece.tscn" id="7_sagxc"]
[ext_resource type="Resource" uid="uid://dpec03625gclm" path="res://Resources/Pieces/queen.tres" id="8_8f6ah"]
[ext_resource type="Resource" uid="uid://cso00cln3awgu" path="res://Resources/Pieces/rook.tres" id="8_sagxc"]
[ext_resource type="Script" uid="uid://c11aaiot3b336" path="res://Scene/Pieces/piece.gd" id="9_8f6ah"]
[ext_resource type="Resource" uid="uid://ekgey785opq5" path="res://Resources/Pieces/king.tres" id="10_twwsd"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
script = ExtResource("1_8f6ah")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.7422784e-08, 2.0779702e-15, 1.0542077e-08, 0.1205873, 0.9927028, 8.678483e-08, 0.9927028, -0.1205873, 7, 15.866533, 5.295808)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Pieces" type="Node3D" parent="." unique_id=393239626]
[node name="Queen" parent="Pieces" unique_id=410020425 groups=["Pieces", "PlayerPieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 4)
piece_res = ExtResource("8_8f6ah")
[node name="Pawn5" parent="Pieces" unique_id=214368826 groups=["Pieces", "PlayerPieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 2)
piece_res = ExtResource("5_sagxc")
[node name="Pawn6" parent="Pieces" unique_id=353236800 groups=["Pieces", "PlayerPieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 4, 0, 2)
piece_res = ExtResource("5_sagxc")
[node name="Pawn7" parent="Pieces" unique_id=667979117 groups=["Pieces", "PlayerPieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 2)
piece_res = ExtResource("5_sagxc")
[node name="Pawn8" parent="Pieces" unique_id=279147143 groups=["Pieces", "PlayerPieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 8)
piece_res = ExtResource("5_sagxc")
[node name="Knight" parent="Pieces" unique_id=828740381 groups=["Enemy", "Pieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 10)
piece_res = ExtResource("6_h8jt7")
[node name="Knight2" parent="Pieces" unique_id=905424274 groups=["Enemy", "Pieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 0, 8)
piece_res = ExtResource("6_h8jt7")
[node name="Rook" parent="Pieces" unique_id=457900680 groups=["Pieces", "PlayerPieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 0, 8)
piece_res = ExtResource("8_sagxc")
[node name="Bishop" parent="Pieces" unique_id=839312457 groups=["Pieces", "PlayerPieces"] instance=ExtResource("7_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 8)
piece_res = ExtResource("7_h8jt7")
[node name="King" type="Node3D" parent="Pieces" unique_id=345844088 groups=["Pieces", "PlayerPieces"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 2)
script = ExtResource("9_8f6ah")
piece_res = ExtResource("10_twwsd")
metadata/_custom_type_script = "uid://c11aaiot3b336"

87
Scene/game.tscn11294022872.tmp Executable file
View file

@ -0,0 +1,87 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://qjo2ij73xlok" path="res://Scene/Pieces/king.tscn" id="2_thj8p"]
[ext_resource type="PackedScene" uid="uid://dxh3jmv61jfp0" path="res://Scene/Pieces/rook.tscn" id="4_sagxc"]
[ext_resource type="PackedScene" uid="uid://di3qg1qnmy0p2" path="res://Scene/Pieces/knight.tscn" id="5_8f6ah"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="PackedScene" uid="uid://dkl8itq74sajx" path="res://Scene/Pieces/pawn.tscn" id="6_twwsd"]
[ext_resource type="PackedScene" uid="uid://btmuoxdocev5r" path="res://Scene/tile.tscn" id="7_h8jt7"]
[ext_resource type="PackedScene" uid="uid://ci6k70kme7egj" path="res://Scene/Pieces/piece.tscn" id="7_sagxc"]
[ext_resource type="Resource" uid="uid://cbwd1rtruemqj" path="res://pawn.tres" id="8_sagxc"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="9_8f6ah"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.7422784e-08, 2.0779702e-15, 1.0542077e-08, 0.1205873, 0.9927028, 8.678483e-08, 0.9927028, -0.1205873, 7, 15.866533, 5.295808)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="King" parent="." unique_id=1224931075 instance=ExtResource("2_thj8p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14)
[node name="King2" parent="." unique_id=816589942 instance=ExtResource("2_thj8p")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 0)
[node name="Rook" parent="." unique_id=699678101 instance=ExtResource("4_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 14, 0, 0)
[node name="Rook2" parent="." unique_id=1019284846 instance=ExtResource("4_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
[node name="Knight" parent="." unique_id=1333208927 instance=ExtResource("5_8f6ah")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 14)
[node name="Knight2" parent="." unique_id=1259419598 instance=ExtResource("5_8f6ah")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10, 0, 0)
[node name="Pawn" parent="." unique_id=124611093 instance=ExtResource("6_twwsd")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 0)
[node name="Pawn2" parent="." unique_id=242659952 instance=ExtResource("6_twwsd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 14)
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Tile" parent="." unique_id=1553616659 instance=ExtResource("7_h8jt7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.413641, 3.9149218, 6.559334)
coordinate = Vector2i(67, -55)
[node name="SuperPawn" parent="." unique_id=410020425 instance=ExtResource("7_sagxc")]
config = ExtResource("8_sagxc")
material = ExtResource("9_8f6ah")
[connection signal="is_clicked" from="Tile" to="Board" method="_on_tile_clicked"]

16
Scene/game.tscn11850336550.tmp Executable file
View file

@ -0,0 +1,16 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://he1ffs8ue7h7" path="res://Scene/Board.tscn" id="1_mhtsl"]
[ext_resource type="PackedScene" uid="uid://dsc2tova7rvx7" path="res://Scene/Bishop.tscn" id="2_w51g1"]
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="Board" parent="." unique_id=1939860466 instance=ExtResource("1_mhtsl")]
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(1, 0, 0, 0, 1.1924881e-08, 1, 0, -1, 1.1924881e-08, 0, 32.621185, 0)
[node name="Bishop" parent="." unique_id=1605941411 instance=ExtResource("2_w51g1")]
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)

16
Scene/game.tscn11859741583.tmp Executable file
View file

@ -0,0 +1,16 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://he1ffs8ue7h7" path="res://Scene/Board.tscn" id="1_mhtsl"]
[ext_resource type="PackedScene" uid="uid://dsc2tova7rvx7" path="res://Scene/Bishop.tscn" id="2_w51g1"]
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="Board" parent="." unique_id=1939860466 instance=ExtResource("1_mhtsl")]
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(1, 0, 0, 0, 1.1924881e-08, 1, 0, -1, 1.1924881e-08, 0, 32.621185, 0)
[node name="Bishop" parent="." unique_id=1605941411 instance=ExtResource("2_w51g1")]
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)

16
Scene/game.tscn11871840197.tmp Executable file
View file

@ -0,0 +1,16 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://he1ffs8ue7h7" path="res://Scene/Board.tscn" id="1_mhtsl"]
[ext_resource type="PackedScene" uid="uid://dsc2tova7rvx7" path="res://Scene/Bishop.tscn" id="2_w51g1"]
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="Board" parent="." unique_id=1939860466 instance=ExtResource("1_mhtsl")]
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(1, 0, 0, 0, 1.1924881e-08, 1, 0, -1, 1.1924881e-08, 0, 32.621185, 0)
[node name="Bishop" parent="." unique_id=1605941411 instance=ExtResource("2_w51g1")]
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)

85
Scene/game.tscn1216472258.tmp Executable file
View file

@ -0,0 +1,85 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://qjo2ij73xlok" path="res://Scene/Pieces/king.tscn" id="2_thj8p"]
[ext_resource type="Material" uid="uid://bekkxcgjt3hct" path="res://Materials/piece_red.tres" id="3_h8jt7"]
[ext_resource type="PackedScene" uid="uid://dxh3jmv61jfp0" path="res://Scene/Pieces/rook.tscn" id="4_sagxc"]
[ext_resource type="PackedScene" uid="uid://di3qg1qnmy0p2" path="res://Scene/Pieces/knight.tscn" id="5_8f6ah"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="PackedScene" uid="uid://dkl8itq74sajx" path="res://Scene/Pieces/pawn.tscn" id="6_twwsd"]
[ext_resource type="PackedScene" uid="uid://btmuoxdocev5r" path="res://Scene/tile.tscn" id="7_h8jt7"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.742279e-08, 7.345745e-15, 5.2522132e-08, 0.60078305, 0.79941213, 6.988683e-08, 0.79941213, -0.60078305, 7, 12.866533, -3.7041922)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="King" parent="." unique_id=1224931075 instance=ExtResource("2_thj8p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14)
color = ExtResource("3_h8jt7")
[node name="King2" parent="." unique_id=816589942 instance=ExtResource("2_thj8p")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 0)
[node name="Rook" parent="." unique_id=699678101 instance=ExtResource("4_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 14, 0, 0)
[node name="Rook2" parent="." unique_id=1019284846 instance=ExtResource("4_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight" parent="." unique_id=1333208927 instance=ExtResource("5_8f6ah")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight2" parent="." unique_id=1259419598 instance=ExtResource("5_8f6ah")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10, 0, 0)
[node name="Pawn" parent="." unique_id=124611093 instance=ExtResource("6_twwsd")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 0)
[node name="Pawn2" parent="." unique_id=242659952 instance=ExtResource("6_twwsd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Tile" parent="." unique_id=1553616659 instance=ExtResource("7_h8jt7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.413641, 3.9149218, 6.559334)
coordinate = Vector2i(67, -55)
[connection signal="is_clicked" from="Tile" to="Board" method="_on_tile_clicked"]

85
Scene/game.tscn1222505083.tmp Executable file
View file

@ -0,0 +1,85 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://qjo2ij73xlok" path="res://Scene/Pieces/king.tscn" id="2_thj8p"]
[ext_resource type="Material" uid="uid://bekkxcgjt3hct" path="res://Materials/piece_red.tres" id="3_h8jt7"]
[ext_resource type="PackedScene" uid="uid://dxh3jmv61jfp0" path="res://Scene/Pieces/rook.tscn" id="4_sagxc"]
[ext_resource type="PackedScene" uid="uid://di3qg1qnmy0p2" path="res://Scene/Pieces/knight.tscn" id="5_8f6ah"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="PackedScene" uid="uid://dkl8itq74sajx" path="res://Scene/Pieces/pawn.tscn" id="6_twwsd"]
[ext_resource type="PackedScene" uid="uid://btmuoxdocev5r" path="res://Scene/tile.tscn" id="7_h8jt7"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.742279e-08, 7.345745e-15, 5.2522132e-08, 0.60078305, 0.79941213, 6.988683e-08, 0.79941213, -0.60078305, 7, 12.866533, -3.7041922)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="King" parent="." unique_id=1224931075 instance=ExtResource("2_thj8p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14)
color = ExtResource("3_h8jt7")
[node name="King2" parent="." unique_id=816589942 instance=ExtResource("2_thj8p")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 0)
[node name="Rook" parent="." unique_id=699678101 instance=ExtResource("4_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 14, 0, 0)
[node name="Rook2" parent="." unique_id=1019284846 instance=ExtResource("4_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight" parent="." unique_id=1333208927 instance=ExtResource("5_8f6ah")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight2" parent="." unique_id=1259419598 instance=ExtResource("5_8f6ah")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10, 0, 0)
[node name="Pawn" parent="." unique_id=124611093 instance=ExtResource("6_twwsd")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 0)
[node name="Pawn2" parent="." unique_id=242659952 instance=ExtResource("6_twwsd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Tile" parent="." unique_id=1553616659 instance=ExtResource("7_h8jt7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.413641, 3.9149218, 6.559334)
coordinate = Vector2i(67, -55)
[connection signal="is_clicked" from="Tile" to="Board" method="_on_tile_clicked"]

38
Scene/game.tscn13223112612.tmp Executable file
View file

@ -0,0 +1,38 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://he1ffs8ue7h7" path="res://Scene/Board.tscn" id="1_mhtsl"]
[ext_resource type="PackedScene" uid="uid://dsc2tova7rvx7" path="res://Scene/Bishop.tscn" id="2_w51g1"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
glow_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Board" parent="." unique_id=1939860466 instance=ExtResource("1_mhtsl")]
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(1, 0, 0, 0, 1.1924881e-08, 1, 0, -1, 1.1924881e-08, 0, 32.621185, 0)
[node name="Bishop" parent="." unique_id=1605941411 instance=ExtResource("2_w51g1")]
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)

85
Scene/game.tscn1461990308.tmp Executable file
View file

@ -0,0 +1,85 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://qjo2ij73xlok" path="res://Scene/Pieces/king.tscn" id="2_thj8p"]
[ext_resource type="Material" uid="uid://bekkxcgjt3hct" path="res://Materials/piece_red.tres" id="3_h8jt7"]
[ext_resource type="PackedScene" uid="uid://dxh3jmv61jfp0" path="res://Scene/Pieces/rook.tscn" id="4_sagxc"]
[ext_resource type="PackedScene" uid="uid://di3qg1qnmy0p2" path="res://Scene/Pieces/knight.tscn" id="5_8f6ah"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="PackedScene" uid="uid://dkl8itq74sajx" path="res://Scene/Pieces/pawn.tscn" id="6_twwsd"]
[ext_resource type="PackedScene" uid="uid://btmuoxdocev5r" path="res://Scene/tile.tscn" id="7_h8jt7"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.742279e-08, 7.345745e-15, 5.2522132e-08, 0.60078305, 0.79941213, 6.988683e-08, 0.79941213, -0.60078305, 7, 12.866533, -3.7041922)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="King" parent="." unique_id=1224931075 instance=ExtResource("2_thj8p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14)
color = ExtResource("3_h8jt7")
[node name="King2" parent="." unique_id=816589942 instance=ExtResource("2_thj8p")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 0)
[node name="Rook" parent="." unique_id=699678101 instance=ExtResource("4_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 14, 0, 0)
[node name="Rook2" parent="." unique_id=1019284846 instance=ExtResource("4_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight" parent="." unique_id=1333208927 instance=ExtResource("5_8f6ah")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight2" parent="." unique_id=1259419598 instance=ExtResource("5_8f6ah")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10, 0, 0)
[node name="Pawn" parent="." unique_id=124611093 instance=ExtResource("6_twwsd")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 0)
[node name="Pawn2" parent="." unique_id=242659952 instance=ExtResource("6_twwsd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Tile" parent="." unique_id=1553616659 instance=ExtResource("7_h8jt7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.413641, 3.9149218, 6.559334)
coordinate = Vector2i(67, -55)
[connection signal="is_clicked" from="Tile" to="Board" method="_on_tile_clicked"]

85
Scene/game.tscn3555266078.tmp Executable file
View file

@ -0,0 +1,85 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://qjo2ij73xlok" path="res://Scene/Pieces/king.tscn" id="2_thj8p"]
[ext_resource type="Material" uid="uid://bekkxcgjt3hct" path="res://Materials/piece_red.tres" id="3_h8jt7"]
[ext_resource type="PackedScene" uid="uid://dxh3jmv61jfp0" path="res://Scene/Pieces/rook.tscn" id="4_sagxc"]
[ext_resource type="PackedScene" uid="uid://di3qg1qnmy0p2" path="res://Scene/Pieces/knight.tscn" id="5_8f6ah"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="PackedScene" uid="uid://dkl8itq74sajx" path="res://Scene/Pieces/pawn.tscn" id="6_twwsd"]
[ext_resource type="PackedScene" uid="uid://btmuoxdocev5r" path="res://Scene/tile.tscn" id="7_h8jt7"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.7422784e-08, 2.0779702e-15, 1.0542077e-08, 0.1205873, 0.9927028, 8.678483e-08, 0.9927028, -0.1205873, 7, 15.866533, 5.295808)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="King" parent="." unique_id=1224931075 instance=ExtResource("2_thj8p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14)
color = ExtResource("3_h8jt7")
[node name="King2" parent="." unique_id=816589942 instance=ExtResource("2_thj8p")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 0)
[node name="Rook" parent="." unique_id=699678101 instance=ExtResource("4_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 14, 0, 0)
[node name="Rook2" parent="." unique_id=1019284846 instance=ExtResource("4_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight" parent="." unique_id=1333208927 instance=ExtResource("5_8f6ah")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Knight2" parent="." unique_id=1259419598 instance=ExtResource("5_8f6ah")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10, 0, 0)
[node name="Pawn" parent="." unique_id=124611093 instance=ExtResource("6_twwsd")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 0)
[node name="Pawn2" parent="." unique_id=242659952 instance=ExtResource("6_twwsd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 14)
color = ExtResource("3_h8jt7")
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Tile" parent="." unique_id=1553616659 instance=ExtResource("7_h8jt7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.413641, 3.9149218, 6.559334)
coordinate = Vector2i(67, -55)
[connection signal="is_clicked" from="Tile" to="Board" method="_on_tile_clicked"]

87
Scene/game.tscn9601927111.tmp Executable file
View file

@ -0,0 +1,87 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://qjo2ij73xlok" path="res://Scene/Pieces/king.tscn" id="2_thj8p"]
[ext_resource type="PackedScene" uid="uid://dxh3jmv61jfp0" path="res://Scene/Pieces/rook.tscn" id="4_sagxc"]
[ext_resource type="PackedScene" uid="uid://di3qg1qnmy0p2" path="res://Scene/Pieces/knight.tscn" id="5_8f6ah"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="PackedScene" uid="uid://dkl8itq74sajx" path="res://Scene/Pieces/pawn.tscn" id="6_twwsd"]
[ext_resource type="PackedScene" uid="uid://btmuoxdocev5r" path="res://Scene/tile.tscn" id="7_h8jt7"]
[ext_resource type="PackedScene" uid="uid://ci6k70kme7egj" path="res://Scene/Pieces/piece.tscn" id="7_sagxc"]
[ext_resource type="Resource" uid="uid://cbwd1rtruemqj" path="res://pawn.tres" id="8_sagxc"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="9_8f6ah"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.7422784e-08, 2.0779702e-15, 1.0542077e-08, 0.1205873, 0.9927028, 8.678483e-08, 0.9927028, -0.1205873, 7, 15.866533, 5.295808)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="King" parent="." unique_id=1224931075 instance=ExtResource("2_thj8p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14)
[node name="King2" parent="." unique_id=816589942 instance=ExtResource("2_thj8p")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 0)
[node name="Rook" parent="." unique_id=699678101 instance=ExtResource("4_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 14, 0, 0)
[node name="Rook2" parent="." unique_id=1019284846 instance=ExtResource("4_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
[node name="Knight" parent="." unique_id=1333208927 instance=ExtResource("5_8f6ah")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 14)
[node name="Knight2" parent="." unique_id=1259419598 instance=ExtResource("5_8f6ah")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10, 0, 0)
[node name="Pawn" parent="." unique_id=124611093 instance=ExtResource("6_twwsd")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 0)
[node name="Pawn2" parent="." unique_id=242659952 instance=ExtResource("6_twwsd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 14)
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Tile" parent="." unique_id=1553616659 instance=ExtResource("7_h8jt7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.413641, 3.9149218, 6.559334)
coordinate = Vector2i(67, -55)
[node name="SuperPawn" parent="." unique_id=410020425 instance=ExtResource("7_sagxc")]
config = ExtResource("8_sagxc")
material = ExtResource("9_8f6ah")
[connection signal="is_clicked" from="Tile" to="Board" method="_on_tile_clicked"]

93
Scene/game.tscn9850063513.tmp Executable file
View file

@ -0,0 +1,93 @@
[gd_scene format=3 uid="uid://e7hyi2t7bejn"]
[ext_resource type="PackedScene" uid="uid://qjo2ij73xlok" path="res://Scene/Pieces/king.tscn" id="2_thj8p"]
[ext_resource type="PackedScene" uid="uid://dxh3jmv61jfp0" path="res://Scene/Pieces/rook.tscn" id="4_sagxc"]
[ext_resource type="PackedScene" uid="uid://di3qg1qnmy0p2" path="res://Scene/Pieces/knight.tscn" id="5_8f6ah"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="6_thj8p"]
[ext_resource type="PackedScene" uid="uid://dkl8itq74sajx" path="res://Scene/Pieces/pawn.tscn" id="6_twwsd"]
[ext_resource type="PackedScene" uid="uid://btmuoxdocev5r" path="res://Scene/tile.tscn" id="7_h8jt7"]
[ext_resource type="PackedScene" uid="uid://ci6k70kme7egj" path="res://Scene/Pieces/piece.tscn" id="7_sagxc"]
[ext_resource type="Material" uid="uid://bxg7bjgiqfnru" path="res://Materials/piece_black.tres" id="9_8f6ah"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w51g1"]
sky_top_color = Color(0.5579281, 0.62864333, 0.7231204, 1)
sky_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
ground_bottom_color = Color(0.18326113, 0.23414573, 0.6455667, 1)
ground_horizon_color = Color(0.91311014, 0.9435101, 1.0699847, 1)
[sub_resource type="Sky" id="Sky_4jv7b"]
sky_material = SubResource("ProceduralSkyMaterial_w51g1")
[sub_resource type="Environment" id="Environment_03iqk"]
background_mode = 2
sky = SubResource("Sky_4jv7b")
tonemap_mode = 2
ssr_enabled = true
ssao_enabled = true
ssil_enabled = true
glow_enabled = true
fog_light_color = Color(0.13823166, 0.1502127, 0.16818427, 1)
fog_light_energy = 1.5
fog_sun_scatter = 0.3
fog_aerial_perspective = 0.113
adjustment_enabled = true
[node name="Game" type="Node3D" unique_id=1842930265]
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=40612833]
transform = Transform3D(-0.8660254, -0.43301278, 0.25, 0, 0.49999997, 0.86602545, -0.50000006, 0.75, -0.43301266, 0, 0, 0)
shadow_enabled = true
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=1076837797]
environment = SubResource("Environment_03iqk")
[node name="Camera3D" type="Camera3D" parent="." unique_id=816896196]
transform = Transform3D(-1, 8.7422784e-08, 2.0779702e-15, 1.0542077e-08, 0.1205873, 0.9927028, 8.678483e-08, 0.9927028, -0.1205873, 7, 15.866533, 5.295808)
[node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=675296854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 26.254642, 0)
[node name="Node3D" type="Node3D" parent="." unique_id=1118485116]
[node name="King" parent="." unique_id=1224931075 instance=ExtResource("2_thj8p")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 14)
config = null
[node name="King2" parent="." unique_id=816589942 instance=ExtResource("2_thj8p")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 6, 0, 0)
config = null
[node name="Rook" parent="." unique_id=699678101 instance=ExtResource("4_sagxc")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 14, 0, 0)
config = null
[node name="Rook2" parent="." unique_id=1019284846 instance=ExtResource("4_sagxc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14)
config = null
[node name="Knight" parent="." unique_id=1333208927 instance=ExtResource("5_8f6ah")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 14)
config = null
[node name="Knight2" parent="." unique_id=1259419598 instance=ExtResource("5_8f6ah")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 10, 0, 0)
config = null
[node name="Pawn" parent="." unique_id=124611093 instance=ExtResource("6_twwsd")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 2, 0, 0)
config = null
[node name="Pawn2" parent="." unique_id=242659952 instance=ExtResource("6_twwsd")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 14)
config = null
[node name="Board" parent="." unique_id=934988573 instance=ExtResource("6_thj8p")]
[node name="Tile" parent="." unique_id=1553616659 instance=ExtResource("7_h8jt7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 21.413641, 3.9149218, 6.559334)
coordinate = Vector2i(67, -55)
[node name="SuperPawn" parent="." unique_id=410020425 instance=ExtResource("7_sagxc")]
material = ExtResource("9_8f6ah")
[connection signal="is_clicked" from="Tile" to="Board" method="_on_tile_clicked"]

8
Scene/game_2.tscn Executable file
View file

@ -0,0 +1,8 @@
[gd_scene format=3 uid="uid://dq63aukcddmy4"]
[ext_resource type="PackedScene" uid="uid://2cqjdxpi6ave" path="res://Scene/board.tscn" id="1_gbmdm"]
[node name="Game2" type="Node3D" unique_id=876809888]
[node name="Board" parent="." unique_id=1078389160 instance=ExtResource("1_gbmdm")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.08106089, 0, 1.475351)

View file

@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://cnbgugaxpa3g5"]
[ext_resource type="PackedScene" uid="uid://dqjl0p0ek1vvt" path="res://Models/tile_border.blend" id="1_68qma"]
[node name="MovementHighlighter" type="Node3D" unique_id=1576695600 groups=["Highlighter"]]
[node name="tile_border" parent="." unique_id=285232598 instance=ExtResource("1_68qma")]

39
Scene/tile.gd Executable file
View file

@ -0,0 +1,39 @@
class_name Tile
extends Node3D
@export var coordinate :Vector2i
@onready var mesh_instance_3d: MeshInstance3D = $MeshInstance3D
const TILE_LIGHT = preload("uid://drsd4o5kptjhm")
const HIGHLIGHT = preload("uid://d3ognkvbqsh4u")
signal is_clicked(Vector2i)
func set_coord(vec):
coordinate = vec
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_area_3d_mouse_entered() -> void:
mesh_instance_3d.material_overlay = HIGHLIGHT
pass # Replace with function body.
func _on_area_3d_mouse_exited() -> void:
mesh_instance_3d.material_overlay = null
pass # Replace with function body.
func _on_area_3d_input_event(camera: Node, event: InputEvent, event_position: Vector3, normal: Vector3, shape_idx: int) -> void:
if event.is_action_pressed("action"):
#print("is clicked!")
is_clicked.emit(coordinate)
pass # Replace with function body.

1
Scene/tile.gd.uid Executable file
View file

@ -0,0 +1 @@
uid://ej6fiekgeewv

24
Scene/tile.tscn Executable file
View file

@ -0,0 +1,24 @@
[gd_scene format=3 uid="uid://btmuoxdocev5r"]
[ext_resource type="Script" uid="uid://ej6fiekgeewv" path="res://Scene/tile.gd" id="1_gcyve"]
[ext_resource type="BoxMesh" uid="uid://bpyroara4w7ea" path="res://Models/box_mesh.tres" id="2_gdj8f"]
[sub_resource type="BoxShape3D" id="BoxShape3D_gdj8f"]
size = Vector3(2, 2, 2)
[node name="Tile" type="Node3D" unique_id=1553616659]
script = ExtResource("1_gcyve")
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1718877635]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
mesh = ExtResource("2_gdj8f")
[node name="Area3D" type="Area3D" parent="." unique_id=846612717]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" unique_id=1365724040]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0)
shape = SubResource("BoxShape3D_gdj8f")
[connection signal="input_event" from="Area3D" to="." method="_on_area_3d_input_event"]
[connection signal="mouse_entered" from="Area3D" to="." method="_on_area_3d_mouse_entered"]
[connection signal="mouse_exited" from="Area3D" to="." method="_on_area_3d_mouse_exited"]