This commit is contained in:
Lilith Schier 2026-06-08 16:22:25 +02:00
parent ab79ace226
commit 00b76b6b25
63 changed files with 1172 additions and 1548 deletions

14
src/Game.cs Normal file
View file

@ -0,0 +1,14 @@
using Chickensoft.LogicBlocks.Auto;
namespace Dancer;
[Meta(typeof(IAutoNode))]
public sealed partial class Game : Node2D
{
public override void _Notification(int what) => this.Notify(what);
public override void _Ready()
{
LogicBlockSerialization.Setup();
}
}

1
src/Game.cs.uid Normal file
View file

@ -0,0 +1 @@
uid://cjnisd5qmc15u

3
src/_assembly.cs Normal file
View file

@ -0,0 +1,3 @@
global using Chickensoft.AutoInject;
global using Chickensoft.Introspection;
global using Godot;

1
src/_assembly.cs.uid Normal file
View file

@ -0,0 +1 @@
uid://71cboxjhmfys

8
src/combat/Attack.cs Normal file
View file

@ -0,0 +1,8 @@
namespace Dancer;
public sealed class Attack
{
public required Node2D Attacker { get; init; }
public float Damage { get; init; } = 1f;
public Vector2 Impulse { get; init; } = Vector2.Zero;
}

1
src/combat/Attack.cs.uid Normal file
View file

@ -0,0 +1 @@
uid://cs5drdr0376sy

View file

@ -0,0 +1,6 @@
namespace Dancer;
public interface IAttackable
{
public void GetAttacked(in Attack attack);
}

View file

@ -0,0 +1 @@
uid://cu2ivuj6ulfv5

169
src/creatures/birb/Birb.cs Normal file
View file

@ -0,0 +1,169 @@
using System;
using Chickensoft.LogicBlocks;
using Chickensoft.LogicBlocks.Auto;
namespace Dancer;
[Meta(typeof(IAutoNode))]
public sealed partial class Birb : CharacterBody2D, IAttackable
{
public override void _Notification(int what) => this.Notify(what);
[Export] public float Speed { get; set; } = 60f;
[Export] public float AttackDistance { get; set; } = 32f;
[Export] public float ThinkTime { get; set; } = 0.2f;
[Export] public float Weight { get; set; } = 20f;
[Export] public float MaxHp { get; set; } = 4f;
[Node] private ProgressBar HealthBar { get; set; } = null!;
[Node] private AnimatedSprite2D BodySprite { get; set; } = null!;
private float _hp;
private float _timeThought;
private Node2D? _target;
private float _targetVelocity;
public override void _Ready()
{
_hp = MaxHp;
HealthBar.MinValue = 0f;
HealthBar.MaxValue = MaxHp;
}
public override void _PhysicsProcess(double delta)
{
_timeThought += (float)delta;
if (_timeThought >= ThinkTime)
{
_timeThought -= ThinkTime;
if (_target is not null)
{
var xDifference = _target.Position.X - Position.X;
var distance = Mathf.Abs(xDifference);
if (Mathf.Abs(distance - AttackDistance) > Speed * ThinkTime)
_targetVelocity = Mathf.Sign(xDifference) * Mathf.Sign(distance - AttackDistance) * Speed;
else
_targetVelocity = 0f;
BodySprite.FlipH = xDifference < 0;
}
else
_targetVelocity = 0f;
}
Velocity = Velocity with
{
X = Mathf.MoveToward(Velocity.X, _targetVelocity, (float)delta * 500f)
};
if (!IsOnFloor()) Velocity += GetGravity() * (float)delta;
MoveAndSlide();
}
public override void _Process(double delta)
{
HealthBar.Value = _hp;
HealthBar.Visible = _hp < MaxHp;
}
public void OnDetectionBodyEntered(Node2D body) => _target = body;
public void OnChaseBodyExited(Node2D body)
{
if (body == _target) _target = null;
}
public void GetAttacked(in Attack attack)
{
_hp -= attack.Damage;
Velocity += attack.Impulse / Weight;
if (_hp <= 0.01) QueueFree();
}
[Meta]
public sealed partial class Logic : AutoBlock
{
public sealed record Data
{
public required Birb Birb { get; set; }
public float DurationLeft { get; set; }
public Node2D? Target { get; set; }
}
public Logic(Birb birb)
{
Set(new Data { Birb = birb });
Preallocate<Root>();
}
public static class Input
{
public readonly record struct TimerFinished;
}
[Meta, StateDiagram]
public abstract partial record Root : LogicBlockState
{
public virtual void OnPhysicsProcess(double delta)
{
}
[Meta]
public sealed partial record Idle : Root;
[Meta]
public abstract partial record Fight : Root
{
[Meta]
public sealed partial record Think : Fight, IGet<Input.TimerFinished>
{
public Think()
{
this.OnEnter(() => Get<Data>().DurationLeft = (float)GD.RandRange(0.3, 0.6));
}
public override void OnPhysicsProcess(double delta)
{
var data = Get<Data>();
data.DurationLeft -= (float)delta;
if (data.DurationLeft <= 0f) Input(new Input.TimerFinished());
}
public Type On(in Input.TimerFinished input)
{
var data = Get<Data>();
if (data.Target is not { } target) return To<Idle>();
return target.GlobalPosition.DistanceTo(data.Birb.GlobalPosition) <
data.Birb.AttackDistance
? To<PrepareStrike>()
: To<StepToPosition>();
}
}
[Meta]
public sealed partial record StepToPosition : Fight;
[Meta]
public sealed partial record PrepareStrike : Fight, IGet<Input.TimerFinished>
{
public PrepareStrike()
{
this.OnEnter(() => Get<Data>().DurationLeft = (float)GD.RandRange(0.7, 0.9));
}
public override void OnPhysicsProcess(double delta)
{
var data = Get<Data>();
data.DurationLeft -= (float)delta;
if (data.DurationLeft <= 0f) Input(new Input.TimerFinished());
}
public Type On(in Input.TimerFinished input) => To<Stab>();
}
[Meta]
public sealed partial record Stab : Fight;
}
}
}
}

