diff --git a/.gitignore b/.gitignore index 567609b..5b5fbba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build/ +.import/ diff --git a/assets/export/bishop.png b/assets/export/bishop.png new file mode 100644 index 0000000..348db4b Binary files /dev/null and b/assets/export/bishop.png differ diff --git a/assets/export/bishop.png.import b/assets/export/bishop.png.import new file mode 100644 index 0000000..bce907b --- /dev/null +++ b/assets/export/bishop.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/bishop.png-9e052c6f362b2248acf5ced5c1d39bbb.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/bishop.png" +dest_files=[ "res://.import/bishop.png-9e052c6f362b2248acf5ced5c1d39bbb.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/king.png b/assets/export/king.png new file mode 100644 index 0000000..871c735 Binary files /dev/null and b/assets/export/king.png differ diff --git a/assets/export/king.png.import b/assets/export/king.png.import new file mode 100644 index 0000000..aa07bd2 --- /dev/null +++ b/assets/export/king.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/king.png-07ffe82c467263d078bdd00ecc260910.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/king.png" +dest_files=[ "res://.import/king.png-07ffe82c467263d078bdd00ecc260910.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/knight.png b/assets/export/knight.png new file mode 100644 index 0000000..5fe62aa Binary files /dev/null and b/assets/export/knight.png differ diff --git a/assets/export/knight.png.import b/assets/export/knight.png.import new file mode 100644 index 0000000..6b7232a --- /dev/null +++ b/assets/export/knight.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/knight.png-cd94a1c957955d24a4b172ef025165bd.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/knight.png" +dest_files=[ "res://.import/knight.png-cd94a1c957955d24a4b172ef025165bd.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/pawn.png b/assets/export/pawn.png new file mode 100644 index 0000000..a5c1eea Binary files /dev/null and b/assets/export/pawn.png differ diff --git a/assets/export/pawn.png.import b/assets/export/pawn.png.import new file mode 100644 index 0000000..a240af1 --- /dev/null +++ b/assets/export/pawn.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/pawn.png-ea3858ceb85926cfe768cbdc4cefb202.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/pawn.png" +dest_files=[ "res://.import/pawn.png-ea3858ceb85926cfe768cbdc4cefb202.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/queen.png b/assets/export/queen.png new file mode 100644 index 0000000..5e4d118 Binary files /dev/null and b/assets/export/queen.png differ diff --git a/assets/export/queen.png.import b/assets/export/queen.png.import new file mode 100644 index 0000000..1a324fd --- /dev/null +++ b/assets/export/queen.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/queen.png-b40ec150b980fde42f9ae368b5da74a9.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/queen.png" +dest_files=[ "res://.import/queen.png-b40ec150b980fde42f9ae368b5da74a9.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/rook.png b/assets/export/rook.png new file mode 100644 index 0000000..d11c6e0 Binary files /dev/null and b/assets/export/rook.png differ diff --git a/assets/export/rook.png.import b/assets/export/rook.png.import new file mode 100644 index 0000000..f487152 --- /dev/null +++ b/assets/export/rook.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/rook.png-024d03a0931bc1008f05a9e2d8bb93aa.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/rook.png" +dest_files=[ "res://.import/rook.png-024d03a0931bc1008f05a9e2d8bb93aa.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/square_center_0.png b/assets/export/square_center_0.png new file mode 100644 index 0000000..2db596c Binary files /dev/null and b/assets/export/square_center_0.png differ diff --git a/assets/export/square_center_0.png.import b/assets/export/square_center_0.png.import new file mode 100644 index 0000000..2d666fd --- /dev/null +++ b/assets/export/square_center_0.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/square_center_0.png-58cbbdc1eb62a39927b47443c3feb6ac.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/square_center_0.png" +dest_files=[ "res://.import/square_center_0.png-58cbbdc1eb62a39927b47443c3feb6ac.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/export/square_edge.png b/assets/export/square_edge.png new file mode 100644 index 0000000..140350b Binary files /dev/null and b/assets/export/square_edge.png differ diff --git a/assets/export/square_edge.png.import b/assets/export/square_edge.png.import new file mode 100644 index 0000000..9c8e47f --- /dev/null +++ b/assets/export/square_edge.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/square_edge.png-03ab64193a0e2810802d31d0367576c5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/export/square_edge.png" +dest_files=[ "res://.import/square_edge.png-03ab64193a0e2810802d31d0367576c5.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/assets/source/Squares.xcf b/assets/source/Squares.xcf new file mode 100644 index 0000000..141c9b6 Binary files /dev/null and b/assets/source/Squares.xcf differ diff --git a/project.godot b/project.godot index 9b7f834..eb75ce8 100644 --- a/project.godot +++ b/project.godot @@ -16,8 +16,16 @@ _global_script_class_icons={ [application] config/name="Ld 50" +run/main_scene="res://src/Game.tscn" config/icon="res://icon.png" +[display] + +window/size/width=1280 +window/size/height=1024 +window/stretch/mode="2d" +window/stretch/aspect="keep" + [rendering] environment/default_environment="res://default_env.tres" diff --git a/src/Game.gd b/src/Game.gd new file mode 100644 index 0000000..355a871 --- /dev/null +++ b/src/Game.gd @@ -0,0 +1,124 @@ +extends Container + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +var pf_scale +var turn = 1 +var is_player_turn = true +# Index: weakref to piece +var pieces = {} +var height +var width +const piece_types = { + "pawn": "res://src/pieces/Pawn.tscn", + "rook": "res://src/pieces/Rook.tscn", + "bishop": "res://src/pieces/Bishop.tscn", + "knight": "res://src/pieces/Knight.tscn", + "king": "res://src/pieces/King.tscn", + "queen": "res://src/pieces/Queen.tscn", +} + +func new_piece(piece_type, group, position = null): + if not piece_types.has(piece_type): + return null + var piece = ResourceLoader.load(piece_types[piece_type]).instance() + if position: + if !set_piece_position(piece, position, true): + piece.queue_free() + return null + piece.set_position(Vector2( + position.x * 128, + position.y * 128 + )) + var pf = get_node("/root/Game/MarginContainer/Playfield") + piece.add_to_group("pieces") + piece.add_to_group(group) + if group == "opponent": + piece.get_node("Body").set_modulate( + Color(0.75, 0.1, 0.1, 1.0) + ) + pf.add_child(piece) + print("Created piece", piece_type, " at ", position, " for group ", group) + return piece + +func pos_to_index(position): + return (position.y * self.height) + position.x + +func set_piece_position(piece, position, destroy = false): + var idx = pos_to_index(position) + if self.pieces.has(idx): + if destroy: + if self.pieces[idx].get_ref(): + self.pieces[idx].get_ref().queue_free() + else: + print("Warning, piece collision dur set_piece_position at ", position) + return false + self.pieces[idx] = weakref(piece) + return true + +# Called when the node enters the scene tree for the first time. +func _ready(): + var pf = get_node("/root/Game/MarginContainer/Playfield") + var start_height = 8 + var start_width = 8 + pf.initialize(start_width, start_height) + self.height = start_height + self.width = start_width + # Translate the pf to it sits on top left + # We want to scale it to fit within the margin container + var pf_size = Vector2(width * 128.0, height * 128.0) + var larger = pf_size.x + if pf_size.y > larger: + larger = pf_size.y + # Container is 768x768 + var scale = 768 / larger + print("Scaling playfield by ", scale) + pf.apply_scale(Vector2(scale, scale)) + pf.translate(Vector2( + 64 * scale, + 64 * scale + )) + self.pf_scale = scale + reset_game_state() + +func reset_game_state(): + self.is_player_turn = true + self.turn = 0 + for p in get_tree().get_nodes_in_group("pieces"): + p.queue_free() + + # Create starting pieces + # 8 pawns per side, starting at col 0 + (width-8)/2 + # on rows 2, height - 2 + var start_x = (self.width - 8) / 2 + var y_opponent = 1 + var y_player = self.height - 2 + var i = 0 + while i < 8: + var x = start_x + i + new_piece("pawn", "player", Vector2(x, y_player)) + new_piece("pawn", "opponent", Vector2(x, y_opponent)) + i += 1 + new_piece("rook", "player", Vector2(start_x, self.height -1)) + new_piece("rook", "player", Vector2(start_x + 7, self.height -1)) + new_piece("rook", "opponent", Vector2(start_x, 0)) + new_piece("rook", "opponent", Vector2(start_x + 7, 0)) + new_piece("bishop", "player", Vector2(start_x + 2, self.height -1)) + new_piece("bishop", "player", Vector2(start_x + 5, self.height -1)) + new_piece("bishop", "opponent", Vector2(start_x + 2, 0)) + new_piece("bishop", "opponent", Vector2(start_x + 5, 0)) + new_piece("knight", "player", Vector2(start_x + 1, self.height -1)) + new_piece("knight", "player", Vector2(start_x + 6, self.height -1)) + new_piece("knight", "opponent", Vector2(start_x + 1, 0)) + new_piece("knight", "opponent", Vector2(start_x + 6, 0)) + new_piece("king", "player", Vector2(start_x + 4, self.height - 1)) + new_piece("king", "opponent", Vector2(start_x + 4, 0)) + new_piece("queen", "player", Vector2(start_x + 3, self.height - 1)) + new_piece("queen", "opponent", Vector2(start_x + 3, 0)) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/Game.tscn b/src/Game.tscn new file mode 100644 index 0000000..52c5572 --- /dev/null +++ b/src/Game.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/Game.gd" type="Script" id=1] +[ext_resource path="res://src/Playfield.tscn" type="PackedScene" id=2] + +[node name="Game" type="Container"] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 2 +size_flags_vertical = 2 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="MarginContainer" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 256.0 +margin_top = 128.0 +margin_right = -256.0 +margin_bottom = -128.0 +size_flags_horizontal = 2 +size_flags_vertical = 2 + +[node name="Playfield" parent="MarginContainer" instance=ExtResource( 2 )] diff --git a/src/Piece.gd b/src/Piece.gd new file mode 100644 index 0000000..e640ef2 --- /dev/null +++ b/src/Piece.gd @@ -0,0 +1,23 @@ +extends Node2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +# Each piece should belong to a group - player or opponent +# +var health = 1 +var damage = 1 +var abilities = [] +var kills = 0 +var at_spawn = true + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/Playfield.gd b/src/Playfield.gd new file mode 100644 index 0000000..fff1a35 --- /dev/null +++ b/src/Playfield.gd @@ -0,0 +1,52 @@ +extends Node2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +var height +var width +# holds weakrefs to the square nodes +var squares = [] + +func initialize(width: int = 8, height: int = 8): + # Remove any Squares beneath us + for i in self.squares: + if i.get_ref(): + i.get_ref().queue_free() + + self.squares = [] + self.height = height + self.width = width + + # Create new squares + var i = 0 + while i < self.width: + var j = 0 + while j < self.height: + var instance = ResourceLoader.load("res://src/Square.tscn").instance() + # @TODO any tweaks to the node by calling custom function initialize() + instance.translate(Vector2(128*i, 128*j)) + self.squares.append(weakref(instance)) + add_child(instance) + j += 1 + i += 1 + +func to_index(row: int, col: int): + # 0-based basing width, height + if row < 0 or col < 0: + return null + if row >= self.width or col >= self.height: + return null + return (row*self.width)+col + +# Called when the node enters the scene tree for the first time. +func _ready(): + initialize(8, 8) + # pass + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/Playfield.tscn b/src/Playfield.tscn new file mode 100644 index 0000000..865067d --- /dev/null +++ b/src/Playfield.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/Playfield.gd" type="Script" id=1] + +[node name="Playfield" type="Node2D"] +script = ExtResource( 1 ) diff --git a/src/Square.tscn b/src/Square.tscn new file mode 100644 index 0000000..c6d8f36 --- /dev/null +++ b/src/Square.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://assets/export/square_edge.png" type="Texture" id=1] +[ext_resource path="res://assets/export/square_center_0.png" type="Texture" id=2] + +[node name="Square" type="Node2D"] +z_index = -1 + +[node name="Body" type="Sprite" parent="."] +texture = ExtResource( 2 ) + +[node name="Edge" type="Sprite" parent="."] +texture = ExtResource( 1 ) diff --git a/src/hilight.shader b/src/hilight.shader new file mode 100644 index 0000000..e2d8b19 --- /dev/null +++ b/src/hilight.shader @@ -0,0 +1,21 @@ +shader_type canvas_item; + +uniform float width: hint_range(0.0, 50.0); +uniform vec4 color: hint_color; + +void fragment() { + vec2 size = TEXTURE_PIXEL_SIZE * width; + float outline = texture(TEXTURE, UV + vec2(-size.x, 0)).a; + outline += texture(TEXTURE, UV + vec2(0, size.y)).a; + outline += texture(TEXTURE, UV + vec2(size.x, 0)).a; + outline += texture(TEXTURE, UV + vec2(0, -size.y)).a; + outline += texture(TEXTURE, UV + vec2(-size.x, size.y)).a; + outline += texture(TEXTURE, UV + vec2(size.x, size.y)).a; + outline += texture(TEXTURE, UV + vec2(-size.x, -size.y)).a; + outline += texture(TEXTURE, UV + vec2(size.x, -size.y)).a; + outline = min(outline, 1.0); + + vec4 ncolor = texture(TEXTURE, UV); + COLOR = mix(ncolor, color, outline - ncolor.a); + +} \ No newline at end of file diff --git a/src/pieces/Bishop.tscn b/src/pieces/Bishop.tscn new file mode 100644 index 0000000..68c7739 --- /dev/null +++ b/src/pieces/Bishop.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/bishop.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/King.tscn b/src/pieces/King.tscn new file mode 100644 index 0000000..ed4dda7 --- /dev/null +++ b/src/pieces/King.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/king.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/Knight.tscn b/src/pieces/Knight.tscn new file mode 100644 index 0000000..d60f9f2 --- /dev/null +++ b/src/pieces/Knight.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/knight.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/Pawn.tscn b/src/pieces/Pawn.tscn new file mode 100644 index 0000000..0541308 --- /dev/null +++ b/src/pieces/Pawn.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/pawn.png" type="Texture" id=3] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 3 ) diff --git a/src/pieces/Piece.gd b/src/pieces/Piece.gd new file mode 100644 index 0000000..fba87df --- /dev/null +++ b/src/pieces/Piece.gd @@ -0,0 +1,39 @@ +extends Sprite + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + +const types = { + "pawn": "res://src/pieces/Pawn.tscn", + "rook": "res://src/pieces/Rook.tscn", + "bishop": "res://src/pieces/Bishop.tscn", + "knight": "res://src/pieces/Knight.tscn", + "king": "res://src/pieces/King.tscn", + "queen": "res://src/pieces/Queen.tscn", +} + +# Each piece should belong to a group - player or opponent +# +var health = 1 +var damage = 1 +var abilities = [] +var kills = 0 + +static func new_piece(piece_type): + if not types.has(piece_type): + return null + return ResourceLoader.load(types[piece_type]).instance() + #piece.apply_scale(Vector2(pf.scale, pf.scale)) + #piece.add_to_group(group) + #return piece + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/src/pieces/Piece.tscn b/src/pieces/Piece.tscn new file mode 100644 index 0000000..54aaabe --- /dev/null +++ b/src/pieces/Piece.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://src/Piece.gd" type="Script" id=1] +[ext_resource path="res://src/hilight.shader" type="Shader" id=2] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 2 ) +shader_param/width = 2.0 +shader_param/color = null + +[node name="Piece" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Body" type="Sprite" parent="."] +material = SubResource( 1 ) diff --git a/src/pieces/Queen.tscn b/src/pieces/Queen.tscn new file mode 100644 index 0000000..0a25912 --- /dev/null +++ b/src/pieces/Queen.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/queen.png" type="Texture" id=2] + +[node name="Piece" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 ) diff --git a/src/pieces/Rook.tscn b/src/pieces/Rook.tscn new file mode 100644 index 0000000..106525c --- /dev/null +++ b/src/pieces/Rook.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/pieces/Piece.tscn" type="PackedScene" id=1] +[ext_resource path="res://assets/export/rook.png" type="Texture" id=2] + +[node name="Rook" instance=ExtResource( 1 )] + +[node name="Body" parent="." index="0"] +texture = ExtResource( 2 )