commit ecc5f08299dbe85b41fb090a2717b4dfbe8ff4ae Author: Donato Mastronardi Date: Sat Feb 28 16:18:15 2026 +0100 starting commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0af181c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Godot 4+ specific ignores +.godot/ +/android/ diff --git a/Dice/Dice.tscn b/Dice/Dice.tscn new file mode 100644 index 0000000..9cc13ee --- /dev/null +++ b/Dice/Dice.tscn @@ -0,0 +1,91 @@ +[gd_scene format=3 uid="uid://cp21p38e4565f"] + +[ext_resource type="Texture2D" uid="uid://ey2ntynftan0" path="res://Dice/sprite/inverted-dice-1.svg" id="1_288jf"] +[ext_resource type="Script" uid="uid://58630r36mgws" path="res://Dice/dice.gd" id="1_x6ve6"] +[ext_resource type="Texture2D" uid="uid://57vfqphwevpu" path="res://Dice/sprite/inverted-dice-2.svg" id="2_muf0l"] +[ext_resource type="Texture2D" uid="uid://btwfcgeyw5dlq" path="res://Dice/sprite/inverted-dice-3.svg" id="3_x6ve6"] +[ext_resource type="Texture2D" uid="uid://dek2ec7a0viqd" path="res://Dice/sprite/inverted-dice-4.svg" id="4_wf8fb"] +[ext_resource type="Texture2D" uid="uid://b8wd5kc3kmgf6" path="res://Dice/sprite/inverted-dice-5.svg" id="5_jtbr5"] +[ext_resource type="Texture2D" uid="uid://dx55yffy3sqhv" path="res://Dice/sprite/inverted-dice-6.svg" id="6_av83i"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_yynlm"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_288jf") +}], +"loop": true, +"name": &"1", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_muf0l") +}], +"loop": true, +"name": &"2", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3_x6ve6") +}], +"loop": true, +"name": &"3", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("4_wf8fb") +}], +"loop": true, +"name": &"4", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("5_jtbr5") +}], +"loop": true, +"name": &"5", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("6_av83i") +}], +"loop": true, +"name": &"6", +"speed": 5.0 +}, { +"frames": [{ +"duration": 0.4, +"texture": ExtResource("1_288jf") +}, { +"duration": 1.0, +"texture": ExtResource("2_muf0l") +}, { +"duration": 1.0, +"texture": ExtResource("3_x6ve6") +}, { +"duration": 1.0, +"texture": ExtResource("4_wf8fb") +}, { +"duration": 1.0, +"texture": ExtResource("5_jtbr5") +}, { +"duration": 1.0, +"texture": ExtResource("6_av83i") +}], +"loop": true, +"name": &"rolling", +"speed": 5.0 +}] + +[node name="Dice" type="Node2D" unique_id=668450548] +script = ExtResource("1_x6ve6") +roll_time = null + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=78541616] +sprite_frames = SubResource("SpriteFrames_yynlm") +animation = &"6" diff --git a/Dice/dice.gd b/Dice/dice.gd new file mode 100644 index 0000000..78f860f --- /dev/null +++ b/Dice/dice.gd @@ -0,0 +1,22 @@ +extends Node2D + +class_name Dice + +# seconds +@export var roll_time: int = 2 +var is_rolling: bool = false + +@onready var sprite: AnimatedSprite2D = $AnimatedSprite2D +var random_value = 4 + +func roll_dice(): + if is_rolling: + return + is_rolling = true + await get_tree().create_timer(roll_time).timeout + + self.random_value = int(randi_range(0, 7)) + is_rolling = false + +func _process(delta): + diff --git a/Dice/dice.gd.uid b/Dice/dice.gd.uid new file mode 100644 index 0000000..0e23b2b --- /dev/null +++ b/Dice/dice.gd.uid @@ -0,0 +1 @@ +uid://58630r36mgws diff --git a/Dice/sprite/inverted-dice-1.svg b/Dice/sprite/inverted-dice-1.svg new file mode 100644 index 0000000..19b8770 --- /dev/null +++ b/Dice/sprite/inverted-dice-1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dice/sprite/inverted-dice-1.svg.import b/Dice/sprite/inverted-dice-1.svg.import new file mode 100644 index 0000000..633f93b --- /dev/null +++ b/Dice/sprite/inverted-dice-1.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ey2ntynftan0" +path="res://.godot/imported/inverted-dice-1.svg-58b9a787cafe39abb85be42b770f1631.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Dice/sprite/inverted-dice-1.svg" +dest_files=["res://.godot/imported/inverted-dice-1.svg-58b9a787cafe39abb85be42b770f1631.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Dice/sprite/inverted-dice-2.svg b/Dice/sprite/inverted-dice-2.svg new file mode 100644 index 0000000..9772998 --- /dev/null +++ b/Dice/sprite/inverted-dice-2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dice/sprite/inverted-dice-2.svg.import b/Dice/sprite/inverted-dice-2.svg.import new file mode 100644 index 0000000..72b56b6 --- /dev/null +++ b/Dice/sprite/inverted-dice-2.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://57vfqphwevpu" +path="res://.godot/imported/inverted-dice-2.svg-fba3cce15532d71de9a7eb3195368e29.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Dice/sprite/inverted-dice-2.svg" +dest_files=["res://.godot/imported/inverted-dice-2.svg-fba3cce15532d71de9a7eb3195368e29.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Dice/sprite/inverted-dice-3.svg b/Dice/sprite/inverted-dice-3.svg new file mode 100644 index 0000000..c4445c7 --- /dev/null +++ b/Dice/sprite/inverted-dice-3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dice/sprite/inverted-dice-3.svg.import b/Dice/sprite/inverted-dice-3.svg.import new file mode 100644 index 0000000..ea85de0 --- /dev/null +++ b/Dice/sprite/inverted-dice-3.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://btwfcgeyw5dlq" +path="res://.godot/imported/inverted-dice-3.svg-537ed01fc9890df95a8b6efb3c61b868.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Dice/sprite/inverted-dice-3.svg" +dest_files=["res://.godot/imported/inverted-dice-3.svg-537ed01fc9890df95a8b6efb3c61b868.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Dice/sprite/inverted-dice-4.svg b/Dice/sprite/inverted-dice-4.svg new file mode 100644 index 0000000..95764df --- /dev/null +++ b/Dice/sprite/inverted-dice-4.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dice/sprite/inverted-dice-4.svg.import b/Dice/sprite/inverted-dice-4.svg.import new file mode 100644 index 0000000..1bd7b90 --- /dev/null +++ b/Dice/sprite/inverted-dice-4.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dek2ec7a0viqd" +path="res://.godot/imported/inverted-dice-4.svg-fe376335b9d7b45d0ac820a738e318b2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Dice/sprite/inverted-dice-4.svg" +dest_files=["res://.godot/imported/inverted-dice-4.svg-fe376335b9d7b45d0ac820a738e318b2.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Dice/sprite/inverted-dice-5.svg b/Dice/sprite/inverted-dice-5.svg new file mode 100644 index 0000000..c520aff --- /dev/null +++ b/Dice/sprite/inverted-dice-5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dice/sprite/inverted-dice-5.svg.import b/Dice/sprite/inverted-dice-5.svg.import new file mode 100644 index 0000000..2f0f3a7 --- /dev/null +++ b/Dice/sprite/inverted-dice-5.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8wd5kc3kmgf6" +path="res://.godot/imported/inverted-dice-5.svg-592ddb32e411b053664c911075f3ebbb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Dice/sprite/inverted-dice-5.svg" +dest_files=["res://.godot/imported/inverted-dice-5.svg-592ddb32e411b053664c911075f3ebbb.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Dice/sprite/inverted-dice-6.svg b/Dice/sprite/inverted-dice-6.svg new file mode 100644 index 0000000..fb1c3b3 --- /dev/null +++ b/Dice/sprite/inverted-dice-6.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Dice/sprite/inverted-dice-6.svg.import b/Dice/sprite/inverted-dice-6.svg.import new file mode 100644 index 0000000..f31ceb0 --- /dev/null +++ b/Dice/sprite/inverted-dice-6.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dx55yffy3sqhv" +path="res://.godot/imported/inverted-dice-6.svg-c2a06b66b5b6011d1cc0a5a034bc0424.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Dice/sprite/inverted-dice-6.svg" +dest_files=["res://.godot/imported/inverted-dice-6.svg-c2a06b66b5b6011d1cc0a5a034bc0424.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..c6bbb7d --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..74a7c37 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b5njcojr7c8x4" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..4a908a0 --- /dev/null +++ b/project.godot @@ -0,0 +1,24 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Yatzee" +config/features=PackedStringArray("4.6", "Mobile") +config/icon="res://icon.svg" + +[physics] + +3d/physics_engine="Jolt Physics" + +[rendering] + +rendering_device/driver.windows="d3d12" +renderer/rendering_method="mobile" diff --git a/yatzee.tscn b/yatzee.tscn new file mode 100644 index 0000000..0b485b8 --- /dev/null +++ b/yatzee.tscn @@ -0,0 +1,3 @@ +[gd_scene format=3 uid="uid://cyn24hcp4husv"] + +[node name="Node2D" type="Node2D" unique_id=854480139]