View file

@ -0,0 +1 @@
uid://daowp76saltic

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="aseprite_wizard.plugin.spriteframes"
type="SpriteFrames"
uid="uid://cyf7ij04grglc"
path="res://.godot/imported/birb.aseprite-70cec5e9f1931c6cd2bc1e2936bb8cc0.res"
[deps]
source_file="res://src/creatures/birb/birb.aseprite"
dest_files=["res://.godot/imported/birb.aseprite-70cec5e9f1931c6cd2bc1e2936bb8cc0.res"]
[params]
layer/exclude_layers_pattern=""
layer/only_visible_layers=false
sheet/sheet_type="packed"
sheet/sheet_columns=12
sheet/frame_padding=0
sheet/scale=1
animation/round_fps=true

View file

@ -0,0 +1,195 @@
[gd_scene format=3 uid="uid://bosbrhc3oprau"]
[ext_resource type="Script" uid="uid://daowp76saltic" path="res://src/creatures/birb/Birb.cs" id="1_lyo8d"]
[ext_resource type="SpriteFrames" uid="uid://cyf7ij04grglc" path="res://src/creatures/birb/birb.aseprite" id="2_ba6cv"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_feb5d"]
radius = 5.0
height = 14.0
[sub_resource type="CircleShape2D" id="CircleShape2D_lyo8d"]
radius = 52.0
[sub_resource type="CircleShape2D" id="CircleShape2D_ba6cv"]
radius = 110.0
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lyo8d"]
bg_color = Color(0.15, 0.15, 0.15, 0.34509805)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ba6cv"]
bg_color = Color(0.73, 0.10949998, 0.14052509, 0.8666667)
[sub_resource type="Animation" id="Animation_lyo8d"]
length = 0.001
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BodySprite:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [&"idle"]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("BodySprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_ba6cv"]
resource_name = "idle"
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BodySprite:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [&"idle"]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("BodySprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_1i6dk"]
resource_name = "prepare_attack"
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BodySprite:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [&"prepare_attack"]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("BodySprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_3ly8m"]
resource_name = "stab"
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BodySprite:animation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [&"stab"]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("BodySprite:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1i6dk"]
_data = {
&"RESET": SubResource("Animation_lyo8d"),
&"idle": SubResource("Animation_ba6cv"),
&"prepare_attack": SubResource("Animation_1i6dk"),
&"stab": SubResource("Animation_3ly8m")
}
[node name="Birb" type="CharacterBody2D" unique_id=428810294]
collision_layer = 4
script = ExtResource("1_lyo8d")
metadata/_edit_group_ = true
[node name="BodySprite" type="AnimatedSprite2D" parent="." unique_id=581143480]
unique_name_in_owner = true
position = Vector2(2, -4)
sprite_frames = ExtResource("2_ba6cv")
animation = &"idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1744954023]
position = Vector2(0, 1)
shape = SubResource("CapsuleShape2D_feb5d")
[node name="Detection" type="Area2D" parent="." unique_id=151830843]
collision_layer = 0
collision_mask = 2
monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Detection" unique_id=1217467707]
shape = SubResource("CircleShape2D_lyo8d")
debug_color = Color(0, 0.6, 0.69803923, 0.16862746)
[node name="Chase" type="Area2D" parent="." unique_id=172000915]
collision_layer = 0
collision_mask = 2
monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Chase" unique_id=567870323]
shape = SubResource("CircleShape2D_ba6cv")
debug_color = Color(0, 0.6, 0.69803923, 0)
[node name="HealthBar" type="ProgressBar" parent="." unique_id=369348156]
unique_name_in_owner = true
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -10.0
offset_top = -12.0
offset_right = 10.0
offset_bottom = -10.0
grow_horizontal = 2
theme_override_styles/background = SubResource("StyleBoxFlat_lyo8d")
theme_override_styles/fill = SubResource("StyleBoxFlat_ba6cv")
value = 50.0
show_percentage = false
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=695394949]
libraries/ = SubResource("AnimationLibrary_1i6dk")
[connection signal="body_entered" from="Detection" to="." method="OnDetectionBodyEntered"]
[connection signal="body_exited" from="Chase" to="." method="OnChaseBodyExited"]

