Browse Source

very basic structure

master
Josh 3 days ago
parent
commit
75518d407c
  1. 2
      .gitattributes
  2. 16
      .gitignore
  3. 33
      Wheel.cs
  4. 50
      game.tscn
  5. 1
      icon.svg
  6. 37
      icon.svg.import
  7. 20
      project.godot
  8. 8
      slots.csproj
  9. 19
      slots.sln
  10. BIN
      sprites/slot-machine1.png
  11. 34
      sprites/slot-machine1.png.import
  12. BIN
      sprites/slot-machine2.png
  13. 34
      sprites/slot-machine2.png.import
  14. BIN
      sprites/slot-machine3.png
  15. 34
      sprites/slot-machine3.png.import
  16. BIN
      sprites/slot-machine4.png
  17. 34
      sprites/slot-machine4.png.import
  18. BIN
      sprites/slot-machine5.png
  19. 34
      sprites/slot-machine5.png.import
  20. BIN
      sprites/slot-symbol1.png
  21. 34
      sprites/slot-symbol1.png.import
  22. BIN
      sprites/slot-symbol2.png
  23. 34
      sprites/slot-symbol2.png.import
  24. BIN
      sprites/slot-symbol3.png
  25. 34
      sprites/slot-symbol3.png.import
  26. BIN
      sprites/slot-symbol4.png
  27. 34
      sprites/slot-symbol4.png.import

2
.gitattributes

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

16
.gitignore

@ -1,13 +1,3 @@
# ---> Godot # Godot 4+ specific ignores
# Godot-specific ignores .godot/
.import/ /android/
export.cfg
export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/

33
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);
}
}
}

50
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")

1
icon.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

After

Width:  |  Height:  |  Size: 994 B

37
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

20
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"

8
slots.csproj

@ -0,0 +1,8 @@
<Project Sdk="Godot.NET.Sdk/4.3.0">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net7.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
</Project>

19
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

BIN
sprites/slot-machine1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

34
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

BIN
sprites/slot-machine2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

34
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

BIN
sprites/slot-machine3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

34
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

BIN
sprites/slot-machine4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

34
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

BIN
sprites/slot-machine5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

34
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

BIN
sprites/slot-symbol1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

34
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

BIN
sprites/slot-symbol2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

34
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

BIN
sprites/slot-symbol3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

34
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

BIN
sprites/slot-symbol4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

34
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
Loading…
Cancel
Save