Scaled chips and board

This commit is contained in:
Multiplyster
2025-12-03 20:06:34 -05:00
Unverified
parent ab4ebaea42
commit 21f2af5395
6 changed files with 65 additions and 10 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8un28mol7qow"
path="res://.godot/imported/BoardTileMap.png-b52c6a70f2625846356fb1557a154ce5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/BoardTileMap.png"
dest_files=["res://.godot/imported/BoardTileMap.png-b52c6a70f2625846356fb1557a154ce5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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

@@ -9,7 +9,7 @@
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_b3w8x"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_glh1q"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_i2o8i"]
texture = ExtResource("6_i2o8i")
texture_region_size = Vector2i(26, 26)
0:0/0 = 0
@@ -17,13 +17,15 @@ texture_region_size = Vector2i(26, 26)
2:0/0 = 0
3:0/0 = 0
[sub_resource type="TileSet" id="TileSet_u1oi2"]
sources/0 = SubResource("TileSetAtlasSource_glh1q")
[sub_resource type="TileSet" id="TileSet_glh1q"]
tile_size = Vector2i(26, 26)
sources/0 = SubResource("TileSetAtlasSource_i2o8i")
[node name="BoardScreen" type="Node2D"]
script = ExtResource("1_b3w8x")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(0, 200)
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("WorldBoundaryShape2D_b3w8x")
@@ -102,7 +104,7 @@ position = Vector2(-7, 6)
scale = Vector2(0.25, 0.25)
texture = ExtResource("5_i2o8i")
[node name="Label" type="Label" parent="Player2Card"]
[node name="Name" type="Label" parent="Player2Card"]
offset_left = -531.0
offset_top = -240.0
offset_right = -429.0
@@ -121,5 +123,12 @@ theme_override_font_sizes/font_size = 8
text = "NOT READY"
[node name="TileMap" type="TileMap" parent="."]
tile_set = SubResource("TileSet_u1oi2")
position = Vector2(39, 200)
scale = Vector2(3, 3)
tile_set = SubResource("TileSet_glh1q")
format = 2
layer_0/z_index = 100
layer_0/tile_data = PackedInt32Array(-3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -4, 0, 0, -65540, 0, 0, -131076, 0, 0, -196612, 0, 0, -262148, 0, 0, -327684, 0, 0, -327683, 0, 0, -327682, 0, 0, -327681, 0, 0, -393216, 0, 0, -393215, 0, 0, -393214, 0, 0, -327678, 0, 0, -262142, 0, 0, -196606, 0, 0, -131070, 0, 0, -131071, 0, 0, -131072, 0, 0, -65537, 0, 0, -65538, 0, 0, -65539, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -196607, 0, 0, -262143, 0, 0, -262144, 0, 0, -196609, 0, 0, -196610, 0, 0, -196611, 0, 0, -262147, 0, 0, -262146, 0, 0, -262145, 0, 0, -327680, 0, 0, -327679, 0, 0, -5, 196608, 536870912, -65541, 65536, 0, -131077, 65536, 0, -196613, 65536, 0, -262149, 65536, 0, -327685, 196608, 0, 65532, 196608, 1610612736, 2, 196608, 1879048192, -65533, 196608, 805306368, -393213, 196608, 268435456, -458750, 196608, 1342177280, -393219, 65536, 1073741824, -393218, 65536, 1073741824, -393217, 65536, 1073741824, -458752, 65536, 1073741824, -458751, 65536, 1073741824, -393220, 196608, 1073741824, -327677, 65536, 268435456, -262141, 65536, 268435456, -196605, 65536, 268435456, -131069, 65536, 268435456, 65533, 65536, 1879048192, 65534, 65536, 1879048192, 65535, 65536, 1879048192, 0, 65536, 1879048192, 1, 65536, 1879048192)
[node name="Node2D" type="Node2D" parent="."]
position = Vector2(-536, -299)

View File

@@ -4,13 +4,15 @@
[ext_resource type="Script" uid="uid://dd5nu6037qsr0" path="res://scripts/red_chip.gd" id="1_tfypd"]
[sub_resource type="CircleShape2D" id="CircleShape2D_tfypd"]
radius = 14.0
radius = 13.017083
[node name="RedChip" type="RigidBody2D"]
script = ExtResource("1_tfypd")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(3, 3)
texture = ExtResource("1_qsflu")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2(3, 3)
shape = SubResource("CircleShape2D_tfypd")

View File

@@ -4,13 +4,15 @@
[ext_resource type="Texture2D" uid="uid://qy30emdgrk7o" path="res://assets/sprites/YellowChip.png" id="1_eu0sq"]
[sub_resource type="CircleShape2D" id="CircleShape2D_epi6l"]
radius = 14.0
radius = 13.004272
[node name="YellowChip" type="RigidBody2D"]
script = ExtResource("1_epi6l")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(3, 3)
texture = ExtResource("1_eu0sq")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2(3, 3)
shape = SubResource("CircleShape2D_epi6l")

View File

@@ -4,10 +4,12 @@ using System;
public partial class BoardScreen : Node2D {
private const string RED_CHIP_PATH = "res://scenes/red_chip.tscn";
private const string YELLOW_CHIP_PATH = "res://scenes/yellow_chip.tscn";
private const int CHIP_SCALE = 3;
private const int CHIP_SIZE = 24;
private const int CHIP_PADDING = 2;
private const int X_OFF = -(CHIP_SIZE + CHIP_PADDING) * 7 / 2;
private const int CHIP_X_OFF = -(CHIP_SIZE + CHIP_PADDING) * 7 / 2 + (CHIP_SIZE + CHIP_PADDING) / 2;
private const int Y_OFF = 300;
private const int CARD_CENTER_X_DEFAULT = -536;
private PackedScene redChip;
private PackedScene ylwChip;
@@ -84,8 +86,8 @@ public partial class BoardScreen : Node2D {
}
RigidBody2D newNode = redChip.Instantiate<RigidBody2D>();
newNode.Position = new Vector2(X_OFF + (CHIP_SIZE + CHIP_PADDING) * col, -(CHIP_SIZE + CHIP_PADDING) * 7);
AddChild(newNode);
newNode.Position = new Vector2(CHIP_SCALE * (CHIP_X_OFF + (CHIP_SIZE + CHIP_PADDING) * col), -(CHIP_SIZE + CHIP_PADDING) * 7);
chips[row, col] = newNode;
}
@@ -98,8 +100,8 @@ public partial class BoardScreen : Node2D {
}
RigidBody2D newNode = ylwChip.Instantiate<RigidBody2D>();
newNode.Position = new Vector2(X_OFF + (CHIP_SIZE + CHIP_PADDING) * col, -(CHIP_SIZE + CHIP_PADDING) * 7);
AddChild(newNode);
newNode.Position = new Vector2(CHIP_SCALE * (CHIP_X_OFF + (CHIP_SIZE + CHIP_PADDING) * col), -(CHIP_SIZE + CHIP_PADDING) * 7);
chips[row, col] = newNode;
}