111
src/game.tscn Normal file

File diff suppressed because one or more lines are too long

BIN
src/level/tiles_0.aseprite Normal file

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="aseprite_wizard.plugin.static-texture"
type="PortableCompressedTexture2D"
uid="uid://dkxcdqm8dgdq7"
path="res://.godot/imported/tiles_0.aseprite-88b641c9e3407952b30dd9ebb5ab058f.res"
[deps]
source_file="res://src/level/tiles_0.aseprite"
dest_files=["res://.godot/imported/tiles_0.aseprite-88b641c9e3407952b30dd9ebb5ab058f.res"]
[params]
layer/exclude_layers_pattern=""
layer/only_visible_layers=false
layer/split_layers=false
first_frame_only=true
sheet/sheet_type="packed"
sheet/sheet_columns=16
sheet/scale=1

300
src/player/Player.cs Normal file
View file

@ -0,0 +1,300 @@
using System.Collections.Generic;
namespace Dancer;
using Godot;
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
[Meta(typeof(IAutoNode))]
public sealed partial class Player : CharacterBody2D
{
public override void _Notification(int what) => this.Notify(what);
[Export(PropertyHint.None, "suffix:s")]
public float MaxInputBufferTime { get; set; } = 0.15f;
[Export(PropertyHint.None, "suffix:s⁻¹")]
public float GroundedSpeedDecay { get; set; } = 0.1f;
[Export(PropertyHint.None, "suffix:s⁻¹")]
public float GroundedSpeedStopDecay { get; set; } = 0.005f;
[Export(PropertyHint.None, "suffix:px/s")]
public float WalkMaxSpeed { get; set; } = 130.0f;
[Export(PropertyHint.None, "suffix:px/s²")]
public float WalkAccel { get; set; } = 600.0f;
[Export(PropertyHint.None, "suffix:px/s²")]
public float AirAccel { get; set; } = 200.0f;
[Export(PropertyHint.None, "suffix:s")]
public float JumpAscentMaxTime { get; set; } = 0.2f;
[Export(PropertyHint.None, "suffix:px/s")]
public float JumpAscentSpeed { get; set; } = 200.0f;
[Export(PropertyHint.None, "suffix:s")]
public float LateJumpTimeLimit { get; set; } = 0.15f;
[Export(PropertyHint.None, "suffix:s")]
public float SlashSpeedBoost { get; set; } = 90.0f;
/// <summary>The angle difference from perfect left/right that still counts.</summary>
[Export(PropertyHint.Range, "0,360,0.1,radians_as_degrees")]
public float SideInputAngle { get; set; } = Mathf.Pi / 4;
/// <summary>The angle difference from perfect down that still counts.</summary>
[Export(PropertyHint.Range, "0,360,0.1,radians_as_degrees")]
public float DownInputAngle { get; set; } = Mathf.Pi / 4;
private ulong MaxInputBufferTimeMicroseconds => (ulong)(MaxInputBufferTime * 1_000_000);
private float _jumpAscentRemainingTime;
private bool _isJumping;
private float _jumpAllowedTime;
private Vector2 _currentDirection = Vector2.Zero;
private bool _isFacingRight = true;
private AnimationNodeStateMachinePlayback _playback = null!;
private List<BufferedInput> _inputBuffer = [];
[Node] private AnimationTree AnimationTree { get; set; } = null!;
public override void _Ready()
{
_playback = AnimationTree.Get("parameters/playback").As<AnimationNodeStateMachinePlayback>();
}
public override void _UnhandledInput(InputEvent @event)
{
if (@event.IsEcho())
return;
if (
@event.IsAction("move_left")
|| @event.IsAction("move_right")
|| @event.IsAction("move_up")
|| @event.IsAction("move_down"))
{
_currentDirection = Input.GetVector(
"move_left",
"move_right",
"move_up",
"move_down");
}
if (@event.IsAction("jump") || @event.IsAction("attack"))
{
_inputBuffer.Add(new()
{
Direction = _currentDirection,
Event = @event,
Time = Time.GetTicksUsec()
});
HandleBufferedInputs();
}
}
public override void _PhysicsProcess(double delta)
{
var deltaF = (float)delta;
if (_currentDirection.X < 0)
_isFacingRight = false;
else if (_currentDirection.X > 0)
_isFacingRight = true;
// Walking on the floor
if (IsOnFloor())
{
if (Mathf.Sign(Velocity.X) != Mathf.Sign(_currentDirection.X))
Velocity = Velocity with { X = Velocity.X * Mathf.Pow(GroundedSpeedStopDecay, deltaF) };
else
Velocity = Velocity with { X = Velocity.X * Mathf.Pow(GroundedSpeedDecay, deltaF) };
var targetVelX = Mathf.Sign(_currentDirection.X) * WalkMaxSpeed;
var isWalking = targetVelX != 0;
if (!isWalking || Mathf.Abs(Velocity.X) < WalkMaxSpeed)
{
Velocity = Velocity with
{
X = Mathf.MoveToward(Velocity.X, targetVelX, WalkAccel * deltaF)
};
}
}
// Air control
else
{
Velocity = Velocity with { X = Velocity.X + _currentDirection.X * AirAccel * deltaF };
}
// Move up while holding jump
if (_jumpAscentRemainingTime > 0)
{
Velocity = Velocity with { Y = -JumpAscentSpeed };
_jumpAscentRemainingTime -= deltaF;
if (_jumpAscentRemainingTime < 0)
Velocity += GetGravity() * -_jumpAscentRemainingTime;
}
else if (!IsOnFloor())
{
Velocity += GetGravity() * deltaF;
}
// Drag while in air
if (!IsOnFloor() && _jumpAscentRemainingTime <= 0)
{
var dragForce = -0.01f * Velocity * Velocity.Abs();
Velocity += dragForce * deltaF;
}
MoveAndSlide();
_jumpAllowedTime = Mathf.Max(0, _jumpAllowedTime - deltaF);
if (IsOnFloor())
_jumpAllowedTime = LateJumpTimeLimit;
if (IsOnCeiling())
{
_isJumping = false;
_jumpAscentRemainingTime = 0.0f;
}
if (IsHoldingWall())
{
Velocity = Velocity with { Y = Mathf.Min(5.0f, Velocity.Y) };
_isFacingRight = Mathf.Sign(GetWallNormal().X) > 0;
}
}
private bool IsHoldingWall()
{
return
!IsOnFloor()
&& IsOnWall()
&& Mathf.Sign(GetWallNormal().X) != Mathf.Sign(_currentDirection.X)
&& _currentDirection.X != 0;
}
public override void _Process(double delta)
{
HandleBufferedInputs();
GetNode<Node2D>("%Body").Scale = new(_isFacingRight ? 1 : -1, 1);
}
private void HandleBufferedInputs()
{
var inputFound = false;
var currentTime = Time.GetTicksUsec();
// Clear expired input buffer items
while (
_inputBuffer.Count > 0
&& _inputBuffer[0].Time + MaxInputBufferTimeMicroseconds < currentTime)
{
_inputBuffer.RemoveAt(0);
}
// Check new commands
for (var i = 0; i < _inputBuffer.Count; i++)
{
var input = _inputBuffer[i];
if (input.Event.IsAction("jump"))
{
if (
input.Event.IsPressed()
&& _jumpAllowedTime > 0
&& (!IsOnFloor() || !IsInputVecDown(input.Direction)))
{
inputFound = true;
GroundJump();
}
else if (input.Event.IsPressed() && IsOnWall())
{
inputFound = true;
WallJump();
}
else if (input.Event.IsReleased() && _isJumping)
{
JumpCut();
}
}
else if (input.Event.IsActionPressed("attack"))
{
inputFound = true;
Slash();
}
if (inputFound)
{
_inputBuffer = _inputBuffer.GetRange(i + 1, _inputBuffer.Count - i - 1);
break;
}
}
}
private void GroundJump()
{
_jumpAllowedTime = 0.0f;
_jumpAscentRemainingTime = JumpAscentMaxTime;
_isJumping = true;
}
private void WallJump()
{
_jumpAllowedTime = 0.0f;
Velocity += GetWallNormal() * 200.0f;
Velocity = Velocity with { Y = Mathf.Min(0, Velocity.Y) };
}
private void JumpCut()
{
_isJumping = false;
_jumpAscentRemainingTime = 0.0f;
// Jump cut only once, if we're still moving up
if (Velocity.Y < 0)
Velocity = Velocity with { Y = Velocity.Y * 0.1f };
}
private void Slash()
{
Velocity = Velocity with
{
X = Velocity.X + (_isFacingRight ? 1 : -1) * SlashSpeedBoost
};
_playback.Travel("attack");
var instance = GD.Load<PackedScene>("res://src/player/slash_projectile.tscn")
.Instantiate<SlashProjectile>();
AddChild(instance);
instance.GlobalTransform = GetNode<Node2D>("%HandAttachment").GlobalTransform;
instance.HitboxEntered += OnEnemyHit;
}
private bool IsInputVecDown(Vector2 vec)
{
return Mathf.Abs(vec.AngleTo(Vector2.Down)) < DownInputAngle && vec.Length() > 0.1f;
}
private void OnEnemyHit(Node2D enemy)
{
if (enemy is not IAttackable attackable) return;
attackable.GetAttacked(new()
{
Attacker = this,
Damage = 1.0f,
Impulse = Vector2.Down * 5000.0f + (enemy.Position - Position).Normalized() * 5000.0f
});
}
public class BufferedInput
{
public Vector2 Direction { get; init; }
public required InputEvent Event { get; init; }
public ulong Time { get; init; }
}
}

