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 index 822b784..0af181c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,3 @@ -# ---> Godot -# Godot-specific ignores -.import/ -export.cfg -export_presets.cfg - -# Imported translations (automatically generated from CSV files) -*.translation - -# Mono-specific ignores -.mono/ -data_*/ - +# Godot 4+ specific ignores +.godot/ +/android/ diff --git a/Wheel.cs b/Wheel.cs new file mode 100644 index 0000000..7b0e2fc --- /dev/null +++ b/Wheel.cs @@ -0,0 +1,33 @@ +using Godot; +using System; + +public partial class Wheel : Sprite2D +{ + float _speed; + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + _speed = 1000f; + } + + // Called every frame. 'delta' is the elapsed time since the previous frame. + public override void _Process(double delta) + { + + float dt = (float)delta; + + _speed -= dt * 250f; + + if (_speed <= 0) + return; + + this.Position += new Vector2(0f, _speed * dt); + + const float Y_WRAPAROUND = 464; + + if (Position.Y > Y_WRAPAROUND) + { + Position -= new Vector2(0f, Y_WRAPAROUND); + } + } +} \ No newline at end of file diff --git a/game.tscn b/game.tscn new file mode 100644 index 0000000..63c5422 --- /dev/null +++ b/game.tscn @@ -0,0 +1,50 @@ +[gd_scene load_steps=8 format=3 uid="uid://bxnxpcc3hwrrf"] + +[ext_resource type="Texture2D" uid="uid://45e6o8fnn5g6" path="res://sprites/slot-machine1.png" id="1_67gbi"] +[ext_resource type="Texture2D" uid="uid://cl1qwesnw8di7" path="res://sprites/slot-symbol2.png" id="2_epvcj"] +[ext_resource type="Script" path="res://Wheel.cs" id="2_p4s0j"] +[ext_resource type="Texture2D" uid="uid://bqupkucthyf6k" path="res://sprites/slot-symbol1.png" id="3_mqf40"] +[ext_resource type="Texture2D" uid="uid://b7512aakq5qsn" path="res://sprites/slot-symbol3.png" id="4_cdn8h"] +[ext_resource type="Texture2D" uid="uid://b746l2ipvabqy" path="res://sprites/slot-symbol4.png" id="5_gusk3"] +[ext_resource type="Texture2D" uid="uid://dhid2cal2tbv2" path="res://sprites/slot-machine4.png" id="6_u8o3a"] + +[node name="Game" type="Node2D"] + +[node name="slot-reference" type="Sprite2D" parent="."] +position = Vector2(288, 320) +texture = ExtResource("1_67gbi") + +[node name="wheel" type="Sprite2D" parent="slot-reference"] +script = ExtResource("2_p4s0j") + +[node name="top repeat" type="Sprite2D" parent="slot-reference/wheel"] +position = Vector2(-120, -422) +texture = ExtResource("5_gusk3") + +[node name="Slot-symbol1" type="Sprite2D" parent="slot-reference/wheel"] +position = Vector2(-126, -304) +texture = ExtResource("3_mqf40") + +[node name="Slot-symbol2" type="Sprite2D" parent="slot-reference/wheel"] +position = Vector2(-130, -190) +texture = ExtResource("2_epvcj") + +[node name="Slot-symbol3" type="Sprite2D" parent="slot-reference/wheel"] +position = Vector2(-123, -76) +texture = ExtResource("4_cdn8h") + +[node name="top repeat2" type="Sprite2D" parent="slot-reference/wheel"] +position = Vector2(-123, -537) +texture = ExtResource("4_cdn8h") + +[node name="Slot-symbol5" type="Sprite2D" parent="slot-reference/wheel"] +position = Vector2(-120, 34) +texture = ExtResource("5_gusk3") + +[node name="bottom repeat" type="Sprite2D" parent="slot-reference/wheel"] +position = Vector2(-126, 143) +texture = ExtResource("3_mqf40") + +[node name="slot-front" type="Sprite2D" parent="slot-reference"] +position = Vector2(2, -3) +texture = ExtResource("6_u8o3a") diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..fc8939c --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://epeofp26e2dj" +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/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +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..878bf6d --- /dev/null +++ b/project.godot @@ -0,0 +1,20 @@ +; 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="slots" +run/main_scene="res://game.tscn" +config/features=PackedStringArray("4.3", "Forward Plus") +config/icon="res://icon.svg" + +[dotnet] + +project/assembly_name="slots" diff --git a/slots.csproj b/slots.csproj new file mode 100644 index 0000000..53cc1f1 --- /dev/null +++ b/slots.csproj @@ -0,0 +1,8 @@ + + + net6.0 + net7.0 + net8.0 + true + + \ No newline at end of file diff --git a/slots.sln b/slots.sln new file mode 100644 index 0000000..46ff5bc --- /dev/null +++ b/slots.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "slots", "slots.csproj", "{9168DE0B-21A5-4498-8742-11B83548D5A7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9168DE0B-21A5-4498-8742-11B83548D5A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9168DE0B-21A5-4498-8742-11B83548D5A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9168DE0B-21A5-4498-8742-11B83548D5A7}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {9168DE0B-21A5-4498-8742-11B83548D5A7}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {9168DE0B-21A5-4498-8742-11B83548D5A7}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {9168DE0B-21A5-4498-8742-11B83548D5A7}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/sprites/slot-machine1.png b/sprites/slot-machine1.png new file mode 100644 index 0000000..adc3cb8 Binary files /dev/null and b/sprites/slot-machine1.png differ diff --git a/sprites/slot-machine1.png.import b/sprites/slot-machine1.png.import new file mode 100644 index 0000000..7fbbce6 --- /dev/null +++ b/sprites/slot-machine1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://45e6o8fnn5g6" +path="res://.godot/imported/slot-machine1.png-0db8871774c7f10e5e6d59423c88a7b8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-machine1.png" +dest_files=["res://.godot/imported/slot-machine1.png-0db8871774c7f10e5e6d59423c88a7b8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-machine2.png b/sprites/slot-machine2.png new file mode 100644 index 0000000..b6112a4 Binary files /dev/null and b/sprites/slot-machine2.png differ diff --git a/sprites/slot-machine2.png.import b/sprites/slot-machine2.png.import new file mode 100644 index 0000000..55e9c91 --- /dev/null +++ b/sprites/slot-machine2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b415y1nrb3coj" +path="res://.godot/imported/slot-machine2.png-1db0cb7de540d31cd7dd0c120b77e101.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-machine2.png" +dest_files=["res://.godot/imported/slot-machine2.png-1db0cb7de540d31cd7dd0c120b77e101.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-machine3.png b/sprites/slot-machine3.png new file mode 100644 index 0000000..478ba8a Binary files /dev/null and b/sprites/slot-machine3.png differ diff --git a/sprites/slot-machine3.png.import b/sprites/slot-machine3.png.import new file mode 100644 index 0000000..5f4e4d3 --- /dev/null +++ b/sprites/slot-machine3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtgkkejfrfijc" +path="res://.godot/imported/slot-machine3.png-e752c17784f6a3a6a54dd06abcee82b5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-machine3.png" +dest_files=["res://.godot/imported/slot-machine3.png-e752c17784f6a3a6a54dd06abcee82b5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-machine4.png b/sprites/slot-machine4.png new file mode 100644 index 0000000..9df9c96 Binary files /dev/null and b/sprites/slot-machine4.png differ diff --git a/sprites/slot-machine4.png.import b/sprites/slot-machine4.png.import new file mode 100644 index 0000000..2fdc91e --- /dev/null +++ b/sprites/slot-machine4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dhid2cal2tbv2" +path="res://.godot/imported/slot-machine4.png-3e55bfe35541be00f7e80be77963dae4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-machine4.png" +dest_files=["res://.godot/imported/slot-machine4.png-3e55bfe35541be00f7e80be77963dae4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-machine5.png b/sprites/slot-machine5.png new file mode 100644 index 0000000..6ed7e33 Binary files /dev/null and b/sprites/slot-machine5.png differ diff --git a/sprites/slot-machine5.png.import b/sprites/slot-machine5.png.import new file mode 100644 index 0000000..6cbf6a6 --- /dev/null +++ b/sprites/slot-machine5.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://buw70oehx68hw" +path="res://.godot/imported/slot-machine5.png-84a8837a433361280cae64948664ba9a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-machine5.png" +dest_files=["res://.godot/imported/slot-machine5.png-84a8837a433361280cae64948664ba9a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-symbol1.png b/sprites/slot-symbol1.png new file mode 100644 index 0000000..9077901 Binary files /dev/null and b/sprites/slot-symbol1.png differ diff --git a/sprites/slot-symbol1.png.import b/sprites/slot-symbol1.png.import new file mode 100644 index 0000000..e9c7343 --- /dev/null +++ b/sprites/slot-symbol1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bqupkucthyf6k" +path="res://.godot/imported/slot-symbol1.png-112584ad197cfe60b649a7c8ec359c57.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-symbol1.png" +dest_files=["res://.godot/imported/slot-symbol1.png-112584ad197cfe60b649a7c8ec359c57.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-symbol2.png b/sprites/slot-symbol2.png new file mode 100644 index 0000000..44fb843 Binary files /dev/null and b/sprites/slot-symbol2.png differ diff --git a/sprites/slot-symbol2.png.import b/sprites/slot-symbol2.png.import new file mode 100644 index 0000000..98535b3 --- /dev/null +++ b/sprites/slot-symbol2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cl1qwesnw8di7" +path="res://.godot/imported/slot-symbol2.png-1583861ad4568db66c67a72d2418382a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-symbol2.png" +dest_files=["res://.godot/imported/slot-symbol2.png-1583861ad4568db66c67a72d2418382a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-symbol3.png b/sprites/slot-symbol3.png new file mode 100644 index 0000000..f328dc1 Binary files /dev/null and b/sprites/slot-symbol3.png differ diff --git a/sprites/slot-symbol3.png.import b/sprites/slot-symbol3.png.import new file mode 100644 index 0000000..66dffd5 --- /dev/null +++ b/sprites/slot-symbol3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b7512aakq5qsn" +path="res://.godot/imported/slot-symbol3.png-1b313b4e8fefcdd028c5950af0574b07.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-symbol3.png" +dest_files=["res://.godot/imported/slot-symbol3.png-1b313b4e8fefcdd028c5950af0574b07.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/slot-symbol4.png b/sprites/slot-symbol4.png new file mode 100644 index 0000000..7025b5e Binary files /dev/null and b/sprites/slot-symbol4.png differ diff --git a/sprites/slot-symbol4.png.import b/sprites/slot-symbol4.png.import new file mode 100644 index 0000000..0877601 --- /dev/null +++ b/sprites/slot-symbol4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b746l2ipvabqy" +path="res://.godot/imported/slot-symbol4.png-6a8ada69d03d68fee5694feaaa49f8a5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/slot-symbol4.png" +dest_files=["res://.godot/imported/slot-symbol4.png-6a8ada69d03d68fee5694feaaa49f8a5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1