commit f35baec2ee6ade8ef9de127c78bed011a5e03a03 Author: kevadesu Date: Mon Apr 14 02:27:59 2025 +0200 start von Commits 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/DiscordRPC.gd b/DiscordRPC.gd new file mode 100644 index 0000000..2fb61cf --- /dev/null +++ b/DiscordRPC.gd @@ -0,0 +1,15 @@ +extends Node + +func _ready(): + DiscordRPC.app_id = 1351181457938186354 # Application ID + DiscordRPC.details = "projektLuzid" + DiscordRPC.state = ProjectSettings.get_setting("application/config/name") + DiscordRPC.large_image = "example_game" # Image key from "Art Assets" + DiscordRPC.large_image_text = "TEST!" + DiscordRPC.small_image = "boss" # Image key from "Art Assets" + DiscordRPC.small_image_text = "TEST" + + DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system()) # "02:46 elapsed" + # DiscordRPC.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time / "01:00:00 remaining" + + DiscordRPC.refresh() # Always refresh after changing the values! diff --git a/DiscordRPC.gd.uid b/DiscordRPC.gd.uid new file mode 100644 index 0000000..4f58958 --- /dev/null +++ b/DiscordRPC.gd.uid @@ -0,0 +1 @@ +uid://fd6uc4j11t5a diff --git a/InstrumentSans-Italic-VariableFont_wdth,wght.ttf b/InstrumentSans-Italic-VariableFont_wdth,wght.ttf new file mode 100644 index 0000000..a8eb12e Binary files /dev/null and b/InstrumentSans-Italic-VariableFont_wdth,wght.ttf differ diff --git a/InstrumentSans-Italic-VariableFont_wdth,wght.ttf.import b/InstrumentSans-Italic-VariableFont_wdth,wght.ttf.import new file mode 100644 index 0000000..2051cfd --- /dev/null +++ b/InstrumentSans-Italic-VariableFont_wdth,wght.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://c0deno8y61t32" +path="res://.godot/imported/InstrumentSans-Italic-VariableFont_wdth,wght.ttf-3da43071b972ad7fffdc3c068311e047.fontdata" + +[deps] + +source_file="res://InstrumentSans-Italic-VariableFont_wdth,wght.ttf" +dest_files=["res://.godot/imported/InstrumentSans-Italic-VariableFont_wdth,wght.ttf-3da43071b972ad7fffdc3c068311e047.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/InstrumentSans-VariableFont_wdth,wght.ttf b/InstrumentSans-VariableFont_wdth,wght.ttf new file mode 100644 index 0000000..1cc6612 Binary files /dev/null and b/InstrumentSans-VariableFont_wdth,wght.ttf differ diff --git a/InstrumentSans-VariableFont_wdth,wght.ttf.import b/InstrumentSans-VariableFont_wdth,wght.ttf.import new file mode 100644 index 0000000..e19dc58 --- /dev/null +++ b/InstrumentSans-VariableFont_wdth,wght.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://rswq6vrwr2nx" +path="res://.godot/imported/InstrumentSans-VariableFont_wdth,wght.ttf-b2433b142cf6031f64aaf2de88699e1f.fontdata" + +[deps] + +source_file="res://InstrumentSans-VariableFont_wdth,wght.ttf" +dest_files=["res://.godot/imported/InstrumentSans-VariableFont_wdth,wght.ttf-b2433b142cf6031f64aaf2de88699e1f.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/InstrumentSerif-Italic.ttf b/InstrumentSerif-Italic.ttf new file mode 100644 index 0000000..32c6b8e Binary files /dev/null and b/InstrumentSerif-Italic.ttf differ diff --git a/InstrumentSerif-Italic.ttf.import b/InstrumentSerif-Italic.ttf.import new file mode 100644 index 0000000..1359302 --- /dev/null +++ b/InstrumentSerif-Italic.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dhn2iwihgai4c" +path="res://.godot/imported/InstrumentSerif-Italic.ttf-bd90659153ae8d4aedbe7c1b02a78249.fontdata" + +[deps] + +source_file="res://InstrumentSerif-Italic.ttf" +dest_files=["res://.godot/imported/InstrumentSerif-Italic.ttf-bd90659153ae8d4aedbe7c1b02a78249.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/InstrumentSerif-Regular.ttf b/InstrumentSerif-Regular.ttf new file mode 100644 index 0000000..7efd936 Binary files /dev/null and b/InstrumentSerif-Regular.ttf differ diff --git a/InstrumentSerif-Regular.ttf.import b/InstrumentSerif-Regular.ttf.import new file mode 100644 index 0000000..2578283 --- /dev/null +++ b/InstrumentSerif-Regular.ttf.import @@ -0,0 +1,35 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bulwhh7xjiip0" +path="res://.godot/imported/InstrumentSerif-Regular.ttf-b87f4977a56bc3c53a6f935dc4b42962.fontdata" + +[deps] + +source_file="res://InstrumentSerif-Regular.ttf" +dest_files=["res://.godot/imported/InstrumentSerif-Regular.ttf-b87f4977a56bc3c53a6f935dc4b42962.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=4 +keep_rounding_remainders=true +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/Level_Core.tscn b/Level_Core.tscn new file mode 100644 index 0000000..4b1f72c --- /dev/null +++ b/Level_Core.tscn @@ -0,0 +1,159 @@ +[gd_scene load_steps=10 format=3 uid="uid://bn20cqfwvm2oe"] + +[ext_resource type="Script" uid="uid://wr38f8q1w7yq" path="res://pause_menu.gd" id="1_fwt2i"] +[ext_resource type="PackedScene" uid="uid://bs6yq6gy7k2sb" path="res://player.tscn" id="1_lsi31"] +[ext_resource type="FontFile" uid="uid://rswq6vrwr2nx" path="res://InstrumentSans-VariableFont_wdth,wght.ttf" id="2_fq2vn"] +[ext_resource type="PackedScene" uid="uid://daoyebc0vm7sd" path="res://pause_menu.tscn" id="3_i8tni"] + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_rv2mx"] +sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) +ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1) + +[sub_resource type="Sky" id="Sky_lsi31"] +sky_material = SubResource("ProceduralSkyMaterial_rv2mx") + +[sub_resource type="Environment" id="Environment_fq2vn"] +background_mode = 2 +sky = SubResource("Sky_lsi31") +tonemap_mode = 2 +glow_enabled = true + +[sub_resource type="PlaneMesh" id="PlaneMesh_rv2mx"] +size = Vector2(10, 10) + +[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_lsi31"] +data = PackedVector3Array(5, 0, 5, -5, 0, 5, 5, 0, -5, -5, 0, 5, -5, 0, -5, 5, 0, -5) + +[node name="LevelCore" type="Node3D"] +script = ExtResource("1_fwt2i") + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_fq2vn") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(-0.866023, -0.433016, 0.250001, 0, 0.499998, 0.866027, -0.500003, 0.749999, -0.43301, 0, 0, 0) +shadow_enabled = true + +[node name="MeshInstance3D2" type="MeshInstance3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 0.976672, -0.214735, 0, 0.214735, 0.976672, 0, 1.05, -9.898) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D2"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D2/StaticBody3D"] +shape = SubResource("ConcavePolygonShape3D_lsi31") + +[node name="MeshInstance3D5" type="MeshInstance3D" parent="."] +transform = Transform3D(1, -1.31134e-07, 4.37114e-08, -4.37114e-08, 4.37114e-08, 1, -1.31134e-07, -1, 4.37114e-08, 4.76837e-07, 5, 5) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D3") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D5"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D5/StaticBody3D"] +shape = SubResource("ConcavePolygonShape3D_lsi31") + +[node name="MeshInstance3D4" type="MeshInstance3D" parent="."] +transform = Transform3D(4.37114e-08, 1, -8.74228e-08, 1, -4.37114e-08, 0, -3.82137e-15, -8.74228e-08, -1, -5, 5, 0) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D3") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D4"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D4/StaticBody3D"] +shape = SubResource("ConcavePolygonShape3D_lsi31") + +[node name="MeshInstance3D3" type="MeshInstance3D" parent="."] +transform = Transform3D(-4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0, 1, 5, 5, 0) +mesh = SubResource("PlaneMesh_rv2mx") +skeleton = NodePath("../MeshInstance3D") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D3"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D3/StaticBody3D"] +shape = SubResource("ConcavePolygonShape3D_lsi31") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +mesh = SubResource("PlaneMesh_rv2mx") + +[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="MeshInstance3D/StaticBody3D"] +shape = SubResource("ConcavePolygonShape3D_lsi31") + +[node name="Player" parent="." instance=ExtResource("1_lsi31")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 1.3736) +top_level = true +linear_damp = 3.0 + +[node name="Label3D3" type="Label3D" parent="."] +transform = Transform3D(0.971861, -0.161859, -0.171136, 0.212847, 0.914655, 0.34366, 0.100906, -0.370415, 0.923369, 0.568496, 0.970887, 0.103196) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "Drücke W um dich vorwärts zu bewegen +Drücke A um nach links zu bewegen +Drücke S um dich rückwarts zu bewegen +Drücke D um nach rechts zu bewegen" +font = ExtResource("2_fq2vn") + +[node name="Label3D4" type="Label3D" parent="."] +transform = Transform3D(0.840144, -0.185681, 0.509588, -0.0870775, 0.881203, 0.464649, -0.535327, -0.434746, 0.724169, -1.7922, 0.550958, 0.267265) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "Nutze die Maus um die +Kamera zu bewegen" +font = ExtResource("2_fq2vn") + +[node name="Label3D" type="Label3D" parent="."] +transform = Transform3D(0.838238, -0.221545, -0.498273, 0.249063, 0.968418, -0.0115887, 0.485104, -0.114387, 0.866943, 0.590198, 2.30211, 0) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "Press W to move forwards +Press A to move left +Press S to move backwards +Press D to move right" +font = ExtResource("2_fq2vn") + +[node name="Label3D2" type="Label3D" parent="."] +transform = Transform3D(0.898036, -0.118361, 0.423701, -0.130811, 0.847719, 0.514063, -0.420025, -0.517071, 0.745799, -1.80393, 2.14448, -0.355839) +offset = Vector2(1, 0) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "Use your mouse to +move the camera" +font = ExtResource("2_fq2vn") + +[node name="Label3D7" type="Label3D" parent="."] +transform = Transform3D(0.940367, 0.267816, 0.209726, -0.311519, 0.925659, 0.214735, -0.136625, -0.267264, 0.953889, 0, 1.50331, -4.83472) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "To open the menu, press Q" +font = ExtResource("2_fq2vn") + +[node name="Label3D8" type="Label3D" parent="."] +transform = Transform3D(0.940367, 0.267816, 0.209726, -0.311519, 0.925659, 0.214735, -0.136625, -0.267264, 0.953889, 0, 1.86351, -4.91946) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "If you're stuck, press R to reset" +font = ExtResource("2_fq2vn") + +[node name="Label3D6" type="Label3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.45129, -2.41736) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "To lock/recapture the cursor, press Shift+G" +font = ExtResource("2_fq2vn") + +[node name="Label3D5" type="Label3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.8115, -2.5021) +modulate = Color(0.943031, 0.787658, 0.994854, 1) +outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1) +text = "To unlock/free the cursor, press Shift+Enter" +font = ExtResource("2_fq2vn") + +[node name="PauseMenu" parent="." instance=ExtResource("3_i8tni")] +visible = false diff --git a/ProjektLuzidLogo.png b/ProjektLuzidLogo.png new file mode 100644 index 0000000..49483c0 Binary files /dev/null and b/ProjektLuzidLogo.png differ diff --git a/ProjektLuzidLogo.png.import b/ProjektLuzidLogo.png.import new file mode 100644 index 0000000..016bcfa --- /dev/null +++ b/ProjektLuzidLogo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://0hcyy1njk5tu" +path="res://.godot/imported/ProjektLuzidLogo.png-2fb04efa1a6e4a71c5850f10cac84350.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ProjektLuzidLogo.png" +dest_files=["res://.godot/imported/ProjektLuzidLogo.png-2fb04efa1a6e4a71c5850f10cac84350.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/ProjektLuzidLogo.svg b/ProjektLuzidLogo.svg new file mode 100644 index 0000000..78851d7 --- /dev/null +++ b/ProjektLuzidLogo.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ProjektLuzidLogo.svg.import b/ProjektLuzidLogo.svg.import new file mode 100644 index 0000000..cb51435 --- /dev/null +++ b/ProjektLuzidLogo.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://fad7xr2jj2nu" +path="res://.godot/imported/ProjektLuzidLogo.svg-6b4418cd7d6827c99660ac42e54c65e6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ProjektLuzidLogo.svg" +dest_files=["res://.godot/imported/ProjektLuzidLogo.svg-6b4418cd7d6827c99660ac42e54c65e6.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/Screenshot From 2025-03-17 14-25-26.png b/Screenshot From 2025-03-17 14-25-26.png new file mode 100644 index 0000000..f0a8972 Binary files /dev/null and b/Screenshot From 2025-03-17 14-25-26.png differ diff --git a/Screenshot From 2025-03-17 14-25-26.png.import b/Screenshot From 2025-03-17 14-25-26.png.import new file mode 100644 index 0000000..b8406e1 --- /dev/null +++ b/Screenshot From 2025-03-17 14-25-26.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://btbycsdclf56y" +path="res://.godot/imported/Screenshot From 2025-03-17 14-25-26.png-0164230af794a0770dffad19630b8b58.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Screenshot From 2025-03-17 14-25-26.png" +dest_files=["res://.godot/imported/Screenshot From 2025-03-17 14-25-26.png-0164230af794a0770dffad19630b8b58.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/addons/discord-rpc-gd/Debug.svg b/addons/discord-rpc-gd/Debug.svg new file mode 100644 index 0000000..7987166 --- /dev/null +++ b/addons/discord-rpc-gd/Debug.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/addons/discord-rpc-gd/Debug.svg.import b/addons/discord-rpc-gd/Debug.svg.import new file mode 100644 index 0000000..4596fbd --- /dev/null +++ b/addons/discord-rpc-gd/Debug.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ufh1hha1ehui" +path="res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-rpc-gd/Debug.svg" +dest_files=["res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.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/addons/discord-rpc-gd/Logo_V2_No_Bg.png b/addons/discord-rpc-gd/Logo_V2_No_Bg.png new file mode 100644 index 0000000..fb6c700 Binary files /dev/null and b/addons/discord-rpc-gd/Logo_V2_No_Bg.png differ diff --git a/addons/discord-rpc-gd/Logo_V2_No_Bg.png.import b/addons/discord-rpc-gd/Logo_V2_No_Bg.png.import new file mode 100644 index 0000000..a1f1230 --- /dev/null +++ b/addons/discord-rpc-gd/Logo_V2_No_Bg.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csl0e2px0cwc1" +path="res://.godot/imported/Logo_V2_No_Bg.png-ed667fb599fe1e17ebcfc361ff7c9c93.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-rpc-gd/Logo_V2_No_Bg.png" +dest_files=["res://.godot/imported/Logo_V2_No_Bg.png-ed667fb599fe1e17ebcfc361ff7c9c93.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/addons/discord-rpc-gd/READ_ME_PLEASE.txt b/addons/discord-rpc-gd/READ_ME_PLEASE.txt new file mode 100644 index 0000000..a98427b --- /dev/null +++ b/addons/discord-rpc-gd/READ_ME_PLEASE.txt @@ -0,0 +1,7 @@ +MINIMUM GODOT VERSION: 4.2 + +PLEASE ACTIVATE THE PLUGIN UNDER Project -> Project Settings... -> Plugins -> DiscordRPC -> Status +IGNORE THE RED ERRORS ON THE FIRST 2 RESTARTS +READ THE TUTORIAL LINKED IN THE WINDOW THAT WILL OPEN ON PLUGIN ENABLE + +If nothing works, enable the plugin and delete /addons/discord-rpc-gd/bin/.gdignore diff --git a/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension b/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension new file mode 100644 index 0000000..27e2845 --- /dev/null +++ b/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension @@ -0,0 +1,29 @@ +[configuration] + +entry_symbol = "discordrpcgd_library_init" +compatibility_minimum = 4.1 + +[libraries] + +macos.debug = "macos/libdiscord_game_sdk_binding_debug.dylib" +macos.release = "macos/libdiscord_game_sdk_binding.dylib" +windows.debug.x86_64 = "windows/discord_game_sdk_binding_debug.dll" +windows.release.x86_64 = "windows/discord_game_sdk_binding.dll" +linux.debug.x86_64 = "linux/libdiscord_game_sdk_binding_debug.so" +linux.release.x86_64 = "linux/libdiscord_game_sdk_binding.so" +linux.debug.arm64 = "linux/libdiscord_game_sdk_binding_debug.so" +linux.release.arm64 = "linux/libdiscord_game_sdk_binding.so" +linux.debug.rv64 = "linux/libdiscord_game_sdk_binding_debug.so" +linux.release.rv64 = "linux/libdiscord_game_sdk_binding.so" + +[dependencies] + +macos = { "macos/libdiscord_game_sdk.dylib": "" } +windows.debug.x86_64 = { "windows/discord_game_sdk.dll": "" } +windows.release.x86_64 = { "windows/discord_game_sdk.dll": "" } +linux.debug.x86_64 = { "linux/libdiscord_game_sdk.so": "" } +linux.release.x86_64 = { "linux/libdiscord_game_sdk.so": "" } +linux.debug.arm64 = { "linux/libdiscord_game_sdk.so": "" } +linux.release.arm64 = { "linux/libdiscord_game_sdk.so": "" } +linux.debug.rv64 = { "linux/libdiscord_game_sdk.so": "" } +linux.release.rv64 = { "linux/libdiscord_game_sdk.so": "" } diff --git a/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension.uid b/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension.uid new file mode 100644 index 0000000..fe52ba3 --- /dev/null +++ b/addons/discord-rpc-gd/bin/discord-rpc-gd.gdextension.uid @@ -0,0 +1 @@ +uid://dgohlxm6f3r83 diff --git a/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk.so b/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk.so new file mode 100644 index 0000000..9dacf94 Binary files /dev/null and b/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk.so differ diff --git a/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk_binding.so b/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk_binding.so new file mode 100644 index 0000000..f9863c4 Binary files /dev/null and b/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk_binding.so differ diff --git a/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk_binding_debug.so b/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk_binding_debug.so new file mode 100644 index 0000000..89bf7da Binary files /dev/null and b/addons/discord-rpc-gd/bin/linux/libdiscord_game_sdk_binding_debug.so differ diff --git a/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk.dylib b/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk.dylib new file mode 100644 index 0000000..2cc726d Binary files /dev/null and b/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk.dylib differ diff --git a/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk_binding.dylib b/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk_binding.dylib new file mode 100644 index 0000000..cfcd1a7 Binary files /dev/null and b/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk_binding.dylib differ diff --git a/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib b/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib new file mode 100644 index 0000000..082e396 Binary files /dev/null and b/addons/discord-rpc-gd/bin/macos/libdiscord_game_sdk_binding_debug.dylib differ diff --git a/addons/discord-rpc-gd/bin/windows/discord_game_sdk.dll b/addons/discord-rpc-gd/bin/windows/discord_game_sdk.dll new file mode 100644 index 0000000..be946ea Binary files /dev/null and b/addons/discord-rpc-gd/bin/windows/discord_game_sdk.dll differ diff --git a/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding.dll b/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding.dll new file mode 100644 index 0000000..77ffef2 Binary files /dev/null and b/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding.dll differ diff --git a/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll b/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll new file mode 100644 index 0000000..2b52a76 Binary files /dev/null and b/addons/discord-rpc-gd/bin/windows/discord_game_sdk_binding_debug.dll differ diff --git a/addons/discord-rpc-gd/bin/windows/discord_game_sdk_x86.dll b/addons/discord-rpc-gd/bin/windows/discord_game_sdk_x86.dll new file mode 100644 index 0000000..45b9bb1 Binary files /dev/null and b/addons/discord-rpc-gd/bin/windows/discord_game_sdk_x86.dll differ diff --git a/addons/discord-rpc-gd/bin/windows/~discord_game_sdk_binding_debug.dll b/addons/discord-rpc-gd/bin/windows/~discord_game_sdk_binding_debug.dll new file mode 100644 index 0000000..2b52a76 Binary files /dev/null and b/addons/discord-rpc-gd/bin/windows/~discord_game_sdk_binding_debug.dll differ diff --git a/addons/discord-rpc-gd/example.gd b/addons/discord-rpc-gd/example.gd new file mode 100644 index 0000000..95f2926 --- /dev/null +++ b/addons/discord-rpc-gd/example.gd @@ -0,0 +1,38 @@ +class_name DiscordRPCTutorial +extends Node + +## 1. Put the addons/ folder in your Godot project[br] +## 2. Enable the addon in your Project Settings under "Plugins" and "DiscordRPC". [br](if it doesn't show up restart your project and try again)[br] +## 3. Restart your project[br] +## 4. Create an Application under https://discord.com/developers/applications and get the Application ID br] +## 5. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys[br] +## +## This is your [code]_ready()[/code] function wich could be anywhere +## [codeblock] +## func _ready(): +## # Application ID +## DiscordRPC.app_id = 1099618430065324082 +## # this is boolean if everything worked +## print("Discord working: " + str(DiscordRPC.get_is_discord_working())) +## # Set the first custom text row of the activity here +## DiscordRPC.details = "A demo activity by vaporvee#1231" +## # Set the second custom text row of the activity here +## DiscordRPC.state = "Checkpoint 23/23" +## # Image key for small image from "Art Assets" from the Discord Developer website +## DiscordRPC.large_image = "game" +## # Tooltip text for the large image +## DiscordRPC.large_image_text = "Try it now!" +## # Image key for large image from "Art Assets" from the Discord Developer website +## DiscordRPC.small_image = "boss" +## # Tooltip text for the small image +## DiscordRPC.small_image_text = "Fighting the end boss! D:" +## # "02:41 elapsed" timestamp for the activity +## DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system()) +## # "59:59 remaining" timestamp for the activity +## DiscordRPC.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 +## # Always refresh after changing the values! +## DiscordRPC.refresh() +## [/codeblock] +## +## @tutorial(More information here): https://github.com/vaporvee/discord-rpc-godot/wiki/Quick-start +## @tutorial(Make your Application ID and else here): https://discord.com/developers/applications diff --git a/addons/discord-rpc-gd/example.gd.uid b/addons/discord-rpc-gd/example.gd.uid new file mode 100644 index 0000000..573615e --- /dev/null +++ b/addons/discord-rpc-gd/example.gd.uid @@ -0,0 +1 @@ +uid://qal05hig1a7b diff --git a/addons/discord-rpc-gd/logo.png b/addons/discord-rpc-gd/logo.png new file mode 100644 index 0000000..fb6c700 Binary files /dev/null and b/addons/discord-rpc-gd/logo.png differ diff --git a/addons/discord-rpc-gd/logo.png.import b/addons/discord-rpc-gd/logo.png.import new file mode 100644 index 0000000..1cce19a --- /dev/null +++ b/addons/discord-rpc-gd/logo.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csl0e2px0cwc1" +path="res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-rpc-gd/logo.png" +dest_files=["res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.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/addons/discord-rpc-gd/nodes/Debug.tscn b/addons/discord-rpc-gd/nodes/Debug.tscn new file mode 100644 index 0000000..6953f83 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/Debug.tscn @@ -0,0 +1,267 @@ +[gd_scene load_steps=9 format=3 uid="uid://c1slhdnlsv2qt"] + +[ext_resource type="Texture2D" uid="uid://dnfq6kug4x6o2" path="res://addons/discord-rpc-gd/nodes/assets/Checked.svg" id="2_q6tao"] +[ext_resource type="Texture2D" uid="uid://compmm3kviqqe" path="res://addons/discord-rpc-gd/nodes/assets/Unchecked.svg" id="3_5cyem"] +[ext_resource type="Texture2D" uid="uid://dtc6ckladq0td" path="res://addons/discord-rpc-gd/nodes/assets/circle.svg" id="3_goflf"] + +[sub_resource type="GDScript" id="GDScript_ak1tp"] +resource_name = "Debug" +script/source = "extends Node + +func _ready(): + DiscordRPC.connect(\"activity_join_request\",_on_activity_join_request) + +func _process(_delta): + if(DiscordRPC.get_is_discord_working()): + $Panel/TextureRect.self_modulate = Color(\"#3eff8d\") + $Panel/TextureRect/AnimationPlayer.play(\"pulsate\") + debug_text_update() + else: + $Panel/TextureRect.self_modulate = Color(\"#797979\") + $Panel/TextureRect/AnimationPlayer.stop() + debug_text_update() + + +func debug_text_update(): + $Panel/Info.text = \"Application ID : {id} +Details: {details} +State: {state} + +Large image key: {lkey} +Large image text: {ltext} +Small image key: {skey} +Small image text: {stext} + +Start timestamp: {stimestamp} +End timestamp: {etimestamp} + +Party ID: {partyid} +Current party size: {cpartysize} +Max party size: {mpartysize} +Match secret: {msecret} +Join secret: {jsecret} +Spectate secret: {ssecret} +Is party public: {ppublic} (needs to be activated in Discord client settings) + +Is instanced: {instanced} +\" + $Panel/Info.text = $Panel/Info.text.replace(\"{ppublic}\",str(DiscordRPC.is_public_party)).replace(\"{instanced}\",str(DiscordRPC.instanced)).replace(\"{ssecret}\",DiscordRPC.spectate_secret).replace(\"{jsecret}\",DiscordRPC.join_secret).replace(\"{msecret}\",DiscordRPC.match_secret).replace(\"{mpartysize}\",str(DiscordRPC.max_party_size)).replace(\"{cpartysize}\",str(DiscordRPC.current_party_size)).replace(\"{partyid}\",DiscordRPC.party_id).replace(\"{id}\",str(DiscordRPC.app_id)).replace(\"{details}\",DiscordRPC.details).replace(\"{state}\",DiscordRPC.state).replace(\"{lkey}\",DiscordRPC.large_image).replace(\"{ltext}\",DiscordRPC.large_image_text).replace(\"{skey}\",DiscordRPC.small_image).replace(\"{stext}\",DiscordRPC.small_image_text).replace(\"{stimestamp}\",str(DiscordRPC.start_timestamp)).replace(\"{etimestamp}\",str(DiscordRPC.end_timestamp)) + +var user_request = {}; + +func _on_activity_join_request(user_requesting): + print(user_requesting) + user_request = user_requesting + +func _on_accept_join_request_pressed(): + if(!user_request.is_empty()): + DiscordRPC.accept_join_request(user_request.id) + +func _on_invite_with_user_id_text_submitted(new_text): + DiscordRPC.send_invite(int(new_text),true,\"this is a test invite sent from godot\") + +func _on_accept_with_user_id_text_submitted(new_text): + DiscordRPC.accept_invite(int(new_text)) + +func _on_print_current_user_on_console_pressed(): + print(DiscordRPC.get_current_user()) + +func _on_toggle_sdk_toggled(button_pressed): + if(button_pressed): + DiscordRPC.unclear() + else: + DiscordRPC.clear(false) + +func _on_print_friends_pressed(): + print(DiscordRPC.get_all_relationships()) +" + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8abo6"] + +[sub_resource type="Animation" id="Animation_mmtmn"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0.4), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(0.5, 0.5)] +} + +[sub_resource type="Animation" id="Animation_5u02v"] +resource_name = "pulsate" +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath(".:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.5, 1), +"transitions": PackedFloat32Array(1, 1, 1), +"update": 0, +"values": [Vector2(0.5, 0.5), Vector2(0.8, 0.8), Vector2(0.5, 0.5)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_a7ofc"] +_data = { +"RESET": SubResource("Animation_mmtmn"), +"pulsate": SubResource("Animation_5u02v") +} + +[node name="DebugNodeGroup" type="Node"] +editor_description = "This is a Debug Node wich will show (only if the project runs) some usefull info and buttons/input" +script = SubResource("GDScript_ak1tp") + +[node name="Panel" type="Panel" parent="."] +anchors_preset = -1 +anchor_right = 0.373 +anchor_bottom = 1.0 +offset_left = -5.0 +offset_right = 0.303955 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Info" type="RichTextLabel" parent="Panel"] +layout_mode = 0 +offset_left = 12.0 +offset_top = 21.0 +offset_right = 429.0 +offset_bottom = 461.0 +theme_override_font_sizes/normal_font_size = 14 +text = "Application ID : {id} +Details: {details} +State: {state} + +Large image key: {lkey} +Large image text: {ltext} +Small image key: {skey} +Small image text: {stext} + +Start timestamp: {stimestamp} +End timestamp: {etimestamp} + +Party ID: {partyid} +Current party size: {cpartysize} +Max party size: {mpartysize} +Match secret: {msecret} +Join secret: {jsecret} +Spectate secret: {ssecret} +Is party public: {ppublic} (needs to be activated in Discord client settings) + +Is instanced: {instanced} +" +fit_content = true + +[node name="PrintCurrentUserOnConsole" type="Button" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 12.0 +offset_top = 138.375 +offset_right = 245.0 +offset_bottom = 171.375 +grow_vertical = 2 +text = "Print current user on console" + +[node name="PrintFriends" type="Button" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 12.0 +offset_top = 176.5 +offset_right = 204.0 +offset_bottom = 207.5 +grow_vertical = 2 +text = "Print friends on console" + +[node name="AcceptJoinRequest" type="Button" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 12.0 +offset_top = 212.875 +offset_right = 154.0 +offset_bottom = 243.875 +grow_vertical = 2 +text = "ACCEPT REQUEST" + +[node name="InviteWithUserID" type="LineEdit" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 11.0 +offset_top = 250.375 +offset_right = 210.0 +offset_bottom = 281.375 +grow_vertical = 2 +size_flags_horizontal = 0 +placeholder_text = "Invite with user_id here" + +[node name="AcceptWithUserID" type="LineEdit" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 11.0 +offset_top = 286.875 +offset_right = 260.0 +offset_bottom = 317.875 +grow_vertical = 2 +placeholder_text = "Accept Invite with user_id here" + +[node name="ToggleSDK" type="CheckButton" parent="Panel"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_left = 298.0 +offset_top = 157.375 +offset_right = 1144.0 +offset_bottom = 665.375 +grow_vertical = 2 +scale = Vector2(0.05, 0.05) +theme_override_icons/checked = ExtResource("2_q6tao") +theme_override_icons/unchecked = ExtResource("3_5cyem") +theme_override_styles/focus = SubResource("StyleBoxEmpty_8abo6") +button_pressed = true + +[node name="TextureRect" type="TextureRect" parent="Panel"] +self_modulate = Color(0.47451, 0.47451, 0.47451, 1) +layout_mode = 1 +anchors_preset = -1 +anchor_left = 0.88 +anchor_top = 0.762 +anchor_right = 0.88 +anchor_bottom = 0.762 +offset_left = -28.8 +offset_top = -28.776 +offset_right = 28.0841 +offset_bottom = 28.1082 +grow_horizontal = 2 +grow_vertical = 2 +scale = Vector2(0.5, 0.5) +pivot_offset = Vector2(29.0693, 29.0693) +texture = ExtResource("3_goflf") + +[node name="AnimationPlayer" type="AnimationPlayer" parent="Panel/TextureRect"] +libraries = { +"": SubResource("AnimationLibrary_a7ofc") +} + +[connection signal="pressed" from="Panel/PrintCurrentUserOnConsole" to="." method="_on_print_current_user_on_console_pressed"] +[connection signal="pressed" from="Panel/PrintFriends" to="." method="_on_print_friends_pressed"] +[connection signal="pressed" from="Panel/AcceptJoinRequest" to="." method="_on_accept_join_request_pressed"] +[connection signal="text_submitted" from="Panel/InviteWithUserID" to="." method="_on_invite_with_user_id_text_submitted"] +[connection signal="text_submitted" from="Panel/AcceptWithUserID" to="." method="_on_accept_with_user_id_text_submitted"] +[connection signal="toggled" from="Panel/ToggleSDK" to="." method="_on_toggle_sdk_toggled"] diff --git a/addons/discord-rpc-gd/nodes/assets/Checked.svg b/addons/discord-rpc-gd/nodes/assets/Checked.svg new file mode 100644 index 0000000..d37a1c2 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/assets/Checked.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/addons/discord-rpc-gd/nodes/assets/Checked.svg.import b/addons/discord-rpc-gd/nodes/assets/Checked.svg.import new file mode 100644 index 0000000..9913c3c --- /dev/null +++ b/addons/discord-rpc-gd/nodes/assets/Checked.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dnfq6kug4x6o2" +path="res://.godot/imported/Checked.svg-80704e37f30c24e2ec3dfc0955f5f21c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-rpc-gd/nodes/assets/Checked.svg" +dest_files=["res://.godot/imported/Checked.svg-80704e37f30c24e2ec3dfc0955f5f21c.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/addons/discord-rpc-gd/nodes/assets/Unchecked.svg b/addons/discord-rpc-gd/nodes/assets/Unchecked.svg new file mode 100644 index 0000000..58cb234 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/assets/Unchecked.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/addons/discord-rpc-gd/nodes/assets/Unchecked.svg.import b/addons/discord-rpc-gd/nodes/assets/Unchecked.svg.import new file mode 100644 index 0000000..7503ec8 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/assets/Unchecked.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://compmm3kviqqe" +path="res://.godot/imported/Unchecked.svg-b526adfd78f7b1577fc3c10a8ea626ee.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-rpc-gd/nodes/assets/Unchecked.svg" +dest_files=["res://.godot/imported/Unchecked.svg-b526adfd78f7b1577fc3c10a8ea626ee.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/addons/discord-rpc-gd/nodes/assets/circle.svg b/addons/discord-rpc-gd/nodes/assets/circle.svg new file mode 100644 index 0000000..acd3753 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/assets/circle.svg @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/addons/discord-rpc-gd/nodes/assets/circle.svg.import b/addons/discord-rpc-gd/nodes/assets/circle.svg.import new file mode 100644 index 0000000..509c745 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/assets/circle.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtc6ckladq0td" +path="res://.godot/imported/circle.svg-d0b0579c9433c6250a5869daf4f70024.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/discord-rpc-gd/nodes/assets/circle.svg" +dest_files=["res://.godot/imported/circle.svg-d0b0579c9433c6250a5869daf4f70024.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/addons/discord-rpc-gd/nodes/debug.gd b/addons/discord-rpc-gd/nodes/debug.gd new file mode 100644 index 0000000..d960441 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/debug.gd @@ -0,0 +1,11 @@ +## This is a Debug Node wich will show some usefull info and buttons/input +## +## The DiscordRPC Debug Node will show info about the current values of its variables and some buttons to change them. +## +## @tutorial: https://github.com/vaporvee/discord-rpc-godot/wiki +@tool +extends Node + +func _ready() -> void: + const DebugNodeGroup: PackedScene = preload("res://addons/discord-rpc-gd/nodes/Debug.tscn") + add_child(DebugNodeGroup.instantiate()) diff --git a/addons/discord-rpc-gd/nodes/debug.gd.uid b/addons/discord-rpc-gd/nodes/debug.gd.uid new file mode 100644 index 0000000..737040c --- /dev/null +++ b/addons/discord-rpc-gd/nodes/debug.gd.uid @@ -0,0 +1 @@ +uid://dh3xp3q241t4n diff --git a/addons/discord-rpc-gd/nodes/discord_autoload.gd b/addons/discord-rpc-gd/nodes/discord_autoload.gd new file mode 100644 index 0000000..cfc6e60 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/discord_autoload.gd @@ -0,0 +1,13 @@ +## This is a GDscript Node wich gets automatically added as Autoload while installing the addon. +## +## It can run in the background to comunicate with Discord. +## You don't need to use it. If you remove it make sure to run [code]DiscordRPC.run_callbacks()[/code] in a [code]_process[/code] function. +## +## @tutorial: https://github.com/vaporvee/discord-rpc-godot/wiki +extends Node + +func _ready() -> void: + pass + +func _process(_delta) -> void: + DiscordRPC.run_callbacks() diff --git a/addons/discord-rpc-gd/nodes/discord_autoload.gd.uid b/addons/discord-rpc-gd/nodes/discord_autoload.gd.uid new file mode 100644 index 0000000..92bcae9 --- /dev/null +++ b/addons/discord-rpc-gd/nodes/discord_autoload.gd.uid @@ -0,0 +1 @@ +uid://cklriqkegrqw3 diff --git a/addons/discord-rpc-gd/plugin.cfg b/addons/discord-rpc-gd/plugin.cfg new file mode 100644 index 0000000..8eeeb16 --- /dev/null +++ b/addons/discord-rpc-gd/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="DiscordRPC" +description="Discord RPC Plugin for GDScript in Godot" +author="vaporvee" +version="1.3.1" +script="plugin.gd" diff --git a/addons/discord-rpc-gd/plugin.gd b/addons/discord-rpc-gd/plugin.gd new file mode 100644 index 0000000..03985b6 --- /dev/null +++ b/addons/discord-rpc-gd/plugin.gd @@ -0,0 +1,56 @@ +@tool +extends EditorPlugin + +const DiscordRPCDebug = preload("res://addons/discord-rpc-gd/nodes/debug.gd") +const DiscordRPCDebug_icon = preload("res://addons/discord-rpc-gd/Debug.svg") +var loaded_DiscordRPCDebug = DiscordRPCDebug.new() +var restart_window: ConfirmationDialog = preload("res://addons/discord-rpc-gd/restart_window.tscn").instantiate() +var plugin_cfg: ConfigFile = ConfigFile.new() +const plugin_data_filename = "/plugin_data.cfg" + +func _enter_tree() -> void: + add_custom_type("DiscordRPCDebug","Node",DiscordRPCDebug,DiscordRPCDebug_icon) + get_editor_interface().get_editor_settings().settings_changed.connect(_on_editor_settings_changed) + +func _ready() -> void: + await get_tree().create_timer(0.5).timeout + plugin_cfg.load(get_editor_interface().get_editor_paths().get_data_dir() + plugin_data_filename) + if !get_editor_interface().get_editor_settings().has_setting("DiscordRPC/EditorPresence/enabled"): + get_editor_interface().get_editor_settings().set_setting("DiscordRPC/EditorPresence/enabled",plugin_cfg.get_value("Discord","editor_presence",false)) + +func _exit_tree(): + if get_editor_interface().get_editor_settings().has_setting("DiscordRPC/EditorPresence/enabled"): + get_editor_interface().get_editor_settings().erase("DiscordRPC/EditorPresence/enabled") + +func _enable_plugin() -> void: + if FileAccess.file_exists(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore"): + DirAccess.remove_absolute(ProjectSettings.globalize_path("res://") + "addons/discord-rpc-gd/bin/.gdignore") + add_autoload_singleton("DiscordRPCLoader","res://addons/discord-rpc-gd/nodes/discord_autoload.gd") + restart_window.connect("confirmed", save_no_restart) + restart_window.connect("canceled", save_and_restart) + get_editor_interface().popup_dialog_centered(restart_window) + print("IGNORE RED ERROR MESSAGES BEFORE THE SECOND RESTART!") + +func _disable_plugin() -> void: + remove_autoload_singleton("DiscordRPCLoader") + FileAccess.open("res://addons/discord-rpc-gd/bin/.gdignore",FileAccess.WRITE) + remove_custom_type("DiscordRPCDebug") + get_editor_interface().get_editor_settings().erase("DiscordRPC/EditorPresence/enabled") + push_warning("Please restart the editor to fully disable the DiscordRPC plugin") + +func save_and_restart() -> void: + get_editor_interface().restart_editor(true) + +func save_no_restart() -> void: + get_editor_interface().restart_editor(false) + +var editor_presence: Node +func _on_editor_settings_changed() -> void: + plugin_cfg.set_value("Discord","editor_presence",get_editor_interface().get_editor_settings().get_setting("DiscordRPC/EditorPresence/enabled")) + plugin_cfg.save(get_editor_interface().get_editor_paths().get_data_dir() + plugin_data_filename) + if ClassDB.class_exists("EditorPresence") && editor_presence == null: + editor_presence = ClassDB.instantiate("EditorPresence") + if get_editor_interface().get_editor_settings().has_setting("DiscordRPC/EditorPresence/enabled") && get_editor_interface().get_editor_settings().get_setting("DiscordRPC/EditorPresence/enabled"): + add_child(editor_presence) + else: + editor_presence.queue_free() diff --git a/addons/discord-rpc-gd/plugin.gd.uid b/addons/discord-rpc-gd/plugin.gd.uid new file mode 100644 index 0000000..fcbe949 --- /dev/null +++ b/addons/discord-rpc-gd/plugin.gd.uid @@ -0,0 +1 @@ +uid://dmcu7r3vlc750 diff --git a/addons/discord-rpc-gd/restart_window.tscn b/addons/discord-rpc-gd/restart_window.tscn new file mode 100644 index 0000000..436b6cc --- /dev/null +++ b/addons/discord-rpc-gd/restart_window.tscn @@ -0,0 +1,112 @@ +[gd_scene load_steps=8 format=3 uid="uid://byc4c6d5tpomq"] + +[ext_resource type="Texture2D" uid="uid://csl0e2px0cwc1" path="res://addons/discord-rpc-gd/Logo_V2_No_Bg.png" id="1_0svbg"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1t7mm"] + +[sub_resource type="Theme" id="Theme_swwco"] +Button/styles/focus = SubResource("StyleBoxEmpty_1t7mm") + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5vqdt"] + +[sub_resource type="Image" id="Image_v4whe"] +data = { +"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 168, 224, 224, 224, 233, 224, 224, 224, 236, 224, 224, 224, 170, 231, 231, 231, 31, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 234, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 239, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 168, 224, 224, 224, 255, 224, 224, 224, 186, 224, 224, 224, 32, 224, 224, 224, 33, 224, 224, 224, 187, 224, 224, 224, 255, 225, 225, 225, 167, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 36, 224, 224, 224, 255, 224, 224, 224, 234, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 237, 224, 224, 224, 255, 224, 224, 224, 33, 255, 255, 255, 0, 255, 255, 255, 0, 229, 229, 229, 38, 224, 224, 224, 255, 224, 224, 224, 229, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 164, 224, 224, 224, 255, 224, 224, 224, 187, 225, 225, 225, 34, 227, 227, 227, 36, 224, 224, 224, 192, 224, 224, 224, 255, 224, 224, 224, 162, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 225, 225, 225, 215, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 229, 224, 224, 224, 32, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 24, 224, 224, 224, 216, 224, 224, 224, 255, 224, 224, 224, 210, 224, 224, 224, 161, 224, 224, 224, 232, 224, 224, 224, 231, 225, 225, 225, 159, 230, 230, 230, 30, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 107, 224, 224, 224, 255, 224, 224, 224, 210, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 105, 230, 230, 230, 20, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 224, 224, 224, 130, 255, 255, 255, 1, 255, 255, 255, 1, 225, 225, 225, 134, 224, 224, 224, 224, 225, 225, 225, 223, 224, 224, 224, 132, 255, 255, 255, 1, 255, 255, 255, 6, 224, 224, 224, 137, 224, 224, 224, 231, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 130, 225, 225, 225, 133, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 129, 224, 224, 224, 137, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 220, 225, 225, 225, 223, 224, 224, 224, 255, 226, 226, 226, 61, 224, 224, 224, 65, 224, 224, 224, 255, 224, 224, 224, 222, 224, 224, 224, 231, 224, 224, 224, 255, 227, 227, 227, 62, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 222, 224, 224, 224, 255, 227, 227, 227, 63, 225, 225, 225, 67, 224, 224, 224, 255, 224, 224, 224, 219, 224, 224, 224, 230, 224, 224, 224, 255, 227, 227, 227, 63, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 127, 224, 224, 224, 129, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 126, 225, 225, 225, 135, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 221, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 1, 224, 224, 224, 128, 224, 224, 224, 220, 224, 224, 224, 219, 225, 225, 225, 127, 255, 255, 255, 0, 255, 255, 255, 5, 225, 225, 225, 134, 224, 224, 224, 229, 224, 224, 224, 255, 255, 255, 255, 0), +"format": "RGBA8", +"height": 16, +"mipmaps": false, +"width": 16 +} + +[sub_resource type="ImageTexture" id="ImageTexture_gdtpn"] +image = SubResource("Image_v4whe") + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7v0rg"] + +[node name="RestartWindow" type="ConfirmationDialog"] +title = "Restart required" +initial_position = 2 +size = Vector2i(430, 500) +visible = true +transient = false +unresizable = true +theme = SubResource("Theme_swwco") +ok_button_text = "Restart" +cancel_button_text = "Save and restart" + +[node name="Panel" type="Panel" parent="."] +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -207.0 +offset_top = 8.0 +offset_right = 207.0 +offset_bottom = 451.0 +grow_horizontal = 2 +mouse_filter = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="Panel"] +custom_minimum_size = Vector2(400, 0) +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -200.0 +offset_right = 200.0 +offset_bottom = 389.0 +grow_horizontal = 2 + +[node name="HSeparator" type="HSeparator" parent="Panel/VBoxContainer"] +layout_mode = 2 +mouse_filter = 1 +theme_override_constants/separation = 15 +theme_override_styles/separator = SubResource("StyleBoxEmpty_5vqdt") + +[node name="HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +theme_override_constants/separation = 10 + +[node name="DocsIcon" type="TextureRect" parent="Panel/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 4 +texture = SubResource("ImageTexture_gdtpn") +stretch_mode = 2 + +[node name="LinkButton" type="LinkButton" parent="Panel/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 8 +mouse_default_cursor_shape = 16 +theme_override_font_sizes/font_size = 20 +text = "HOW TO USE" +uri = "https://vaporvee.com/docs/discord-rpc-godot#quick-start" + +[node name="TextureRect" type="TextureRect" parent="Panel/VBoxContainer"] +custom_minimum_size = Vector2(128, 128) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 0 +texture = ExtResource("1_0svbg") +expand_mode = 1 + +[node name="RichTextLabel" type="RichTextLabel" parent="Panel/VBoxContainer"] +custom_minimum_size = Vector2(400, 250) +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 0 +mouse_filter = 1 +theme_override_font_sizes/normal_font_size = 16 +theme_override_styles/normal = SubResource("StyleBoxEmpty_7v0rg") +bbcode_enabled = true +text = "[center]Thanks for enabling the +[rainbow]Discord Game SDK Plugin[/rainbow] +made by vaporvee. ❤️ + + +You need to [wave]restart[/wave] the editor to fully enable this plugin! +Do you want to [wave]save[/wave] your project before restarting? + +Error messages after the first two restarts are normal. Please ignore them!" diff --git a/animation_player.gd b/animation_player.gd new file mode 100644 index 0000000..90dd44a --- /dev/null +++ b/animation_player.gd @@ -0,0 +1 @@ +extends AnimationPlayer diff --git a/animation_player.gd.uid b/animation_player.gd.uid new file mode 100644 index 0000000..a009eca --- /dev/null +++ b/animation_player.gd.uid @@ -0,0 +1 @@ +uid://x6bi0h4rircc diff --git a/button_2.gd b/button_2.gd new file mode 100644 index 0000000..7e1f164 --- /dev/null +++ b/button_2.gd @@ -0,0 +1,8 @@ +extends Button + +func _ready(): + var button = self + button.pressed.connect(_button_pressed) + +func _button_pressed(): + get_tree().change_scene_to_file("res://Level_Core.tscn") diff --git a/button_2.gd.uid b/button_2.gd.uid new file mode 100644 index 0000000..511c82e --- /dev/null +++ b/button_2.gd.uid @@ -0,0 +1 @@ +uid://cax1b0y8uvwj3 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..641c08e --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bnmet0ec7irdl" +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/in_game_ui.gd b/in_game_ui.gd new file mode 100644 index 0000000..e4835f2 --- /dev/null +++ b/in_game_ui.gd @@ -0,0 +1,4 @@ +extends Control + +func main(): + print("Hey!") diff --git a/in_game_ui.gd.uid b/in_game_ui.gd.uid new file mode 100644 index 0000000..12bf095 --- /dev/null +++ b/in_game_ui.gd.uid @@ -0,0 +1 @@ +uid://t2iw8p1c6rq3 diff --git a/in_game_ui.tscn b/in_game_ui.tscn new file mode 100644 index 0000000..753f40f --- /dev/null +++ b/in_game_ui.tscn @@ -0,0 +1,174 @@ +[gd_scene load_steps=10 format=3 uid="uid://bciy4rskxlowb"] + +[ext_resource type="Script" uid="uid://t2iw8p1c6rq3" path="res://in_game_ui.gd" id="1_4v80v"] +[ext_resource type="Texture2D" uid="uid://btbycsdclf56y" path="res://Screenshot From 2025-03-17 14-25-26.png" id="1_e6quo"] +[ext_resource type="Texture2D" uid="uid://0hcyy1njk5tu" path="res://ProjektLuzidLogo.png" id="1_onc8m"] +[ext_resource type="Script" uid="uid://x6bi0h4rircc" path="res://animation_player.gd" id="2_e6quo"] +[ext_resource type="Script" uid="uid://cax1b0y8uvwj3" path="res://button_2.gd" id="5_4v80v"] +[ext_resource type="Script" uid="uid://dti3q3vy3rysn" path="res://quit_button.gd" id="6_0qsvx"] + +[sub_resource type="FontFile" id="FontFile_db7xr"] +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 +cache/0/17/0/ascent = 0.0 +cache/0/17/0/descent = 0.0 +cache/0/17/0/underline_position = 0.0 +cache/0/17/0/underline_thickness = 0.0 +cache/0/17/0/scale = 1.0 +cache/0/18/0/ascent = 0.0 +cache/0/18/0/descent = 0.0 +cache/0/18/0/underline_position = 0.0 +cache/0/18/0/underline_thickness = 0.0 +cache/0/18/0/scale = 1.0 +cache/0/19/0/ascent = 0.0 +cache/0/19/0/descent = 0.0 +cache/0/19/0/underline_position = 0.0 +cache/0/19/0/underline_thickness = 0.0 +cache/0/19/0/scale = 1.0 +cache/0/20/0/ascent = 0.0 +cache/0/20/0/descent = 0.0 +cache/0/20/0/underline_position = 0.0 +cache/0/20/0/underline_thickness = 0.0 +cache/0/20/0/scale = 1.0 +cache/0/21/0/ascent = 0.0 +cache/0/21/0/descent = 0.0 +cache/0/21/0/underline_position = 0.0 +cache/0/21/0/underline_thickness = 0.0 +cache/0/21/0/scale = 1.0 +cache/0/22/0/ascent = 0.0 +cache/0/22/0/descent = 0.0 +cache/0/22/0/underline_position = 0.0 +cache/0/22/0/underline_thickness = 0.0 +cache/0/22/0/scale = 1.0 +cache/0/23/0/ascent = 0.0 +cache/0/23/0/descent = 0.0 +cache/0/23/0/underline_position = 0.0 +cache/0/23/0/underline_thickness = 0.0 +cache/0/23/0/scale = 1.0 +cache/0/24/0/ascent = 0.0 +cache/0/24/0/descent = 0.0 +cache/0/24/0/underline_position = 0.0 +cache/0/24/0/underline_thickness = 0.0 +cache/0/24/0/scale = 1.0 +cache/0/25/0/ascent = 0.0 +cache/0/25/0/descent = 0.0 +cache/0/25/0/underline_position = 0.0 +cache/0/25/0/underline_thickness = 0.0 +cache/0/25/0/scale = 1.0 +cache/0/26/0/ascent = 0.0 +cache/0/26/0/descent = 0.0 +cache/0/26/0/underline_position = 0.0 +cache/0/26/0/underline_thickness = 0.0 +cache/0/26/0/scale = 1.0 +cache/0/1/0/ascent = 0.0 +cache/0/1/0/descent = 0.0 +cache/0/1/0/underline_position = 0.0 +cache/0/1/0/underline_thickness = 0.0 +cache/0/1/0/scale = 1.0 +cache/0/50/0/ascent = 0.0 +cache/0/50/0/descent = 0.0 +cache/0/50/0/underline_position = 0.0 +cache/0/50/0/underline_thickness = 0.0 +cache/0/50/0/scale = 1.0 +cache/0/60/0/ascent = 0.0 +cache/0/60/0/descent = 0.0 +cache/0/60/0/underline_position = 0.0 +cache/0/60/0/underline_thickness = 0.0 +cache/0/60/0/scale = 1.0 + +[sub_resource type="LabelSettings" id="LabelSettings_kenku"] +font = SubResource("FontFile_db7xr") +font_size = 60 +shadow_size = 3 + +[sub_resource type="LabelSettings" id="LabelSettings_onc8m"] +font_size = 64 + +[node name="inGameUI" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_4v80v") + +[node name="TextureRect" type="TextureRect" parent="."] +layout_mode = 0 +offset_right = 1280.0 +offset_bottom = 720.0 +texture = ExtResource("1_e6quo") + +[node name="MarginContainer" type="MarginContainer" parent="TextureRect"] +layout_mode = 2 +offset_right = 1280.0 +offset_bottom = 720.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="TextureRect/MarginContainer"] +layout_mode = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="TextureRect/MarginContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 2 +size_flags_vertical = 4 + +[node name="TextureRect" type="TextureRect" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer"] +layout_direction = 2 +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +texture = ExtResource("1_onc8m") +stretch_mode = 2 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer/TextureRect"] +script = ExtResource("2_e6quo") + +[node name="Label" type="Label" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer"] +visible = false +layout_mode = 2 +size_flags_horizontal = 0 +text = "projektLuzid" +label_settings = SubResource("LabelSettings_kenku") +vertical_alignment = 1 + +[node name="PlayButton" type="Button" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +text = " play" +flat = true +script = ExtResource("5_4v80v") + +[node name="QuitButton" type="Button" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 4 +text = " quit" +flat = true +script = ExtResource("6_0qsvx") + +[node name="VBoxContainer2" type="VBoxContainer" parent="TextureRect/MarginContainer/HBoxContainer"] +visible = false +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Label" type="Label" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer2"] +layout_mode = 2 +text = "Saves" +label_settings = SubResource("LabelSettings_onc8m") +horizontal_alignment = 2 + +[node name="Button2" type="Button" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +text = "text" + +[node name="Button" type="Button" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 +text = "text" diff --git a/in_game_ui_leftpanel.gd b/in_game_ui_leftpanel.gd new file mode 100644 index 0000000..4e8fa63 --- /dev/null +++ b/in_game_ui_leftpanel.gd @@ -0,0 +1,10 @@ +extends VBoxContainer + +func _ready(): + var button = get_node("Button2") + button.pressed.connect(_button_pressed) + +func _button_pressed(): + var button = get_node("Button2") + button.text = "You pressed me!" + print("Hello world!") diff --git a/in_game_ui_leftpanel.gd.uid b/in_game_ui_leftpanel.gd.uid new file mode 100644 index 0000000..52508b5 --- /dev/null +++ b/in_game_ui_leftpanel.gd.uid @@ -0,0 +1 @@ +uid://2oadyu63hmbb diff --git a/main game.tscn b/main game.tscn new file mode 100644 index 0000000..e5c0e26 --- /dev/null +++ b/main game.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=4 format=3 uid="uid://csv14jqunay0s"] + +[sub_resource type="Environment" id="Environment_v4kxd"] +background_mode = 1 +background_color = Color(0.6242, 0.697431, 1, 1) + +[sub_resource type="CameraAttributesPhysical" id="CameraAttributesPhysical_em7y1"] + +[sub_resource type="Compositor" id="Compositor_dpk2q"] + +[node name="MainGame" type="Node3D"] + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_v4kxd") +camera_attributes = SubResource("CameraAttributesPhysical_em7y1") +compositor = SubResource("Compositor_dpk2q") diff --git a/pause_menu.gd b/pause_menu.gd new file mode 100644 index 0000000..a610370 --- /dev/null +++ b/pause_menu.gd @@ -0,0 +1,18 @@ +extends Node3D +@onready var pause_menu = $PauseMenu + +var paused = false + +func _process(delta): + if Input.is_action_just_pressed("ui_cancel"): + pauseMenu() + +func pauseMenu(): + if paused: + pause_menu.hide() + Engine.time_scale = 1 + else: + pause_menu.show() + Engine.time_scale = 0 + + paused = !paused diff --git a/pause_menu.gd.uid b/pause_menu.gd.uid new file mode 100644 index 0000000..5d71425 --- /dev/null +++ b/pause_menu.gd.uid @@ -0,0 +1 @@ +uid://wr38f8q1w7yq diff --git a/pause_menu.tscn b/pause_menu.tscn new file mode 100644 index 0000000..73fc1d2 --- /dev/null +++ b/pause_menu.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=2 format=3 uid="uid://daoyebc0vm7sd"] + +[ext_resource type="Script" uid="uid://4v86257e5prv" path="res://pause_menu_itself.gd" id="1_hdmo1"] + +[node name="PauseMenu" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_hdmo1") + +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 0 +offset_right = 1280.0 +offset_bottom = 720.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 + +[node name="ResumeButton" type="Button" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +text = "resume game" + +[node name="ExitButton" type="Button" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +text = "quit to main menu" + +[connection signal="pressed" from="MarginContainer/VBoxContainer/ResumeButton" to="." method="_on_resume_button_pressed"] +[connection signal="pressed" from="MarginContainer/VBoxContainer/ResumeButton" to="." method="_on_button_pressed"] +[connection signal="pressed" from="MarginContainer/VBoxContainer/ExitButton" to="." method="_on_exit_button_pressed"] diff --git a/pause_menu_itself.gd b/pause_menu_itself.gd new file mode 100644 index 0000000..73f5777 --- /dev/null +++ b/pause_menu_itself.gd @@ -0,0 +1,10 @@ +extends Control + +@onready var main = $"../" + + +func _on_resume_button_pressed() -> void: + main.pauseMenu() + +func _on_exit_button_pressed() -> void: + get_tree().change_scene_to_file("res://in_game_ui.tscn") diff --git a/pause_menu_itself.gd.uid b/pause_menu_itself.gd.uid new file mode 100644 index 0000000..a3d5bbc --- /dev/null +++ b/pause_menu_itself.gd.uid @@ -0,0 +1 @@ +uid://4v86257e5prv diff --git a/player.gd b/player.gd new file mode 100644 index 0000000..074aaf6 --- /dev/null +++ b/player.gd @@ -0,0 +1,38 @@ +extends RigidBody3D + +# Configure options +var mouse_sensitivity := 0.001 +var twist_input := 0.0 +var pitch_input := 0.0 + +@onready var twist_pivot := $TwistPivot +@onready var pitch_pivot := $TwistPivot/PitchPivot + +# Do not touch this part of the code +func _ready() -> void: + Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + +func _process(delta: float) -> void: + var input := Vector3.ZERO + input.x = Input.get_axis("move_left", "move_right") + input.z = Input.get_axis("move_forward", "move_back") + + apply_central_force(twist_pivot.basis * input * 1600.0 * delta) + + if Input.is_action_just_pressed("proluz_ui_pause"): + Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) + + if Input.is_action_just_pressed("proluz_ui_grab"): + Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) + + twist_pivot.rotate_y(twist_input) + pitch_pivot.rotate_x(pitch_input) + pitch_pivot.rotation.x = clamp(pitch_pivot.rotation.x, deg_to_rad(-30), deg_to_rad(30)) + twist_input = 0.0 + pitch_input = 0.0 + +func _unhandled_input(event: InputEvent) -> void: + if event is InputEventMouseMotion: + if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED: + twist_input = - event.relative.x * mouse_sensitivity + pitch_input = - event.relative.y * mouse_sensitivity diff --git a/player.gd.uid b/player.gd.uid new file mode 100644 index 0000000..8986000 --- /dev/null +++ b/player.gd.uid @@ -0,0 +1 @@ +uid://b0r17riyugkt0 diff --git a/player.tscn b/player.tscn new file mode 100644 index 0000000..d1a9214 --- /dev/null +++ b/player.tscn @@ -0,0 +1,27 @@ +[gd_scene load_steps=4 format=3 uid="uid://bs6yq6gy7k2sb"] + +[ext_resource type="Script" uid="uid://b0r17riyugkt0" path="res://player.gd" id="1_4flbx"] + +[sub_resource type="CapsuleMesh" id="CapsuleMesh_onrkg"] + +[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_i3pqv"] +points = PackedVector3Array(-0.125207, -0.532801, -0.480507, 0.0227831, 0.47607, 0.498884, 0.169713, 0.559144, 0.464172, 0.231051, -0.803591, 0.320455, 0.40741, 0.651043, -0.243523, -0.482789, 0.594843, 0.0822132, -0.362868, -0.682312, 0.289697, 0.469044, -0.654529, -0.0662713, -0.127444, 0.842701, -0.338103, -0.393435, -0.683942, -0.244717, 0.438255, 0.623309, 0.200849, 0.0841477, 0.977454, 0.114795, -0.0682023, -0.976458, -0.12927, 0.20055, -0.563129, -0.451454, -0.185527, 0.595453, -0.453475, -0.273363, 0.592268, 0.407754, -0.00693649, -0.476823, 0.49966, 0.375821, -0.588614, 0.316955, 0.111579, 0.563059, -0.481177, -0.41725, 0.527866, -0.270497, -0.484546, -0.596972, -0.0665097, -0.279747, 0.908561, 0.0533361, -0.250197, -0.880712, 0.205319, 0.263647, -0.902771, -0.127394, 0.293368, 0.871526, -0.157196, 0.373412, -0.526319, -0.328246, 0.499663, 0.476641, -0.00688856, 0.0531056, 0.875001, 0.324703, -0.154543, -0.590854, 0.465879, -0.0972799, -0.782358, -0.398188, -0.387649, -0.498171, 0.31565, -0.30068, -0.587995, -0.388901) + +[node name="Player" type="RigidBody3D"] +lock_rotation = true +script = ExtResource("1_4flbx") + +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +mesh = SubResource("CapsuleMesh_onrkg") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +shape = SubResource("ConvexPolygonShape3D_i3pqv") + +[node name="TwistPivot" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) + +[node name="PitchPivot" type="Node3D" parent="TwistPivot"] +transform = Transform3D(1, 0, 0, 0, 0.984808, 0.173648, 0, -0.173648, 0.984808, 0, 0, 0) + +[node name="Camera3D" type="Camera3D" parent="TwistPivot/PitchPivot"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3) diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..23c38fb --- /dev/null +++ b/project.godot @@ -0,0 +1,70 @@ +; 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="ProjektLuzid" +config/name_localized={ +"es": "ProyectoLucida" +} +run/main_scene="res://in_game_ui.tscn" +config/features=PackedStringArray("4.4", "Forward Plus") +config/icon="uid://fad7xr2jj2nu" + +[autoload] + +DiscordRPCLoader="*res://addons/discord-rpc-gd/nodes/discord_autoload.gd" + +[display] + +window/size/viewport_width=1280 +window/size/viewport_height=720 + +[editor_plugins] + +enabled=PackedStringArray("res://addons/discord-rpc-gd/plugin.cfg") + +[input] + +move_forward={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) +] +} +move_back={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +] +} +move_left={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) +] +} +move_right={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +] +} +proluz_ui_grab={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":71,"key_label":0,"unicode":71,"location":0,"echo":false,"script":null) +] +} +proluz_ui_pause={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} + +[rendering] + +lights_and_shadows/directional_shadow/soft_shadow_filter_quality=3 +anti_aliasing/quality/msaa_3d=1 diff --git a/quit_button.gd b/quit_button.gd new file mode 100644 index 0000000..c789a23 --- /dev/null +++ b/quit_button.gd @@ -0,0 +1,8 @@ +extends Button + +func _ready(): + var button = self + button.pressed.connect(_button_pressed) + +func _button_pressed(): + get_tree().quit() diff --git a/quit_button.gd.uid b/quit_button.gd.uid new file mode 100644 index 0000000..98b89cc --- /dev/null +++ b/quit_button.gd.uid @@ -0,0 +1 @@ +uid://dti3q3vy3rysn