1
src/player/Player.cs.uid Normal file
View file

@ -0,0 +1 @@
uid://b5iey2typf2tb

View file

@ -0,0 +1,17 @@
namespace Dancer;
using Godot;
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
[Meta(typeof(IAutoNode))]
public sealed partial class SlashProjectile : Node2D
{
public override void _Notification(int what) => this.Notify(what);
[Signal]
public delegate void HitboxEnteredEventHandler(Node2D other);
public void OnAttackFinished() => QueueFree();
public void OnHitboxBodyEntered(Node2D body) => EmitSignalHitboxEntered(body);
}

View file

@ -0,0 +1 @@
uid://0n1gv56pcc74

BIN
src/player/attack.aseprite Normal file

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="aseprite_wizard.plugin.static-texture"
type="PortableCompressedTexture2D"
uid="uid://jdmsv25yp25v"
path="res://.godot/imported/attack.aseprite-0b3d00875a10a8cf04bab0910589e119.res"
[deps]
source_file="res://src/player/attack.aseprite"
dest_files=["res://.godot/imported/attack.aseprite-0b3d00875a10a8cf04bab0910589e119.res"]
[params]
layer/exclude_layers_pattern=""
layer/only_visible_layers=true
layer/split_layers=false
first_frame_only=false
sheet/sheet_type="horizontal"
sheet/sheet_columns=12
sheet/scale=1

