From 783fc7c877886e118a895b59f980f6a4acd8949e Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Sat, 1 Nov 2025 20:18:44 -0600 Subject: [PATCH] groovin it --- assets/graphics/belough.png.import | 40 +++++++++++++++++++++++ assets/graphics/frab.png.import | 40 +++++++++++++++++++++++ assets/graphics/kith.png.import | 40 +++++++++++++++++++++++ assets/graphics/shoebug.png.import | 40 +++++++++++++++++++++++ assets/graphics/shot.png.import | 40 +++++++++++++++++++++++ assets/graphics/snus.png.import | 40 +++++++++++++++++++++++ assets/graphics/spitting_fiend.png.import | 40 +++++++++++++++++++++++ objects/player/groove.gd | 12 +++++-- objects/player/player.tscn | 40 ++++++++++++----------- 9 files changed, 311 insertions(+), 21 deletions(-) create mode 100644 assets/graphics/belough.png.import create mode 100644 assets/graphics/frab.png.import create mode 100644 assets/graphics/kith.png.import create mode 100644 assets/graphics/shoebug.png.import create mode 100644 assets/graphics/shot.png.import create mode 100644 assets/graphics/snus.png.import create mode 100644 assets/graphics/spitting_fiend.png.import diff --git a/assets/graphics/belough.png.import b/assets/graphics/belough.png.import new file mode 100644 index 0000000..f43a331 --- /dev/null +++ b/assets/graphics/belough.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ecb1qd6euubm" +path="res://.godot/imported/belough.png-8eb2b23cca35daa05ed658cd207a24a2.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/belough.png" +dest_files=["res://.godot/imported/belough.png-8eb2b23cca35daa05ed658cd207a24a2.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/frab.png.import b/assets/graphics/frab.png.import new file mode 100644 index 0000000..7379727 --- /dev/null +++ b/assets/graphics/frab.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://orvwbw12311i" +path="res://.godot/imported/frab.png-2f03797f5332bf93a4eb0ee2bdaccf1f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/frab.png" +dest_files=["res://.godot/imported/frab.png-2f03797f5332bf93a4eb0ee2bdaccf1f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/kith.png.import b/assets/graphics/kith.png.import new file mode 100644 index 0000000..5cbfa46 --- /dev/null +++ b/assets/graphics/kith.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://de27ah8re36mp" +path="res://.godot/imported/kith.png-eb5356c6a3860f7f44ebcb5713af92e9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/kith.png" +dest_files=["res://.godot/imported/kith.png-eb5356c6a3860f7f44ebcb5713af92e9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/shoebug.png.import b/assets/graphics/shoebug.png.import new file mode 100644 index 0000000..5bbe04a --- /dev/null +++ b/assets/graphics/shoebug.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c23qero0yluin" +path="res://.godot/imported/shoebug.png-21a4c94ef0a47aed919e382aee53ccac.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/shoebug.png" +dest_files=["res://.godot/imported/shoebug.png-21a4c94ef0a47aed919e382aee53ccac.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/shot.png.import b/assets/graphics/shot.png.import new file mode 100644 index 0000000..f41ad12 --- /dev/null +++ b/assets/graphics/shot.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bjf5qye1b63mr" +path="res://.godot/imported/shot.png-7a8d3aa1b3b94231986c835eb32646be.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/shot.png" +dest_files=["res://.godot/imported/shot.png-7a8d3aa1b3b94231986c835eb32646be.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/snus.png.import b/assets/graphics/snus.png.import new file mode 100644 index 0000000..42cf181 --- /dev/null +++ b/assets/graphics/snus.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://wdqyy6hns4ie" +path="res://.godot/imported/snus.png-2421426b7b9d519c2684ec3e3b4bad28.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/snus.png" +dest_files=["res://.godot/imported/snus.png-2421426b7b9d519c2684ec3e3b4bad28.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/assets/graphics/spitting_fiend.png.import b/assets/graphics/spitting_fiend.png.import new file mode 100644 index 0000000..9290fc6 --- /dev/null +++ b/assets/graphics/spitting_fiend.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bh178ledlvf3o" +path="res://.godot/imported/spitting_fiend.png-3ffa2f6bd51a2de38f5c8d9c4cc45e43.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/spitting_fiend.png" +dest_files=["res://.godot/imported/spitting_fiend.png-3ffa2f6bd51a2de38f5c8d9c4cc45e43.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/objects/player/groove.gd b/objects/player/groove.gd index 5aa09a8..c0459d9 100644 --- a/objects/player/groove.gd +++ b/objects/player/groove.gd @@ -2,9 +2,17 @@ class_name Groove extends CharacterBody2D -@export var max_length: float +@export var rest_length: float +@export var springiness: float +@export var damping: float @export var player: Player func _physics_process(delta: float) -> void: - pass + var length = global_position.distance_to(player.global_position) + var tension = length - rest_length + if tension > 0: + var force = tension * springiness + velocity += global_position.direction_to(player.global_position) * force * delta + velocity -= velocity * damping * delta + move_and_slide() diff --git a/objects/player/player.tscn b/objects/player/player.tscn index d619110..19f1b8e 100644 --- a/objects/player/player.tscn +++ b/objects/player/player.tscn @@ -8,24 +8,6 @@ [sub_resource type="CircleShape2D" id="CircleShape2D_cqmt1"] radius = 12.0 -[sub_resource type="Animation" id="Animation_g7ett"] -resource_name = "walk" -length = 0.3 -loop_mode = 1 -step = 0.05 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:flip_h") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.15), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [true, false] -} - [sub_resource type="Animation" id="Animation_ssrue"] length = 0.001 tracks/0/type = "value" @@ -58,6 +40,24 @@ tracks/0/keys = { "values": [false] } +[sub_resource type="Animation" id="Animation_g7ett"] +resource_name = "walk" +length = 0.3 +loop_mode = 1 +step = 0.05 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:flip_h") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.15), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [true, false] +} + [sub_resource type="AnimationLibrary" id="AnimationLibrary_gnkmh"] _data = { &"RESET": SubResource("Animation_ssrue"), @@ -89,7 +89,9 @@ libraries = { [node name="Groove" type="CharacterBody2D" parent="Node" node_paths=PackedStringArray("player")] position = Vector2(64, 0) script = ExtResource("3_jnjyq") -max_length = 64.0 +rest_length = 64.0 +springiness = 16.0 +damping = 0.5 player = NodePath("../..") [node name="Sprite2D" type="Sprite2D" parent="Node/Groove"]