- Accelerate to full speed in 4 frames and stop in 6, on floors, walls and ceilings, instead of snapping. - Keep momentum when leaving a surface; air steering is gentler and extra speed fades slowly. Fall speed capped at 400. - Edge wraps ease in from a standstill and carry their speed out onto the new surface. - Pull back onto a wall/ceiling that's drifted up to 4px away instead of falling off (floor_snap_length matches). - Physics interpolation and pixel-snapped 2D transforms. Sprite rotation moved into _physics_process and made frame-rate independent. - Squish sound + slime particles on landing, bubble sound on wraps. Placeholder CC0 sounds by rubberduck from OpenGameArt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59 lines
2.2 KiB
Text
Executable file
59 lines
2.2 KiB
Text
Executable file
[gd_scene format=3 uid="uid://uaxviwb40nn8"]
|
|
|
|
[ext_resource type="Script" uid="uid://drxbt88sjb1y4" path="res://Characters/player.gd" id="1_eovys"]
|
|
[ext_resource type="Texture2D" uid="uid://c3v26u2wh4it4" path="res://Assets/Player.png" id="2_eovys"]
|
|
[ext_resource type="AudioStream" uid="uid://b06e7ntjhc4dp" path="res://Assets/Sounds/slime_land_1.ogg" id="3_land1"]
|
|
[ext_resource type="AudioStream" uid="uid://bpa664tsd4kwn" path="res://Assets/Sounds/slime_land_2.ogg" id="4_land2"]
|
|
[ext_resource type="AudioStream" uid="uid://ceyykao0r6u7g" path="res://Assets/Sounds/slime_land_3.ogg" id="5_land3"]
|
|
[ext_resource type="AudioStream" uid="uid://1dmf4p7x4y3b" path="res://Assets/Sounds/slime_wrap.ogg" id="6_wrap"]
|
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_eovys"]
|
|
|
|
[sub_resource type="Gradient" id="Gradient_splat"]
|
|
colors = PackedColorArray(0, 0.6666667, 0, 1, 0, 1, 0.50980395, 1)
|
|
|
|
[node name="Player" type="CharacterBody2D" unique_id=150873177]
|
|
script = ExtResource("1_eovys")
|
|
landSounds = Array[AudioStream]([ExtResource("3_land1"), ExtResource("4_land2"), ExtResource("5_land3")])
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=1511454314]
|
|
texture = ExtResource("2_eovys")
|
|
offset = Vector2(0, -6)
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1379572123]
|
|
shape = SubResource("CircleShape2D_eovys")
|
|
|
|
[node name="EdgeSensors" type="Node2D" parent="."]
|
|
|
|
[node name="LeftEdgeSensor" type="RayCast2D" parent="EdgeSensors"]
|
|
position = Vector2(-24, 0)
|
|
target_position = Vector2(0, 14)
|
|
|
|
[node name="RightEdgeSensor" type="RayCast2D" parent="EdgeSensors"]
|
|
position = Vector2(24, 0)
|
|
target_position = Vector2(0, 14)
|
|
|
|
[node name="SplatParticles" type="CPUParticles2D" parent="."]
|
|
top_level = true
|
|
emitting = false
|
|
amount = 8
|
|
lifetime = 0.4
|
|
one_shot = true
|
|
explosiveness = 1.0
|
|
direction = Vector2(0, -1)
|
|
spread = 55.0
|
|
gravity = Vector2(0, 500)
|
|
initial_velocity_min = 40.0
|
|
initial_velocity_max = 90.0
|
|
scale_amount_min = 1.0
|
|
scale_amount_max = 2.0
|
|
color_initial_ramp = SubResource("Gradient_splat")
|
|
|
|
[node name="LandSound" type="AudioStreamPlayer" parent="."]
|
|
volume_db = -6.0
|
|
bus = &"SFX"
|
|
|
|
[node name="WrapSound" type="AudioStreamPlayer" parent="."]
|
|
stream = ExtResource("6_wrap")
|
|
volume_db = -10.0
|
|
bus = &"SFX"
|