BIN
src/player/hair.aseprite Normal file

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="aseprite_wizard.plugin.static-texture"
type="PortableCompressedTexture2D"
uid="uid://blw6f2ktsrcmg"
path="res://.godot/imported/hair.aseprite-733fe205726c184830ebda91637ad9f5.res"
[deps]
source_file="res://src/player/hair.aseprite"
dest_files=["res://.godot/imported/hair.aseprite-733fe205726c184830ebda91637ad9f5.res"]
[params]
layer/exclude_layers_pattern=""
layer/only_visible_layers=false
layer/split_layers=false
first_frame_only=true
sheet/sheet_type="packed"
sheet/sheet_columns=12
sheet/scale=1

BIN
src/player/player.aseprite Normal file

Binary file not shown.

View file

@ -0,0 +1,21 @@
[remap]
importer="aseprite_wizard.plugin.static-texture"
type="PortableCompressedTexture2D"
uid="uid://d0dy3j0qdycqf"
path="res://.godot/imported/player.aseprite-61ab8c4a2ca60d43d00c5a0147684013.res"
[deps]
source_file="res://src/player/player.aseprite"
dest_files=["res://.godot/imported/player.aseprite-61ab8c4a2ca60d43d00c5a0147684013.res"]
[params]
layer/exclude_layers_pattern=""
layer/only_visible_layers=true
layer/split_layers=false
first_frame_only=false
sheet/sheet_type="horizontal"
sheet/sheet_columns=12
sheet/scale=1

232
src/player/player.tscn Normal file
View file

@ -0,0 +1,232 @@
[gd_scene format=3 uid="uid://ce2k04khaub8n"]
[ext_resource type="Script" uid="uid://b5iey2typf2tb" path="res://src/player/Player.cs" id="1_244u8"]
[ext_resource type="Script" uid="uid://bhijvek6js88u" path="res://src/spring/Spring2D.cs" id="2_mf2ua"]
[ext_resource type="Texture2D" uid="uid://d0dy3j0qdycqf" path="res://src/player/player.aseprite" id="2_yw30f"]
[ext_resource type="Texture2D" uid="uid://blw6f2ktsrcmg" path="res://src/player/hair.aseprite" id="3_qjkh3"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_e2o6t"]
radius = 4.0
height = 14.0
[sub_resource type="Animation" id="Animation_yw30f"]
resource_name = "RESET"
length = 0.001
step = 0.016666668
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_qjkh3"]
resource_name = "idle"
length = 1.0000017
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_g6k8r"]
resource_name = "slash"
length = 0.20000167
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [6]
}
[sub_resource type="Animation" id="Animation_boad6"]
resource_name = "walk"
length = 0.400005
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 3]
}
[sub_resource type="Animation" id="Animation_rgyib"]
resource_name = "wall_hold"
length = 1.0000017
loop_mode = 1
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Body:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [5]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_rgyib"]
_data = {
&"RESET": SubResource("Animation_yw30f"),
&"idle": SubResource("Animation_qjkh3"),
&"slash": SubResource("Animation_g6k8r"),
&"walk": SubResource("Animation_boad6"),
&"wall_hold": SubResource("Animation_rgyib")
}
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qjkh3"]
animation = &"slash"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_yw30f"]
animation = &"idle"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_g6k8r"]
animation = &"walk"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_boad6"]
animation = &"wall_hold"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_boad6"]
switch_mode = 2
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rgyib"]
break_loop_at_end = true
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_hg6s5"]
advance_mode = 2
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8t03j"]
advance_mode = 2
advance_expression = "is_on_floor() and _currentDirection.x != 0.0"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_2ieo8"]
break_loop_at_end = true
advance_mode = 2
advance_expression = "not is_on_floor() or _currentDirection.x == 0.0"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ebec5"]
advance_expression = "_is_on_wall()"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yllr7"]
advance_mode = 2
advance_expression = "IsHoldingWall()"
[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_kb6p2"]
advance_mode = 2
advance_expression = "not IsHoldingWall()"
[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_yllr7"]
allow_transition_to_self = true
states/attack/node = SubResource("AnimationNodeAnimation_qjkh3")
states/attack/position = Vector2(604.5, 41.5)
states/idle/node = SubResource("AnimationNodeAnimation_yw30f")
states/idle/position = Vector2(428.5, 88.5)
states/walk/node = SubResource("AnimationNodeAnimation_g6k8r")
states/walk/position = Vector2(628.5, 203.5)
states/wall_hold/node = SubResource("AnimationNodeAnimation_boad6")
states/wall_hold/position = Vector2(362.82965, 231.5)
transitions = ["attack", "idle", SubResource("AnimationNodeStateMachineTransition_boad6"), "idle", "attack", SubResource("AnimationNodeStateMachineTransition_rgyib"), "Start", "idle", SubResource("AnimationNodeStateMachineTransition_hg6s5"), "idle", "walk", SubResource("AnimationNodeStateMachineTransition_8t03j"), "walk", "idle", SubResource("AnimationNodeStateMachineTransition_2ieo8"), "walk", "attack", SubResource("AnimationNodeStateMachineTransition_ebec5"), "idle", "wall_hold", SubResource("AnimationNodeStateMachineTransition_yllr7"), "wall_hold", "idle", SubResource("AnimationNodeStateMachineTransition_kb6p2")]
graph_offset = Vector2(-59.670364, -27)
[node name="Player" type="CharacterBody2D" unique_id=500011307]
physics_interpolation_mode = 1
collision_layer = 2
floor_constant_speed = true
floor_max_angle = 0.24783675
script = ExtResource("1_244u8")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=84142517]
position = Vector2(0, 1)
shape = SubResource("CapsuleShape2D_e2o6t")
[node name="Camera2D" type="Camera2D" parent="." unique_id=1975474809]
limit_enabled = false
[node name="Body" type="Sprite2D" parent="." unique_id=567060128]
unique_name_in_owner = true
texture = ExtResource("2_yw30f")
hframes = 7
metadata/_aseprite_wizard_interface_config_ = {
"animation_section": false,
"layer_section": false,
"output_section": false,
"pending_changes": {
"convert_fps_field": 60.0,
"convert_ms_field": 16.0,
"convert_to_fps": false,
"i_mode": 0,
"keep_anim_length": false,
"player": "",
"source": "res://player/player.aseprite"
},
"slice_section": false
}
metadata/_aseprite_wizard_config_ = {
"embed_tex": true,
"layers": [],
"o_ex_p": "",
"o_folder": "",
"o_name": "",
"only_visible": false,
"scale": "1.0",
"should_round_fps": true,
"slice": "",
"source": "res://player.aseprite",
"source_uid": 8921683997410207965
}
metadata/_aseprite_wizard_source_file_hash_ = "61168df4a163c039cfaab97f4fccb905"
[node name="Spring2D" type="Node2D" parent="Body" unique_id=1050714188]
show_behind_parent = true
script = ExtResource("2_mf2ua")
[node name="Hair" type="Sprite2D" parent="Body/Spring2D" unique_id=796557000]
position = Vector2(-2, 2)
texture = ExtResource("3_qjkh3")
[node name="HandAttachment" type="Node2D" parent="Body" unique_id=1002134601]
unique_name_in_owner = true
position = Vector2(3, 2)
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1251324400]
libraries/ = SubResource("AnimationLibrary_rgyib")
[node name="AnimationTree" type="AnimationTree" parent="AnimationPlayer" unique_id=1839424284]
unique_name_in_owner = true
root_node = NodePath("%AnimationTree/../..")
tree_root = SubResource("AnimationNodeStateMachine_yllr7")
advance_expression_base_node = NodePath("../..")
anim_player = NodePath("..")

114
src/player/ribbon.gd Normal file
View file

@ -0,0 +1,114 @@
extends Node2D
@export_custom(PROPERTY_HINT_NONE, "suffix:px")
var max_length: float = 120.0
@export_custom(PROPERTY_HINT_NONE, "suffix:px")
var distance_limit: float = 2000.0
@export_custom(PROPERTY_HINT_NONE, "suffix:px")
var segment_length: float = 5.0
@export var color: Color
@export_custom(PROPERTY_HINT_NONE, "suffix:px")
var width: float = 1.4
@export var fall_speed: float = 5.5
## The amount of different update groups to split points into.
@export var point_update_groups: int = 3
@export var new_segments_damage: bool = false
var _points: Array[RibbonPoint] = []
class RibbonPoint:
var position: Vector2
var _length: float:
get():
var current_length := 0.0
for i in _points.size() - 1:
var from = _points[i]
var to = _points[i+1]
current_length += from.position.distance_to(to.position)
return current_length
var _point_shape: Shape2D
func _ready() -> void:
_point_shape = CircleShape2D.new()
_point_shape.radius = width / 2.0
func _physics_process(delta: float) -> void:
var space_state = get_world_2d().direct_space_state
var target := global_position
if _points.is_empty() or _points.back().position.distance_to(position) > distance_limit:
var point := RibbonPoint.new()
point.position = target
_points = [point]
else:
var head: RibbonPoint = _points.back()
var distance = target.distance_to(head.position)
if (distance > segment_length / 2.0):
var point_count := ceili(distance / segment_length)
for i in point_count:
var t: float = float(i + 1) / point_count
var point: RibbonPoint = RibbonPoint.new()
point.position = lerp(head.position, target, t)
_points.push_back(point)
if new_segments_damage:
var query := PhysicsShapeQueryParameters2D.new()
var shape = SegmentShape2D.new()
shape.a = head.position
shape.b = target
query.shape = shape
query.collision_mask = 0x0000_0004
var results := space_state.intersect_shape(query)
for result in results:
print("hit creature", result.collider)
var current_length := _length
while current_length > max_length:
var popped = _points.pop_front()
var tail = _points.front()
current_length -= popped.position.distance_to(tail.position)
_update_points(delta)
func _update_points(delta: float) -> void:
var space_state = get_world_2d().direct_space_state
var query = PhysicsShapeQueryParameters2D.new()
query.shape = _point_shape
query.collision_mask = 0x0000_0001
for i in range(randi() % point_update_groups, _points.size() - 1, point_update_groups):
# Skipping the head on purpose, so it doesn't keep falling away,
# crating more and more points.
var point = _points[i]
var next = _points[i+1]
# Gravity
if (point.position.distance_to(next.position) <= segment_length * 1.5
or point.position.y < next.position.y):
var fall_distance = fall_speed * delta * point_update_groups
query.transform = Transform2D.IDENTITY.translated(point.position)
query.motion = Vector2.DOWN * fall_distance
var result := space_state.cast_motion(query)
var safe_proportion := result[0]
point.position = point.position + query.motion * safe_proportion
# Pull together
var distance_to_next: float = point.position.distance_to(next.position)
if distance_to_next > segment_length:
var move_distance = distance_to_next - segment_length
query.transform = Transform2D.IDENTITY.translated(point.position)
query.motion = (next.position - point.position).normalized() * move_distance
var result := space_state.cast_motion(query)
var safe_proportion := result[0]
point.position = point.position + query.motion * safe_proportion
func _process(delta: float) -> void:
queue_redraw()
var _packed_points = PackedVector2Array()
func _draw() -> void:
draw_set_transform_matrix(global_transform.affine_inverse())
if (_points.size() < 2): return
_packed_points.resize(_points.size())
for i in _points.size():
_packed_points[i] = _points[i].position
draw_polyline(_packed_points, color, width, false)

1
src/player/ribbon.gd.uid Normal file
View file

@ -0,0 +1 @@
uid://bk0k3j7th00wu

View file

@ -0,0 +1,9 @@
class_name SlashProjectile extends Node2D
signal hitbox_entered(other: Node2D)
func _on_attack_finished() -> void:
queue_free()
func _on_hitbox_body_entered(body: Node2D) -> void:
hitbox_entered.emit(body)

View file

@ -0,0 +1 @@
uid://uwfp4ytugp51

View file

@ -0,0 +1,108 @@
[gd_scene format=3 uid="uid://bikcpm0fyl4pd"]
[ext_resource type="Texture2D" uid="uid://jdmsv25yp25v" path="res://src/player/attack.aseprite" id="1_3il12"]
[ext_resource type="Script" uid="uid://0n1gv56pcc74" path="res://src/player/SlashProjectile.cs" id="1_bi0sp"]
[sub_resource type="Animation" id="Animation_3il12"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Attack:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Hitbox/CollisionShape2D:disabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_eb3da"]
resource_name = "attack"
length = 0.4
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Attack:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [0, 1, 2]
}
tracks/1/type = "method"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.4),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"OnAttackFinished"
}]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Hitbox/CollisionShape2D:disabled")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.1, 0.3),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [true, false, true]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_12t1i"]
_data = {
&"RESET": SubResource("Animation_3il12"),
&"attack": SubResource("Animation_eb3da")
}
[sub_resource type="RectangleShape2D" id="RectangleShape2D_u7cw4"]
size = Vector2(32, 10)
[node name="SlashProjectile" type="Node2D" unique_id=541992074]
script = ExtResource("1_bi0sp")
[node name="Attack" type="Sprite2D" parent="." unique_id=30274790]
position = Vector2(16, -3)
texture = ExtResource("1_3il12")
hframes = 3
[node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1896907748]
unique_name_in_owner = true
libraries/ = SubResource("AnimationLibrary_12t1i")
autoplay = &"attack"
[node name="Hitbox" type="Area2D" parent="." unique_id=133086557]
collision_layer = 8
collision_mask = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" unique_id=1668475985]
position = Vector2(21, -5)
shape = SubResource("RectangleShape2D_u7cw4")
disabled = true
debug_color = Color(0.99430805, 0, 0.2314094, 0.41960785)
[connection signal="body_entered" from="Hitbox" to="." method="OnHitboxBodyEntered"]

106
src/rescaler/Rescaler.cs Normal file
View file

@ -0,0 +1,106 @@
using System;
namespace Dancer;
[Meta(typeof(IAutoNode))]
public sealed partial class Rescaler : Control
{
public override void _Notification(int what) => this.Notify(what);
[Export] public bool ShouldRoundWidthToEvens { get; set; } = true;
[Export]
public ScalingMode ScalingMode
{
get;
set
{
field = value;
UpdateFilters();
}
} = ScalingMode.IntLinear;
[Node] private TextureRect OuterSprite { get; set; } = null!;
[Node] private Sprite2D InnerSprite { get; set; } = null!;
[Node] private SubViewport OuterViewport { get; set; } = null!;
[Node] private SubViewport InnerViewport { get; set; } = null!;
private Transform2D _eventTransform = Transform2D.Identity;
private Vector2 _lastSize;
private int _targetHeight;
private int _previousFactor;
public override void _Ready()
{
UpdateFilters();
var window = GetWindow();
_targetHeight = ProjectSettings.GetSetting("display/window/size/viewport_height").AsInt32();
window.ContentScaleMode = Window.ContentScaleModeEnum.Disabled;
}
private void UpdateFilters()
{
if (!IsNodeReady()) return;
switch (ScalingMode)
{
case ScalingMode.IntLinear:
OuterSprite.TextureFilter = TextureFilterEnum.Linear;
InnerSprite.TextureFilter = TextureFilterEnum.Nearest;
break;
case ScalingMode.Nearest:
OuterSprite.TextureFilter = TextureFilterEnum.Nearest;
InnerSprite.TextureFilter = TextureFilterEnum.Nearest;
break;
case ScalingMode.Linear:
OuterSprite.TextureFilter = TextureFilterEnum.Linear;
InnerSprite.TextureFilter = TextureFilterEnum.Linear;
break;
default:
throw new ArgumentOutOfRangeException();
}
}
public override void _Input(InputEvent @event)
{
if (Engine.IsEditorHint()) return;
InnerViewport.PushInput(@event.XformedBy(_eventTransform));
}
public override void _Process(double delta)
{
if (_lastSize != Size)
{
ResizeViewports();
_lastSize = Size;
}
}
private void ResizeViewports()
{
var factor = Math.Max(1, Mathf.RoundToInt(Size.Y / _targetHeight));
if (factor != _previousFactor)
{
_previousFactor = factor;
GD.Print($"Scaling factor switched to {factor}.");
}
var roundingMultiplier = ShouldRoundWidthToEvens ? 2 : 1;
var targetWidth =
Mathf.CeilToInt(_targetHeight / Size.Y * Size.X / roundingMultiplier)
* roundingMultiplier;
var innerTargetSize = new Vector2I(targetWidth, _targetHeight);
var outerTargetSize = factor * innerTargetSize;
_eventTransform = Transform2D.Identity.Scaled(innerTargetSize / Size);
OuterViewport.Size = outerTargetSize;
InnerViewport.Size = innerTargetSize;
InnerSprite.Scale = new(factor, factor);
}
}
public enum ScalingMode
{
IntLinear,
Nearest,
Linear,
}

View file

@ -0,0 +1 @@
uid://dhepskekkv01r

View file

@ -0,0 +1,50 @@
[gd_scene format=3 uid="uid://c0ltj3ishvcbj"]
[ext_resource type="Script" uid="uid://dhepskekkv01r" path="res://src/rescaler/Rescaler.cs" id="1_jhxal"]
[ext_resource type="PackedScene" uid="uid://cujd7ltkrnxpt" path="res://src/game.tscn" id="2_wr0av"]
[sub_resource type="ViewportTexture" id="ViewportTexture_d73y4"]
viewport_path = NodePath("OuterViewport")
[sub_resource type="ViewportTexture" id="ViewportTexture_wr0av"]
viewport_path = NodePath("InnerViewport")
[node name="Rescaler" type="Control" unique_id=568157225]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_jhxal")
[node name="OuterSprite" type="TextureRect" parent="." unique_id=2048645881]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ViewportTexture_d73y4")
expand_mode = 5
[node name="OuterViewport" type="SubViewport" parent="." unique_id=738472919]
unique_name_in_owner = true
disable_3d = true
size = Vector2i(450, 360)
[node name="InnerSprite" type="Sprite2D" parent="OuterViewport" unique_id=994587378]
unique_name_in_owner = true
texture_filter = 1
texture = SubResource("ViewportTexture_wr0av")
centered = false
[node name="InnerViewport" type="SubViewport" parent="." unique_id=1519259451]
unique_name_in_owner = true
disable_3d = true
handle_input_locally = false
canvas_item_default_texture_filter = 0
size = Vector2i(450, 360)
[node name="Game" parent="InnerViewport" unique_id=1186062666 instance=ExtResource("2_wr0av")]

27
src/spring/Spring2D.cs Normal file
View file

@ -0,0 +1,27 @@
namespace Dancer;
[Meta(typeof(IAutoNode))]
public sealed partial class Spring2D : Node2D
{
public override void _Notification(int what) => this.Notify(what);
[Export] public Vector2 MaxOffset { get; set; } = Vector2.One;
private Vector2 _lastGlobalPosition;
private Vector2 _localOffset;
public override void _Ready()
{
_lastGlobalPosition = GlobalPosition;
_localOffset = Position;
}
public override void _Process(double delta)
{
if (GetParent() is not Node2D parent) return;
var targetPosition = parent.GlobalPosition + _localOffset;
var newPosition = _lastGlobalPosition.Lerp(targetPosition, 0.4f);
GlobalPosition = targetPosition + (newPosition - targetPosition).Clamp(-MaxOffset, MaxOffset);
_lastGlobalPosition = GlobalPosition;
}
}

View file

@ -0,0 +1 @@
uid://bhijvek6js88u